1 2018-11-21 Richard Biener <rguenther@suse.de>
4 * bitmap.c (bitmap_last_set_bit): Refactor to avoid warning.
5 * Makefile.in (bitmap.o-warn): Remove again.
7 2018-11-20 Jeff Law <law@redhat.com>
9 PR tree-optimization/88069
10 * tree-ssa-dom.c (record_equivalences_from_phis): Propagate away
11 degenerate virtual PHIs.
13 2018-11-21 H.J. Lu <hongjiu.lu@intel.com>
16 * config/i386/sse.md (sse4_1_<code>v8qiv8hi2<mask_name>): Replace
17 nonimmediate_operand with register_operand.
18 (avx2_<code>v8qiv8si2<mask_name>): Likewise.
19 (sse4_1_<code>v4qiv4si2<mask_name>): Likewise.
20 (sse4_1_<code>v4hiv4si2<mask_name>): Likewise.
21 (sse4_1_<code>v2qiv2di2<mask_name>): Likewise.
22 (avx512f_<code>v8qiv8di2<mask_name>): Likewise.
23 (avx2_<code>v4qiv4di2<mask_name>): Likewise.
24 (avx2_<code>v4hiv4di2<mask_name>): Likewise.
25 (sse4_1_<code>v2hiv2di2<mask_name>): Likewise.
26 (sse4_1_<code>v2siv2di2<mask_name>): Likewise.
27 (*sse4_1_<code>v8qiv8hi2<mask_name>_1): New pattern.
28 (*sse4_1_<code>v8qiv8hi2<mask_name>_2): Likewise.
29 (*avx2_<code>v8qiv8si2<mask_name>_1): Likewise.
30 (*avx2_<code>v8qiv8si2<mask_name>_2): Likewise.
31 (*sse4_1_<code>v4qiv4si2<mask_name>_1): Likewise.
32 (*sse4_1_<code>v4qiv4si2<mask_name>_2): Likewise.
33 (*sse4_1_<code>v4hiv4si2<mask_name>_1): Likewise.
34 (*sse4_1_<code>v4hiv4si2<mask_name>_2): Likewise.
35 (*avx512f_<code>v8qiv8di2<mask_name>_1): Likewise.
36 (*avx512f_<code>v8qiv8di2<mask_name>_2): Likewise.
37 (*avx2_<code>v4qiv4di2<mask_name>_1): Likewise.
38 (*avx2_<code>v4qiv4di2<mask_name>_2): Likewise.
39 (*avx2_<code>v4hiv4di2<mask_name>_1): Likewise.
40 (*avx2_<code>v4hiv4di2<mask_name>_2): Likewise.
41 (*sse4_1_<code>v2hiv2di2<mask_name>_1): Likewise.
42 (*sse4_1_<code>v2hiv2di2<mask_name>_2): Likewise.
43 (*sse4_1_<code>v2siv2di2<mask_name>_1): Likewise.
44 (*sse4_1_<code>v2siv2di2<mask_name>_2): Likewise.
46 2018-11-21 H.J. Lu <hongjiu.lu@intel.com>
48 * read-rtl.c (apply_subst_iterator): Handle define_split and
49 define_insn_and_split.
51 2018-11-21 Jakub Jelinek <jakub@redhat.com>
53 PR rtl-optimization/87817
54 * config/i386/i386.md (bmi2_bzhi_<mode>3, *bmi2_bzhi_<mode>3,
55 *bmi2_bzhi_<mode>3_1, *bmi2_bzhi_<mode>3_1_ccz): Use IF_THEN_ELSE
56 in the pattern to avoid triggering UB when operands[2] is zero.
57 (tbm_bextri_<mode>): New expander. Renamed the old define_insn to ...
58 (*tbm_bextri_<mode>): ... this.
60 2018-11-21 Tom de Vries <tdevries@suse.de>
63 * params.def (HOT_BB_COUNT_FRACTION): Terminate help message with
66 2018-11-21 Andreas Krebbel <krebbel@linux.ibm.com>
68 * configure.ac: Add check for Binutils to determine whether vector
69 load/store alignments hints are being supported.
70 * config.in: Regenerate.
71 * configure: Regenerate.
72 * config/s390/s390.c (print_operand): Support new output
74 * config/s390/s390.md ("movti"): Append alignment hint output
75 using the new output modifier 'A'.
76 * config/s390/vector.md ("mov<mode>", "*vec_tf_to_v1tf")
77 ("*vec_ti_to_v1ti"): Likewise.
79 2018-11-20 Martin Sebor <msebor@redhat.com>
81 * doc/extend.texi (Other Builtins): Add __builtin_has_attribute.
83 2018-11-20 Jan Hubicka <hubicka@ucw.cz>
86 * ipa-devirt.c (odr_types_equivalent_p): Use operand_equal_p to
89 2018-11-20 Jakub Jelinek <jakub@redhat.com>
91 PR tree-optimization/87895
92 * omp-simd-clone.c (ipa_simd_modify_function_body): When removing
93 or replacing GIMPLE_RETURN, set EDGE_FALLTHRU on the edge to EXIT.
94 (simd_clone_adjust): Don't set EDGE_FALLTHRU here. In a loop that
95 redirects edges to EXIT to edges to incr_bb, iterate while EXIT
96 has any preds and always use EDGE_PRED (, 0).
98 2018-11-20 Uros Bizjak <ubizjak@gmail.com>
101 * mode-switching.c (create_pre_exit): After reload, always split the
102 fallthrough edge to the exit block.
104 2018-11-20 Jan Hubicka <hubicka@ucw.cz>
106 * ipa-devirt.c (add_type_duplicate): Do not ICE on incomplete enums.
107 * tree.c (build_array_type_1): Forward declare.
108 (fld_type_variant_equal_p): Add INNER_TYPE parameter.
109 (fld_type_variant): Likewise.
110 (fld_simplified_types): New hash.
111 (fld_process_array_type): New function.
112 (fld_incomplete_type_of): Handle array and enumeration types.
113 (fld_simplified_type): Handle simplification of arrays.
114 (free_lang_data): Allocate and free simplified types hash.
116 2018-11-20 Jan Hubicka <hubicka@ucw.cz>
119 * ipa-devirt.c (odr_subtypes_equivalent_p): Report ODR violation
120 when sybtype already violates ODR.
121 (get_odr_type): Do not ICE when insert is false and type duplicate
122 is not registered yet.
123 (register_odr_type): Be sure to register subtypes first.
125 2018-11-20 Andreas Krebbel <krebbel@linux.ibm.com>
127 * config/s390/s390.md ("clztidi2"): Swap the RTX's written to the
128 DImode parts of the target operand.
130 2018-11-20 Nathan Sidwell <nathan@acm.org>
133 * Makefile.in (bitmap.o-warn): Use -Wno-error=array-bounds.
135 2018-11-20 Jan Hubicka <hubicka@ucw.cz>
138 * tree.c (free_lang_data_in_cgraph): Add argument fld; break out
140 (free_lang_data) ... here; update call of free_lang_data_in_cgraph.
142 2018-11-20 Jan Hubicka <hubicka@ucw.cz>
145 * ipa-fnsummary.c (pass_ipa_fnsummary): Do not remove functions
146 * ipa.c (possible_inline_candidate_p): Break out from ..
147 (process_references): ... here ; drop before_inlining_p;
148 cleanup handling of alises.
149 (walk_polymorphic_call_targets): Likewise.
150 (symbol_table::remove_unreachable_nodes): Likewise.
151 * passes.c (pass_data_ipa_remove_symbols): New structure.
152 (pass_ipa_remove_symbols): New pass.
153 (make_pass_ipa_remove_symbols): New function.
154 * tree-pass.h (make_pass_ipa_remove_symbols): Declare.
155 * passes.def (pass_ipa_remove_symbols): Schedule after early passes.
157 2018-11-20 Richard Biener <rguenther@suse.de>
159 * tree-vect-stmts.c (vectorizable_condition): Do not get
160 at else_clause vect def for EXTRACT_LAST_REDUCTION. Remove
161 pointless vect_is_simple_use calls.
163 2018-11-20 Richard Biener <rguenther@suse.de>
165 PR tree-optimization/88074
166 * tree-ssa-dom.c (pass_dominator::execute): Do not walk
169 2018-11-20 Richard Biener <rguenther@suse.de>
171 PR tree-optimization/88069
172 * tree-ssa-sccvn.c (visit_phi): Do not value-number to unvisited
173 virtual PHI arguments.
175 2018-11-20 Ilya Leoshkevich <iii@linux.ibm.com>
178 * config/s390/s390.md: Skip LT(G) peephole when literal pool is
180 * rtl.h (contains_constant_pool_address_p): New function.
181 * rtlanal.c (contains_constant_pool_address_p): Likewise.
183 2018-11-20 Richard Biener <rguenther@suse.de>
186 * alias.c (component_uses_parent_alias_set_from): Remove
187 alias-set zero and TYPE_TYPELESS_STORAGE case both already
188 handled in other ways.
190 2018-11-20 Richard Biener <rguenther@suse.de>
192 PR tree-optimization/88087
193 * tree-ssa-pre.c (create_expression_by_pieces): Re-materialize
195 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Remember
198 2018-11-20 Richard Biener <rguenther@suse.de>
201 * tree-data-ref.c (lambda_matrix_right_hermite): Use abs_hwi.
203 2018-11-19 Jan Hubicka <hubicka@ucw.cz>
206 * ipa-devirt.c (free_enum_values): Do not ICE on ODR vilations.
208 2018-11-19 Sandra Loosemore <sandra@codesourcery.com>
211 * doc/invoke.texi (Link Options): Mention shared libraries
212 in documentation for the -l option. Simplify discussion and
213 point to the system linker documentation for details.
215 2018-11-19 Peter Bergner <bergner@linux.ibm.com>
217 PR rtl-optimization/88033
218 * ira-lives.c (non_conflicting_reg_copy_p): Skip copies from a register
219 to itself. Use HARD_REGISTER_NUM_P.
221 2018-11-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
223 * tree-vect-loop.c (vect_transform_loop): Disable further unrolling
224 of the loop if vf is non-constant.
226 2018-11-19 David Malcolm <dmalcolm@redhat.com>
228 PR tree-optimization/87025
229 * dumpfile.c (dump_context::begin_scope): Call end_any_optinfo
230 immediately after creating the scope optinfo.
231 (selftest::test_pr87025): New function.
232 (selftest::dumpfile_c_tests): Call it.
233 * optinfo-emit-json.cc (optrecord_json_writer::pop_scope): Assert
234 that we're not popping the top-level records array.
235 * optinfo.cc (optinfo::handle_dump_file_kind): Assert that we're
236 not changing the kind of a "scope" optinfo.
238 2018-11-19 David Malcolm <dmalcolm@redhat.com>
240 PR tree-optimization/87025
241 * dump-context.h: Include "optinfo.h".
242 (class optrecord_json_writer): New forward decl.
243 (dump_context::forcibly_enable_optinfo_p): Delete.
244 (dump_context::optinfo_enabled_p): New member function.
245 (dump_context::optimization_records_enabled_p): New member
247 (dump_context::set_json_writer): New member function.
248 (dump_context::emit_optinfo): New member function.
249 (dump_context::m_forcibly_enable_optinfo): Delete.
250 (dump_context::m_json_writer): New member data.
251 * dumpfile.c (dump_context::set_json_writer): New member function.
252 (dump_context::finish_any_json_writer): New member function.
253 (dump_context::end_scope): Replace call to
254 optimization_records_maybe_pop_dump_scope with call to
255 m_json_writer->pop_scope.
256 (dump_context::optinfo_enabled_p): New member function.
257 (dump_context::end_any_optinfo): Replace call to optinfo::emit with call
258 to dump_context::emit_optinfo.
259 (dump_context::emit_optinfo): New member function.
260 (temp_dump_context::temp_dump_context): Replace
261 m_forcibly_enable_optinfo with call to set_json_writer.
262 (temp_dump_context::~temp_dump_context): Clean up any json writer.
263 * optinfo-emit-json.cc (class optrecord_json_writer): Move to
265 (the_json_writer): Delete.
266 (optimization_records_start): Delete.
267 (optimization_records_finish): Delete.
268 (optimization_records_enabled_p): Delete, in favor of
269 dump_context::optimization_records_enabled_p.
270 (optimization_records_maybe_record_optinfo): Delete.
271 (optimization_records_maybe_pop_dump_scope): Delete.
272 * optinfo-emit-json.h: Include "json.h". Delete forward
274 (optimization_records_start): Delete.
275 (optimization_records_finish): Delete.
276 (optimization_records_enabled_p): Delete.
277 (optimization_records_maybe_record_optinfo): Delete.
278 (optimization_records_maybe_pop_dump_scope): Delete.
279 (class optrecord_json_writer): Move here from
280 optinfo-emit-json.cc.
281 * optinfo.cc (optinfo::emit_for_opt_problem): Replace call
282 to optinfo::emit with call to dump_context::emit_optinfo.
283 (optinfo::emit): Delete, in favor of dump_context::emit_optinfo.
284 (optinfo_enabled_p): Delete, in favor of
285 dump_context::optinfo_enabled_p.
286 (optinfo_wants_inlining_info_p): Update for conversion o
287 optimization_records_enabled_p to a member function of
289 * optinfo.h (optinfo_enabled_p): Delete, in favor of
290 dump_context::optinfo_enabled_p.
291 (optinfo::emit): Delete, in favor of dump_context::emit_optinfo.
292 * toplev.c: Include "dump-context.h".
293 (compile_file): Replace call to optimization_records_finish with
294 dump_context::finish_any_json_writer.
295 (do_compile): Replace call to optimization_records_start with
296 conditionally creating a optrecord_json_writer for the
299 2018-11-19 Jakub Jelinek <jakub@redhat.com>
301 PR tree-optimization/88071
302 * tree-vect-loop.c (vectorize_fold_left_reduction): Pass true instead
303 of false as last argument to gsi_remove.
304 * tree-vect-stmts.c (vect_finish_replace_stmt): Pass true instead of
305 false as last argument to gsi_replace.
308 * omp-expand.c: Don't include debug.h.
309 (adjust_context_and_scope): Add REGION argument. Find DECL_CONTEXT
310 from innermost outer parallel, task, teams or target that has a
311 child_fn set, or, if there is no such outer region, use
312 current_function_decl. Do the DECL_CONTEXT adjustment regardless of
313 whether a suitable BLOCK is found or not.
314 (expand_parallel_call, expand_teams_call): Don't call
315 adjust_context_and_scope here.
316 (grid_expand_target_grid_body): Revert 2017-01-25 changes.
317 (expand_omp_taskreg, expand_omp_target): Likewise. Call
318 adjust_context_and_scope.
319 * dwarf2out.c (dwarf2out_early_global_decl): For
320 decl_function_context recurse instead of calling dwarf2out_decl.
322 2018-11-20 Eric Botcazou <ebotcazou@adacore.com>
324 PR rtl-optimization/85925
325 * rtl.h (word_register_operation_p): New predicate.
326 * combine.c (record_dead_and_set_regs_1): Only apply specific handling
327 for WORD_REGISTER_OPERATIONS targets to word_register_operation_p RTX.
328 * rtlanal.c (nonzero_bits1): Likewise. Adjust couple of comments.
329 (num_sign_bit_copies1): Likewise.
331 2018-11-19 Richard Biener <rguenther@suse.de>
334 * tree.c (free_lang_data_in_one_sizepos): Free non-gimple-val
337 2018-11-19 Eric Botcazou <ebotcazou@adacore.com>
339 * compare-elim.c (struct comparison): Add not_in_a field.
340 (is_not): New static function.
341 (strip_not): Likewise.
342 (conforming_compare): Handle a NOT in the first operand.
343 (can_eliminate_compare): Likewise.
344 (find_comparison_dom_walker::before_dom_children): Likewise.
345 (try_eliminate_compare): Likewise.
346 * config/visium/visium.md (negsi2_insn_set_carry): Turn into...
347 (neg<mode>2_insn_set_carry): ...this and add missing NEG operation.
349 2018-11-19 Jonathan Wakely <jwakely@redhat.com>
351 * doc/extend.texi (Common Type Attributes): Fix typos.
353 2018-11-19 Martin Liska <mliska@suse.cz>
355 PR gcov-profile/88045
356 * coverage.c (coverage_begin_function): Add assert.
358 2018-11-18 Sandra Loosemore <sandra@codesourcery.com>
361 * doc/extend.texi (Common Function Attributes): Document that
362 no_instrument_function applies to -p and -pg, too.
363 * doc/invoke.texi (Instrumentation Options): Add cross-references
364 to docs for -p, -pg, and -finstrument-functions.
366 2018-11-18 Alan Modra <amodra@gmail.com>
368 * config/gnu-user.h (GNU_USER_TARGET_CRTI): Define.
369 (GNU_USER_TARGET_STARTFILE_SPEC): Use it here.
370 (GNU_USER_TARGET_CRTN): Define.
371 (GNU_USER_TARGET_ENDFILE_SPEC): Use it here.
372 (GNU_USER_TARGET_LINK_GCC_C_SEQUENCE_SPEC): Define.
374 2018-11-18 Alan Modra <amodra@gmail.com>
376 * config/gnu-user.h (GNU_USER_TARGET_STARTFILE_SPEC): Delete
377 !HAVE_LD_PIE variant.
378 (GNU_USER_TARGET_ENDFILE_SPEC): Likewise.
380 2018-11-17 Nick Clifton <nickc@redhat.com>
381 Sandra Loosemore <sandra@codesourcery.com>
384 * doc/invoke.texi (Overall Options): Document that --help and
385 --help=<value> options cannot be combined.
387 2018-11-17 Jim Wilson <jimw@sifive.com>
389 * config/riscv/riscv.c (epilogue_cfa_sp_offset): New.
390 (riscv_restore_reg): If restoring HARD_FRAME_POINTER_REGNUM, and
391 epilogue_cfa_sp_offset set, then add REG_CFA_DEF_CFA regnote.
392 (riscv_expand_epilogue): Initialize epilogue_cfa_sp_offset. Set it
393 to step2 if frame_pointer_needed and step1 is 0.
395 2018-11-17 Sandra Loosemore <sandra@codesourcery.com>
398 * doc/cpp.texi (System Headers): Add note about implicit
399 extern "C" block on targets that define SYSTEM_IMPLICIT_EXTERN_C.
401 2018-11-17 Sandra Loosemore <sandra@codesourcery.com>
404 * doc/invoke.texi (C++ Dialect Options): Clarify usage of
405 -fno-implicit-templates.
407 2018-11-17 Jakub Jelinek <jakub@redhat.com>
409 PR tree-optimization/87546
410 * tree-vect-patterns.c (vect_look_through_possible_promotion): Add
411 min_precision variable, initially set it to orig_precision, only does
412 something if op_type's precision is <= min_precision and update
413 min_precision whenever calling set_op.
415 2018-11-16 Jan Hubicka <hubicka@ucw.cz>
418 * ipa-devirt.c (warn_odr): Look for main variant to get TYPE_DECL.
420 2018-11-16 Sandra Loosemore <sandra@codesourcery.com>
422 * doc/invoke.texi (Option Summary): Fix whitespace and line
423 breaks in @gccoptlist environments.
424 (Warning Options): Likewise.
425 (Optimize Options): Likewise.
426 (PowerPC SPE Options): Likewise.
427 (RS/6000 and PowerPC Options): Likewise.
429 2018-11-16 Jeff Law <law@redhat.com>
431 * config/mn10300/mn10300.md (adddi3_degenerate): Remove bogus
434 2018-11-16 Sandra Loosemore <sandra@codesourcery.com>
437 * doc/invoke.texi (Optimize Options): Update options enabled by
438 fprofile-generate, -fprofile-use, and -fauto-profile.
440 2018-11-16 Jozef Lawrynowicz <jozef.l@mittosystems.com>
443 * target-def.h: Initialize TARGET_ASM_{,UN}ALIGNED_P{S,D,T}I_OP.
444 Add them to the TARGET_ASM_{,UN}ALIGNED_INT_OP structs.
445 * target.def: Enumerate TARGET_ASM_{,UN}ALIGNED_P{S,D,T}I_OP in
447 * target.h: Add psi, pdi, pti to struct asm_int_op definition.
448 * targhooks.c (default_print_patchable_function_entry): Assert
449 asm_int_op does not return a NULL string.
450 * varasm.c (integer_asm_op): Return the op for a partial int type
451 when the requested size does not correspond to an integer type.
452 * config/msp430/msp430.c: Initialize TARGET_ASM_{,UN}ALIGNED_PSI_OP.
453 * doc/tm.texi: Regenerate.
455 2018-11-12 Jason Merrill <jason@redhat.com>
457 * gimplify.c (gimplify_case_label_expr): Handle hot/cold attributes.
459 2018-11-16 Michael Meissner <meissner@linux.ibm.com>
461 * config/rs6000/constraints.md (wF constraint): Remove power9
462 fusion documentation. Just document wF's use for power8 fusion.
463 * config/rs6000/predicates.md (p9_fusion_reg_operand): Delete.
464 (fusion_gpr_addis): Delete power9 fusion support. Change power8
465 fusion support to require the upper 12 bits to be all 0's or all
467 (fusion_gpr_mem_load): Add comment.
468 (fusion_addis_mem_combo_load): Remove power9 fusion support.
469 (fusion_addis_mem_combo_store): Delete.
470 (fusion_offsettable_mem_operand): Delete.
471 * config/rs6000/rs6000-cpus.def (ISA_2_7_MASKS_SERVER): Do not set
473 (ISA_3_0_MASKS_SERVER): Delete power9 fusion.
474 (POWERPC_MASKS): Delete power9 fusion.
475 * config/rs6000/rs6000-protos.h (emit_fusion_load_store): Delete.
476 (fusion_p9_p): Delete.
477 (expand_fusion_p9_load): Delete.
478 (expand_fusion_p9_store): Delete.
479 (emit_fusion_p9_load): Delete.
480 (emit_fusion_p9_store): Delete.
481 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Delete power9
483 (rs6000_option_override_internal): Set power8 fusion based on
484 whether we are tuning for power8. Delete power9 fusion support.
485 (rs6000_opt_masks): Delete -mpower9-fusion switch.
486 (emit_fusion_load): Rename emit_fusion_load_store to
487 emit_fusion_load, and drop fusion store support. Update callers.
488 (emit_fusion_load_store): Likewise.
489 (emit_fusion_gpr_load): Likewise.
490 (fusion_p9_p): Delete.
491 (expand_fusion_p9_load): Delete.
492 (expand_fusion_p9_store): Delete.
493 (emit_fusion_p9_load): Delete.
494 (emit_fusion_p9_store): Delete.
495 * config/rs6000/rs6000.md (UNSPEC_FUSION_P9): Delete.
496 (GPR_FUSION): Delete.
497 (FPR_FUSION): Delete.
498 (power9 fusion peephole2s): Delete.
499 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Delete.
500 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Delete.
501 (fusion_vsx_<P:mode>_<FPR_FUSION:mode>_load): Delete.
502 (fusion_vsx_<P:mode>_<FPR_FUSION:mode>_store): Delete.
503 (fusion_p9_<mode>_constant): Delete.
504 * config/rs6000/rs6000.opt (-mpower9-fusion): Delete undocumented
505 power9 fusion switch.
506 * doc/md.texi (PowerPC constraints): Update wF constraint
507 documentation for power8 fusion only.
509 2018-11-16 Jakub Jelinek <jakub@redhat.com>
511 PR rtl-optimization/87475
512 * cfgrtl.c (patch_jump_insn): Allow redirection failure for
513 CROSSING_JUMP_P insns.
514 (cfg_layout_redirect_edge_and_branch): Don't ICE if ret is NULL.
516 2018-11-16 Uros Bizjak <ubizjak@gmail.com>
519 * config/i386/i386.md (floatunsdidf2): Allow only 64bit AVX512F targets.
520 * config/i386/sse.md (UNSPEC_MOVDI_TO_SSE): New UNSPEC.
521 (movdi_to_sse): Rewrite using UNSPEC_MOVDI_TO_SSE unspec.
523 2018-11-16 Jakub Jelinek <jakub@redhat.com>
526 * optabs.c (expand_binop): For op0_mode use GET_MODE (op0), unless it
527 is VOIDmode, in which case use int_mode. Similarly for op1_mode.
529 2018-11-16 Eric Botcazou <ebotcazou@adacore.com>
531 * tree-switch-conversion.h (switch_decision_tree::emit_case_nodes): Add
532 location_t parameter.
533 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
534 (switch_decision_tree::do_jump_if_equal): Likewise.
535 * tree-switch-conversion.c (switch_decision_tree::emit): Pass location
536 of switch statement to emit_case_nodes.
537 (switch_decision_tree::emit_cmp_and_jump_insns): Add LOC parameter and
538 set it on the newly built GIMPLE comparison statement.
539 (switch_decision_tree::do_jump_if_equal): Likewise.
540 (switch_decision_tree::emit_case_nodes): Add LOC parameter and pass it
541 in calls to do_jump_if_equal as well as recursive calls.
543 2018-11-16 Andi Kleen <ak@linux.intel.com>
545 * config/i386/i386.md: Allow memory operands to ptwrite.
547 2018-11-16 Michael Matz <matz@suse.de>
549 * system.h (PRsa): New macro.
550 (SIZE_AMOUNT): Cast number to uint64_t.
551 * alloc-pool.h (pool_usage::dump): Don't use %zu but PRsa.
552 (pool_usage::dump_footer): Likewise and also use PRIu64.
553 * bitmap.h (bitmap_usage::dump): Likewise.
554 * ggc-common.c (ggc_usage::dump): Likewise.
555 * ggc-page.c (ggc_print_statistics): Likewise.
556 * input.c (dump_line_table_statistics): Likewise.
557 * mem-stats.h (mem_usage::dump): Likewise.
558 (mem_usage::dump_footer): Likewise.
559 * rtl.c (dump_rtx_statistics): Likewise.
560 * tree-cfg.c (dump_cfg_stats): Likewise.
561 * tree-dfa.c (dump_dfa_stats): Likewise.
562 * tree-phinodes.c (phinodes_print_statistics): Likewise.
563 * tree-ssanames (ssanames_print_statistics): Likewise.
564 * vec.c (vec_usage::dump): Likewise.
565 (vec_usage::dump_footer): Likewise.
567 2018-11-16 Richard Biener <rguenther@suse.de>
569 PR tree-optimization/88011
570 * tree-vrp.c (extract_range_from_binary_expr): Fix error in
571 replacing set_value_range_to_undefined and
572 set_value_range_to_varying with method calls.
574 2018-11-16 Ilya Leoshkevich <iii@linux.ibm.com>
576 * config/s390/s390.md
577 (*r<noxa>sbg_<mode>_srl_bitmask): Do not delegate arithmetic to
579 (*r<noxa>sbg_<mode>_sll): Likewise.
580 (*r<noxa>sbg_<mode>_srl): Likewise.
581 (*r<noxa>sbg_sidi_srl): New pattern.
583 2018-11-16 Jerome Lambourg <lambourg@adacore.com>
585 * config/vxworks.h (TARGET_VXWORKS_HAVE_CTORS_DTORS): New macro.
586 Default to TARGET_VXWORKS_RTP.
587 (SUPPORTS_INIT_PRIORITY): Use TARGET_VXWORKS_HAVE_CTORS_DTORS instead
588 of TARGET_VXWORKS_RTP.
589 * config/vxworksae.h: Also define TARGET_VXWORKS_HAVE_CTORS_DTORS.
590 * config/vxworks.c: Use TARGET_VXWORKS_HAVE_CTORS_DTORS instead
591 of TARGET_VXWORKS_RTP to set targetm.have_ctors_dtors.
593 2018-11-15 Sandra Loosemore <sandra@codesourcery.com>
596 * doc/extend.texi (Common Type Attributes): Make it explicit
597 that attribute "packed" can apply to C++ classes.
599 2018-11-15 Martin Sebor <msebor@redhat.com>
603 * tree.c (type_argument_type): New function.
604 * tree.h (type_argument_type): Declare it.
605 * gcc/doc/extend.texi (alloc_align): Update and clarify.
606 (alloc_size, nonnull, sentinel): Same.
608 2018-11-15 Andrew Stubbs <ams@codesourcery.com>
609 Kwok Cheung Yeung <kcy@codesourcery.com>
611 * tree-vect-stmts.c (vectorizable_store): Don't ICE when
612 int_mode_for_size fails.
613 (vectorizable_load): Likewise.
615 2018-11-15 David Malcolm <dmalcolm@redhat.com>
617 * doc/ux.texi (Group logically-related diagnostics): Move
618 discussion of auto_diagnostic_group into this new subsection.
619 Give an example of where this grouping is used.
621 2018-11-15 David Malcolm <dmalcolm@redhat.com>
624 * Makefile.in (OBJS): Move json.o to...
625 (OBJS-libcommon): ...here and add diagnostic-format-json.o.
626 * common.opt (fdiagnostics-format=): New option.
627 (diagnostics_output_format): New enum.
628 * diagnostic-format-json.cc: New file.
629 * diagnostic.c (default_diagnostic_final_cb): New function, taken
630 from start of diagnostic_finish.
631 (diagnostic_initialize): Initialize final_cb to
632 default_diagnostic_final_cb.
633 (diagnostic_finish): Move "being treated as errors" messages to
634 default_diagnostic_final_cb. Call any final_cb.
635 (default_diagnostic_finalizer): Add diagnostic_t param.
636 (diagnostic_report_diagnostic): Pass "orig_diag_kind" to
637 diagnostic_finalizer callback.
638 * diagnostic.h (enum diagnostics_output_format): New enum.
639 (diagnostic_finalizer_fn): Reimplement, adding diagnostic_t param.
640 (struct diagnostic_context): Add "final_cb".
641 (default_diagnostic_finalizer): Add diagnostic_t param.
642 (diagnostic_output_format_init): New decl.
643 * doc/invoke.texi (-fdiagnostics-format): New option.
644 * dwarf2out.c (gen_producer_string): Ignore
645 OPT_fdiagnostics_format_.
646 * gcc.c (driver_handle_option): Handle OPT_fdiagnostics_format_.
647 * lto-wrapper.c (append_diag_options): Ignore it.
648 * opts.c (common_handle_option): Handle it.
650 2018-11-15 David Malcolm <dmalcolm@redhat.com>
652 PR tree-optimization/88015
653 * graphite-isl-ast-to-gimple.c
654 (translate_isl_ast_to_gimple::scop_to_isl_ast): Add missing check
656 * graphite-sese-to-poly.c (build_poly_scop): Likewise.
658 2018-11-15 Richard Biener <rguenther@suse.de>
661 * gimple.c (gimple_call_flags): Union flags from decl, type
663 * trans-mem.c (is_tm_pure_call): Simplify.
665 2018-11-15 Richard Biener <rguenther@suse.de>
667 PR tree-optimization/88031
668 * tree-vect-loop.c (vectorizable_reduction): Move check
669 for multiple types earlier so we get the expected dump.
670 Simplify calls to vectorizable_condition.
671 * tree-vect-stmts.h (vectorizable_condition): Update prototype.
672 * tree-vect-stmts.c (vectorizable_condition): Instead of
673 reduc_def and reduc_index take just a flag. Simplify
674 code-generation now that we can rely on the defs being set up.
675 (vectorizable_comparison): Remove unused argument.
677 2018-11-15 Richard Biener <rguenther@suse.de>
679 PR tree-optimization/88030
680 * tree-complex.c (need_eh_cleanup): New global.
681 (update_complex_assignment): Mark blocks that need EH update.
682 (expand_complex_comparison): Likewise.
683 (tree_lower_complex): Allocate and deallocate need_eh_cleanup,
684 perform EH cleanup and schedule CFG cleanup if that did anything.
686 2018-11-15 Jakub Jelinek <jakub@redhat.com>
688 PR rtl-optimization/88018
689 * cfgrtl.c (fixup_abnormal_edges): Guard moving insns to fallthru edge
690 on the presence of fallthru edge, rather than if it is a USE or not.
692 2018-11-15 Richard Biener <rguenther@suse.de>
695 * tree-data-ref.c (analyze_miv_subscript): Guard calls to
696 analyze_subscript_affine_affine properly.
698 2018-11-15 Xianmiao Qu <xianmiao_qu@c-sky.com>
700 * config/csky/csky-linux-elf.h (LINUX_DYNAMIC_LINKER): Remove.
701 (GLIBC_DYNAMIC_LINKER): Define.
702 (LINUX_TARGET_LINK_SPEC): Update the dynamic linker's name.
704 2018-11-15 Bin Cheng <bin.cheng@linux.alibaba.com>
706 PR tree-optimization/84648
707 * tree-ssa-loop-niter.c (adjust_cond_for_loop_until_wrap): New.
708 (number_of_iterations_cond): Adjust exit cond for loop-until-wrap case
709 by calling adjust_cond_for_loop_until_wrap.
711 2018-11-15 Sandra Loosemore <sandra@codesourcery.com>
714 * doc/extend.texi (Common Function Attributes): Clarify linker
715 restrictions on "aligned" attribute.
716 (Common Variable Attributes): Likewise. Mention that linker
717 restrictions don't apply to stack-allocated variables.
719 2018-11-15 Joern Rennecke <joern.rennecke@riscy-ip.com>
721 * gensupport.c (add_predicate_code): Properly handle ZERO_EXTRACT
724 2018-11-14 Sandra Loosemore <sandra@codesourcery.com>
728 * doc/invoke.texi (Optimize Options): Remove bad example about
729 interaction between -flto and -O. Replace it with a note that
730 you need to compile with -O and not just link. Copy-edit -flto
731 discussion to reduce verbiage and improve flow.
733 2018-11-14 Sandra Loosemore <sandra@codesourcery.com>
736 * doc/invoke.texi (Optimize Options): Clarify that -O0 and -Og
737 also suppress many optimizations. Alphabetize option lists for
738 -O1, -O2, and -Os. Add list of options disabled with -Og, and
739 correct documentation for those options to say that.
740 * opts.c (default_options_table): Sort table by level and option
741 name, to make it easier to correlate to the manual.
743 2018-11-14 Uros Bizjak <ubizjak@gmail.com>
745 * config/i386/i386.c (ix86_print_operand_address_as): Simplify
746 printing of the names of segment registers.
748 2018-11-14 Nathan Sidwell <nathan@acm.org>
752 * dwarf2out.c (dwarf2out_finish): Apply resolve_addr to comdat
755 2018-11-14 David Malcolm <dmalcolm@redhat.com>
757 * Makefile.in (CFLAGS-optinfo-emit-json.o): Add $(ZLIBINC).
759 2018-11-14 Jakub Jelinek <jakub@redhat.com>
761 P1236R1 - Signed integers are two's complement
762 * doc/invoke.texi (Wshift-overflow): Adjust documentation for c++2a.
765 * hash-map.h (hash_map::iterator::reference_pair): New class.
766 (hash_map::iterator::operator*): Return it rather than std::pair.
768 2018-11-14 Jeff Law <law@redhat.com>
770 * optabs.c (expand_binop): Pass INT_MODE to operand_subword_force
771 iff the operand is a constant.
773 2018-11-14 Aldy Hernandez <aldyh@redhat.com>
775 * gimple-ssa-evrp-analyze.c
776 (evrp_range_analyzer::record_ranges_from_incoming_edge): Rename
777 ignore_equivs_equal_p to equal_p.
778 * ipa-cp.c (meet_with_1): Use equal_p instead of
779 ignore_equivs_equal_p.
780 * ipa-prop.c (ipa_vr_ggc_hash_traits::equal): Same.
781 * tree-vrp.c (value_range::ignore_equivs_equal_p): Remove.
782 (value_range::operator==): Remove.
783 (value_range::operator!=): Remove.
784 (vrp_prop::visit_stmt): Use equal_p.
785 * tree-vrp.h (value_range): Remove operator==, operator!=,
786 ignore_equivs_equal_p.
787 * vr-values.c (update_value_range): Use equal_p.
789 2018-11-14 Michael Matz <matz@suse.de>
792 * gimplify.c (collect_fallthrough_labels): Add new argument,
793 return location via that, don't modify statements.
794 (warn_implicit_fallthrough_r): Adjust call, don't use
795 statement location directly.
797 2018-11-14 Richard Biener <rguenther@suse.de>
800 * tree-data-ref.c (split_constant_offset): Add wrapper
801 allocating a cache hash-map.
802 (split_constant_offset_1): Cache results of expanding
803 expressions from SSA def stmts.
805 2018-11-14 Richard Biener <rguenther@suse.de>
808 * tree-data-ref.c (lambda_matrix_row_add): Change const1 argument
810 (lambda_vector_mult_const): Likewise.
811 (lambda_matrix_right_hermite): Use lambda_int temporaries.
813 2018-11-14 Wilco Dijkstra <wdijkstr@arm.com>
814 Jackson Woodruff <jackson.woodruff@arm.com>
816 PR 71026/tree-optimization
817 * match.pd: Simplify floating point comparisons.
819 2018-11-14 Jakub Jelinek <jakub@redhat.com>
821 PR rtl-optimization/87817
822 * config/i386/i386.c (ix86_fold_builtin): For _bzhi_u{32,64} if
823 last argument has low 8 bits clear, fold to 0.
825 2018-11-14 Iain Sandoe <iain@sandoe.co.uk>
827 * tree-vect-data-refs.c (vect_can_force_dr_alignment_p): Cast
828 MAX_OFILE_ALIGNMENT as needed.
830 2018-11-14 Richard Biener <rguenther@suse.de>
832 PR tree-optimization/88019
833 * graphite-isl-ast-to-gimple.c (ternary_op_to_tree): Rewrite
834 COND_EXPR arguments to non-trapping overflow.
836 2018-11-14 Claudiu Zissulescu <claziss@synopsys.com>
838 * config/arc/arc.h (reg_class): Reorder registers classes, remove
839 unused register classes.
840 (REG_CLASS_NAMES): Likewise.
841 (REG_CLASS_CONTENTS): Likewise.
842 (FIXED_REGISTERS): Make lp_count fixed.
843 (BASE_REG_CLASS): Remove ACC16_BASE_REGS reference.
844 (PROGRAM_COUNTER_REGNO): Remove.
845 * config/arc/arc.c (arc_conditional_register_usage): Remove unused
846 register classes, use constants for register numbers, remove
847 reg_class_contents references.
848 (arc_process_double_reg_moves): Add asserts.
849 (arc_secondary_reload): Remove LPCOUNT_REG reference, use
850 lra_in_progress predicate.
851 (arc_init_reg_tables): Remove unused register classes.
852 (arc_register_move_cost): Likewise.
853 (arc_preferred_reload_class): Likewise.
854 (hwloop_optimize): Update rtx patterns involving lp_count register.
855 (arc_return_address_register): Rename ILINK1, INLINK2 regnums macros.
856 * config/arc/constraints.md ("c"): Choose between GENERAL_REGS and
857 CHEAP_CORE_REGS. Former one will be used for LRA.
858 ("Rac"): Choose between GENERAL_REGS and ALL_CORE_REGS. Former
859 one will be used for LRA.
860 ("w"): Choose between GENERAL_REGS and WRITABLE_CORE_REGS. Former
861 one will be used for LRA.
862 ("W"): Choose between GENERAL_REGS and MPY_WRITABLE_CORE_REGS.
863 Former one will be used for LRA.
864 ("f"): Delete constraint.
867 ("l"): Change it from register constraint to constraint.
868 * config/arc/arc.md (movqi_insn): Remove unsed lp_count constraints.
869 (movhi_insn): Likewise.
870 (movsi_insn): Update pattern.
873 (stack_tie): Remove 'b' constraint letter.
875 (R9_REG, R15_REG, R16_REG, R25_REG): Likewise.
876 (R32_REG, R40_REG, R41_REG, R42_REG, R43_REG, R44_REG): Likewise.
877 (R57_REG, R59_REG, PCL_REG): Likewise.
878 (ILINK1_REGNUM): Renamed to ILINK1_REG.
879 (ILINK2_REGNUM): Renamed to ILINK2_REG.
882 (Rcw): Remove unused reg classes.
883 * config/arc/predicates.md (dest_reg_operand): Just default on
884 register_operand predicate.
885 (mpy_dest_reg_operand): Likewise.
886 (move_dest_operand): Use macros instead of constants.
887 * config/arc/arc.opt (mlra): Switch to lra as default.
889 2018-11-14 Richard Biener <rguenther@suse.de>
891 PR tree-optimization/87974
892 * tree-vect-loop.c (vectorizable_reduction): When computing
893 the vectorized reduction PHI vector type ignore constant
896 2018-11-14 Jakub Jelinek <jakub@redhat.com>
898 PR tree-optimization/87977
899 * tree-ssa-math-opts.c (optimize_recip_sqrt): Don't reuse division
900 stmt, build a new one and replace the old one with it. Formatting fix.
901 Call release_ssa_name (x) if !has_other_use and !delete_div.
902 (pass_cse_reciprocals::execute): Before calling optimize_recip_sqrt
903 verify lhs of stmt is still def.
905 2018-11-13 Peter Bergner <bergner@linux.ibm.com>
907 PR rtl-optimization/87507
908 * lower-subreg.c (operand_for_swap_move_operator): New function.
909 (simple_move): Strip simple operators.
910 (find_pseudo_copy): Likewise.
911 (resolve_operand_for_swap_move_operator): New function.
912 (resolve_simple_move): Strip simple operators and swap operands.
914 2018-11-13 Jakub Jelinek <jakub@redhat.com>
916 PR tree-optimization/87898
917 * omp-simd-clone.c (ipa_simd_modify_stmt_ops): Formatting fix.
918 (ipa_simd_modify_function_body): Remove debug stmts where the first
919 argument was changed into a non-decl.
921 2018-11-13 Peter Bergner <bergner@linux.ibm.com>
923 PR rtl-optimization/87899
924 * lra-lives.c (start_living): Update white space in comment.
925 (enum point_type): New.
926 (sparseset_contains_pseudos_p): New function.
927 (update_pseudo_point): Likewise.
928 (make_hard_regno_live): Use HARD_REGISTER_NUM_P macro.
929 (make_hard_regno_dead): Likewise. Remove ignore_reg_for_conflicts
930 handling. Move early exit after adding conflicts.
931 (mark_pseudo_live): Use HARD_REGISTER_NUM_P macro. Add early exit
932 if regno is already live. Remove all handling of program points.
933 (mark_pseudo_dead): Use HARD_REGISTER_NUM_P macro. Add early exit
934 after adding conflicts. Remove all handling of program points and
935 ignore_reg_for_conflicts.
936 (mark_regno_live): Use HARD_REGISTER_NUM_P macro. Remove return value
937 and do not guard call to mark_pseudo_live.
938 (mark_regno_dead): Use HARD_REGISTER_NUM_P macro. Remove return value
939 and do not guard call to mark_pseudo_dead.
940 (check_pseudos_live_through_calls): Use HARD_REGISTER_NUM_P macro.
941 (process_bb_lives): Use HARD_REGISTER_NUM_P and HARD_REGISTER_P macros.
942 Use new function update_pseudo_point. Handle register copies by
943 removing the source register from the live set. Handle INOUT operands.
944 Update to the next program point using the unused_set, dead_set and
946 (lra_create_live_ranges_1): Use HARD_REGISTER_NUM_P macro.
948 2018-11-13 David Malcolm <dmalcolm@redhat.com>
950 * builtins.c: Replace "source_location" with "location_t".
951 * diagnostic-show-locus.c: Likewise.
952 * diagnostic.c: Likewise.
953 * dumpfile.c: Likewise.
954 * gcc-rich-location.h: Likewise.
955 * genmatch.c: Likewise.
956 * gimple.h: Likewise.
957 * gimplify.c: Likewise.
959 * input.h: Likewise. Eliminate the typedef.
960 * omp-expand.c: Likewise.
961 * selftest.h: Likewise.
962 * substring-locations.h (get_source_location_for_substring):
964 (get_location_within_string): ...this.
965 * tree-cfg.c: Replace "source_location" with "location_t".
966 * tree-cfgcleanup.c: Likewise.
967 * tree-diagnostic.c: Likewise.
968 * tree-into-ssa.c: Likewise.
969 * tree-outof-ssa.c: Likewise.
970 * tree-parloops.c: Likewise.
971 * tree-phinodes.c: Likewise.
972 * tree-phinodes.h: Likewise.
973 * tree-ssa-loop-ivopts.c: Likewise.
974 * tree-ssa-loop-manip.c: Likewise.
975 * tree-ssa-phiopt.c: Likewise.
976 * tree-ssa-phiprop.c: Likewise.
977 * tree-ssa-threadupdate.c: Likewise.
978 * tree-ssa.c: Likewise.
979 * tree-ssa.h: Likewise.
980 * tree-vect-loop-manip.c: Likewise.
982 2018-11-13 Michael Ploujnikov <michael.ploujnikov@oracle.com>
984 * doc/extend.texi: Fix typo in the weakref description.
986 2018-11-13 Richard Biener <rguenther@suse.de>
988 PR tree-optimization/86991
989 * tree-vect-loop.c (vect_is_slp_reduction): Delay reduction
990 group building until we have successfully detected the SLP
992 (vect_is_simple_reduction): Remove fixup code here.
994 2018-11-13 David Malcolm <dmalcolm@redhat.com>
996 * dumpfile.c (VERIFY_DUMP_ENABLED_P): New macro.
997 (dump_gimple_stmt): Use it.
998 (dump_gimple_stmt_loc): Likewise.
999 (dump_gimple_expr): Likewise.
1000 (dump_gimple_expr_loc): Likewise.
1001 (dump_generic_expr): Likewise.
1002 (dump_generic_expr_loc): Likewise.
1003 (dump_printf): Likewise.
1004 (dump_printf_loc): Likewise.
1005 (dump_dec): Likewise.
1006 (dump_dec): Likewise.
1007 (dump_hex): Likewise.
1008 (dump_symtab_node): Likewise.
1009 * gimple-loop-interchange.cc (tree_loop_interchange::interchange):
1010 Guard dump call with dump_enabled_p.
1011 * graphite-isl-ast-to-gimple.c (graphite_regenerate_ast_isl): Likewise.
1012 * graphite-optimize-isl.c (optimize_isl): Likewise.
1013 * graphite.c (graphite_transform_loops): Likewise.
1014 * tree-loop-distribution.c (pass_loop_distribution::execute): Likewise.
1015 * tree-parloops.c (parallelize_loops): Likewise.
1016 * tree-ssa-loop-niter.c (number_of_iterations_exit): Likewise.
1017 * tree-vect-data-refs.c (vect_analyze_group_access_1): Likewise.
1018 (vect_prune_runtime_alias_test_list): Likewise.
1019 * tree-vect-loop.c (vect_update_vf_for_slp): Likewise.
1020 (vect_estimate_min_profitable_iters): Likewise.
1021 * tree-vect-slp.c (vect_record_max_nunits): Likewise.
1022 (vect_build_slp_tree_2): Likewise.
1023 (vect_supported_load_permutation_p): Likewise.
1024 (vect_slp_analyze_operations): Likewise.
1025 (vect_slp_analyze_bb_1): Likewise.
1026 (vect_slp_bb): Likewise.
1027 * tree-vect-stmts.c (vect_analyze_stmt): Likewise.
1028 * tree-vectorizer.c (try_vectorize_loop_1): Likewise.
1029 (pass_slp_vectorize::execute): Likewise.
1030 (increase_alignment): Likewise.
1032 2018-11-13 David Malcolm <dmalcolm@redhat.com>
1035 * ipa-inline.c (report_inline_failed_reason): Guard calls to
1036 cl_target_option_print_diff and cl_optimization_print_diff with
1039 2018-11-13 David Malcolm <dmalcolm@redhat.com>
1041 * doc/invoke.texi (-fsave-optimization-record): Note that the
1042 output is compressed.
1043 * optinfo-emit-json.cc: Include <zlib.h>.
1044 (optrecord_json_writer::write): Compress the output.
1046 2018-11-13 Aldy Hernandez <aldyh@redhat.com>
1048 * tree-vrp.c (value_range_base::dump): Dump type.
1049 Do not use INF nomenclature for 1-bit types.
1050 (dump_value_range): Group all variants to common dumping code.
1051 (debug): New overloaded functions for value_ranges.
1052 (value_range_base::dump): Remove no argument version.
1053 (value_range::dump): Same.
1055 2018-11-13 Richard Biener <rguenther@suse.de>
1057 PR tree-optimization/87931
1058 * tree-vect-loop.c (vect_is_simple_reduction): Restrict
1059 nested cycles we support to latch computations vectorizable_reduction
1062 2018-11-13 Martin Liska <mliska@suse.cz>
1064 PR tree-optimization/87885
1065 * cfghooks.c (account_profile_record): Rename
1067 (profile_record_check_consistency): ... this.
1068 Calculate missing num_mismatched_freq_in.
1069 (profile_record_account_profile): New function
1070 that calculates time and size of a function.
1071 * cfghooks.h (struct profile_record): Remove
1073 (struct cfg_hooks): Remove after_pass flag.
1074 (account_profile_record): Rename to ...
1075 (profile_record_check_consistency): ... this.
1076 (profile_record_account_profile): New.
1077 * cfgrtl.c (rtl_account_profile_record): Remove
1079 * passes.c (check_profile_consistency): Do only
1081 (account_profile): Calculate size and time of
1083 (pass_manager::dump_profile_report): Reformat
1085 (execute_one_ipa_transform_pass): Call
1086 consistency check before clean upand call account_profile
1087 after a clean up is done.
1088 (execute_one_pass): Call check_profile_consistency and
1089 account_profile instead of using after_pass flag..
1090 * tree-cfg.c (gimple_account_profile_record): Likewise.
1092 2018-11-13 Martin Liska <mliska@suse.cz>
1095 * config/i386/i386.c (ix86_option_override_internal): Error
1096 about usage -mabi=ms and -fsanitize={,kernel-}address.
1098 2018-11-13 Andre Vieira <andre.simoesdiasvieira@arm.com>
1100 * config/aarch64/aarch64.c
1101 (aarch64_vectorize_preferred_vector_alignment): Change return type to
1103 (aarch64_simd_vector_alignment_reachable): Adapt to preferred vector
1104 alignment being a poly int.
1105 * doc/tm.texi (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Change
1106 return type to poly_uint64.
1107 * target.def (default_preferred_vector_alignment): Likewise.
1108 * targhooks.c (default_preferred_vector_alignment): Likewise.
1109 * targhooks.h (default_preferred_vector_alignment): Likewise.
1110 * tree-vect-data-refs.c (vect_calculate_target_alignment): Likewise.
1111 (vect_compute_data_ref_alignment): Adapt to vector alignment being a
1113 (vect_update_misalignment_for_peel): Likewise.
1114 (vect_enhance_data_refs_alignment): Likewise.
1115 (vect_find_same_alignment_drs): Likewise.
1116 (vect_duplicate_ssa_name_ptr_info): Likewise.
1117 (vect_setup_realignment): Likewise.
1118 (vect_can_force_dr_alignment_p): Change alignment parameter type to
1120 * tree-vect-loop-manip.c (get_misalign_in_elems): Learn to construct a
1121 mask with a compile time variable vector alignment.
1122 (vect_gen_prolog_loop_niters): Adapt to vector alignment being a poly
1124 (vect_do_peeling): Exit early if vector alignment is not constant.
1125 * tree-vect-stmts.c (ensure_base_align): Adapt to vector alignment being
1127 (vectorizable_store): Likewise.
1128 (vectorizable_load): Likweise.
1129 * tree-vectorizer.h (struct dr_vec_info): Make target_alignment field a
1131 (vect_known_alignment_in_bytes): Adapt to vector alignment being a
1133 (vect_can_force_dr_alignment_p): Change alignment parameter type to
1136 2018-11-13 Richard Biener <rguenther@suse.de>
1138 PR tree-optimization/87962
1139 * tree-vect-loop.c (vect_is_simple_reduction): More reliably
1140 detect outer reduction for disqualifying in-loop uses.
1142 2018-11-13 Richard Biener <rguenther@suse.de>
1144 PR tree-optimization/87967
1145 * tree-vect-loop.c (vect_transform_loop): Also copy PHIs
1146 for constants for the scalar loop.
1148 2018-11-13 Alan Modra <amodra@gmail.com>
1150 * config/rs6000/linux64.h (ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Exclude
1151 integer constants when -mcmodel=medium.
1153 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
1155 * config/arc/arc.h (FUNCTION_PROFILER): Redefine to empty.
1156 * config/arc/elf.h (PROFILE_HOOK): Define.
1157 * config/arc/linux.h (PROFILE_HOOK): Likewise.
1159 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
1161 * config/arc/arc.c (hwloop_optimize): Bailout when detecting a
1162 jump table data in the text section.
1164 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
1166 * config/arc/arc.c (arc_eh_return_address_location): Repurpose it
1167 to fit the eh_return pattern.
1168 * config/arc/arc.md (eh_return): Define.
1169 (VUNSPEC_ARC_EH_RETURN): Likewise.
1170 * config/arc/arc-protos.h (arc_eh_return_address_location): Match
1172 * config/arc/arc.h (EH_RETURN_HANDLER_RTX): Remove it.
1175 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
1177 * common/config/arc/arc-common.c (arc_option_optimization_table):
1178 Millicode optimization is default on for size optimizations.
1179 * config/arc/arc-protos.h (arc_check_multi): New function.
1180 * config/arc/arc.c (RTX_OK_FOR_OFFSET_P): Rearange.
1181 (ENTER_LEAVE_START_REG): Define.
1182 (ENTER_LEAVE_END_REG): Likewise.
1183 (arc_override_options): Disable millicode when long calls option
1185 (arc_frame_info): Change it from int to bool.
1186 (arc_compute_frame_size): Clean up.
1187 (arc_save_restore): Remove.
1188 (frame_save_reg): New function.
1189 (frame_restore_reg): Likewise.
1190 (arc_enter_leave_p): Likewise.
1191 (arc_save_callee_saves): Likewise.
1192 (arc_restore_callee_saves): Likewise.
1193 (arc_save_callee_enter): Likewise.
1194 (arc_restore_callee_leave): Likewise.
1195 (arc_save_callee_milli): Likewise.
1196 (arc_restore_callee_milli): Likewise.
1197 (arc_expand_prologue): Reimplement to emit enter/leave
1199 (arc_expand_epilogue): Likewise.
1200 (arc_check_multi): New function.
1201 * config/arc/arc.md (push_multi_fp): New pattern.
1202 (push_multi_fp_blink): Likewise.
1203 (pop_multi_fp): Likewise.
1204 (pop_multi_fp_blink): Likewise.
1205 (pop_multi_fp_ret): Likewise.
1206 (pop_multi_fp_blink_ret): Likewise.
1207 * config/arc/arc.opt (mmillicode): Update option.
1208 (mcode-density-frame): New option.
1209 * config/arc/predicates.md (push_multi_operand): New predicate.
1210 (pop_multi_operand): Likewise.
1211 * doc/invoke.texi (ARC): Update ARC options information.
1214 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
1216 * config/arc/arc-protos.h (gen_operands_ldd_std): Add.
1217 * config/arc/arc.c (operands_ok_ldd_std): New function.
1218 (mem_ok_for_ldd_std): Likewise.
1219 (gen_operands_ldd_std): Likewise.
1220 * config/arc/arc.md: Add peephole2 rules for std/ldd.
1222 2018-11-13 Eric Botcazou <ebotcazou@adacore.com>
1224 * toplev.c (output_stack_usage): Turn test on flag_stack_usage into
1225 test on stack_usage_file.
1226 (lang_dependent_init): Do not open the .su file if generating LTO.
1228 2018-11-13 Jakub Jelinek <jakub@redhat.com>
1230 PR rtl-optimization/87918
1231 * simplify-rtx.c (simplify_merge_mask): For COMPARISON_P, use
1232 simplify_gen_relational rather than simplify_gen_binary.
1234 2018-11-13 Richard Biener <rguenther@suse.de>
1236 * tree-ssanames.h (set_range_info): Use value_range_base.
1237 (get_range_info): Likewise.
1238 * tree-ssanames.c (set_range_info): Likewise.
1239 (get_range_info): Likewise.
1240 * tree-vrp.c (value_range_base::union_helper): Split
1241 out common parts of value_range[_base]::union_.
1242 (value_range_base::union_): Update.
1243 (value_range::union_): Likewise.
1244 (determine_value_range_1): Use value_range_base.
1245 (determine_value_range): Likewise.
1246 * tree-vrp.h (value_range_base::union_helper): Move ...
1247 (value_range::union_helper): ... from here.
1249 2018-11-13 Alan Modra <amodra@gmail.com>
1251 * config/rs6000/rs6000.c (rs6000_secondary_reload_inner): Negate
1253 (rs6000_secondary_reload_gpr): Don't call find_replacement.
1255 2018-11-13 Sandra Loosemore <sandra@codesourcery.com>
1258 * doc/invoke.texi (Optimize Options): Clarify that the
1259 l1-cache-line-size, l1-cache-size, and l2-cache-size parameters
1260 apply to data cache size.
1262 2018-11-13 Alan Modra <amodra@gmail.com>
1264 * config/rs6000/predicates.md (logical_const_operand),
1265 (logical_operand): Correct comment.
1266 * config/rs6000/rs6000.c (rs6000_emit_prologue): Comment fix.
1268 2018-11-13 Alan Modra <amodra@gmail.com>
1270 * config/rs6000/rs6000.md (addsi3_high): Prefix with '*'.
1272 2018-11-13 Alan Modra <amodra@gmail.com>
1274 * gcc/doc/md.texi (Machine Constraints): Correct rs6000 h constraint
1276 * config/rs6000/rs6000.md (movsi_internal1): Delete MT%0 case
1277 covered by alternative.
1278 (movcc_internal1): Ignore h for register preference.
1279 (mov<mode>_hardfloat64): Likewise.
1280 (mov<mode>_softfloat): Ignore c, l, h for register preference.
1282 2018-11-12 Sandra Loosemore <sandra@codesourcery.com>
1284 PR preprocessor/47823
1285 * doc/cpp.texi (Alternatives to Wrapper #ifndef): Move #pragma once
1288 * doc/extend.texi (Pragmas): Note additional pragmas documented
1291 2018-11-13 Kugan Vivekanandarajah <kuganv@linaro.org>
1295 * tree-scalar-evolution.c (expression_expensive_p): Make
1296 BUILTIN POPCOUNT as expensive when backend does not define it.
1298 2018-11-12 Fredrik Noring <noring@nocrew.org>
1300 * config.gcc: Update with-llsc defaults for MIPS r5900.
1302 2018-11-12 Martin Liska <mliska@suse.cz>
1304 PR gcov-profile/87442
1305 * common.opt: Add -fprofile-filter-files and -fprofile-exclude-files
1307 * doc/invoke.texi: Document them.
1308 * tree-profile.c (parse_profile_filter): New.
1309 (parse_profile_file_filtering): Likewise.
1310 (release_profile_file_filtering): Likewise.
1311 (include_source_file_for_profile): Likewise.
1312 (tree_profiling): Filter source files based on the
1313 newly added options.
1315 2018-11-12 Martin Liska <mliska@suse.cz>
1318 * doc/extend.texi: Add missing values for __builtin_cpu_is and
1319 __builtin_cpu_supports for x86 target.
1321 2018-11-12 Sandra Loosemore <sandra@codesourcery.com>
1324 * doc/rtl.texi (Constants): Clarify that mode of "high" doesn't
1326 (Arithmetic): Likewise for "lo_sum".
1328 2018-11-12 Renlin Li <renlin.li@arm.com>
1331 * dse.c (get_stored_val): Add check for compile-time constantness
1334 2018-11-12 Sudakshina Das <sudi.das@arm.com>
1336 * config/arm/arm-cpus.in (armv8_5, sb, predres): New features.
1337 (ARMv8_5a): New fgroup.
1338 (armv8.5-a): New arch.
1339 (armv8-a, armv8.1-a, armv8.2-a, armv8.3-a, armv8.4-a): New options
1341 * config/arm/arm-tables.opt: Regenerate.
1342 * config/arm/t-aprofile: Add matching rules for -march=armv8.5-a
1343 * config/arm/t-arm-elf (all_v8_archs): Add armv8.5-a.
1344 * config/arm/t-multilib (v8_5_a_simd_variants): New variable.
1345 Add matching rules for -march=armv8.5-a and extensions.
1346 * doc/invoke.texi (ARM options): Document -march=armv8.5-a.
1347 Add sb and predres to all armv8-a except armv8.5-a.
1349 2018-11-12 Richard Biener <rguenther@suse.de>
1351 * tree-vrp.h (value_range[_base]::set): Make public. Provide
1352 overload for single value.
1353 (value_range[_base]::set_nonnull): New.
1354 (value_range[_base]::set_null): Likewise.
1355 (value_range): Document bitmap copying behavior, mark
1356 copy constructor and assignment operator deleted.
1357 (value_range::move): New.
1358 (value_range::set_and_canonicalize): Default bitmap to zero.
1359 (set_value_range_to_nonnull): Remove.
1360 (set_value_range_to_null): Likewise.
1361 (set_value_range): Likewise.
1362 (set_value_range_to_value): Likewise.
1363 (extract_range_from_unary_expr): Work on value_range_base.
1364 (extract_range_from_binary_expr_1): Likewise. Rename to...
1365 (extract_range_from_binary_expr): ... this.
1366 * tree-vrp.c (value_range::update): Clear equiv bitmap
1368 (value_range::move): New, move equiv bitmap.
1369 (value_range_base::set_undefined): Avoid assignment.
1370 (value_range::set_undefined): Likewise.
1371 (value_range_base::set_varying): Likewise.
1372 (value_range::set_varying): Likewise.
1373 (set_value_range): Remove.
1374 (value_range_base::set): New overload for value.
1375 (value_range::set): Likewise.
1376 (set_value_range_to_nonnull): Remove.
1377 (value_range_base::set_nonnull): New.
1378 (value_range::set_nonnull): Likewise.
1379 (set_value_range_to_null): Remove.
1380 (value_range_base::set_null): New.
1381 (value_range::set_null): Likewise.
1382 (range_is_null): Work on value_range_base.
1383 (range_is_nonnull): Likewise.
1384 (ranges_from_anti_range): Likewise.
1385 (extract_range_into_wide_ints): Likewise.
1386 (extract_range_from_multiplicative_op): Likewise.
1387 (extract_range_from_binary_expr): Likewise. Update for API changes.
1388 (extract_range_from_unary_expr): Likewise. Remove OBJ_TYPE_REF
1390 (value_range::intersect_helper): Avoid copy and assignment.
1391 (value_range::union_helper): Likewise.
1392 (determine_value_range_1): Adjust.
1393 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::try_find_new_range):
1394 Avoid assignment by using move.
1395 (evrp_range_analyzer::record_ranges_from_stmt): Avoid assignment.
1396 * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
1398 * tree-ssanames.c (get_range_info): Likewise.
1399 * vr-values.h (vr_values::get_vr_for_comparison): Adjust API.
1400 * vr-values.c (vr_values::get_value_range): Adjust.
1401 (vr_values::update_value_range): Likewise.
1402 (symbolic_range_based_on_p): Work on value_range_base.
1403 (vr_values::extract_range_from_binary_expr): Use value_range_base.
1404 (vr_values::extract_range_from_unary_expr): Likewise.
1405 (vr_values::extract_range_from_cond_expr): Avoid assignment.
1406 (vr_values::extract_range_from_comparison): Adjust.
1407 (vr_values::check_for_binary_op_overflow): Use value_range_base.
1408 (vr_values::extract_range_basic): Adjust.
1409 (vr_values::adjust_range_with_scev): Likewise.
1410 (vr_values::vrp_visit_assignment_or_call): Likewise.
1411 (vr_values::get_vr_for_comparison): Change API to avoid
1412 assignment and copy construction.
1413 (vr_values::compare_name_with_value): Adjust accordingly.
1414 (vr_values::compare_names): Likewise.
1415 (vr_values::extract_range_from_phi_node): Avoid assignment and
1416 bogus in-place modify of equiv bitmap.
1417 (vr_values::simplify_bit_ops_using_ranges): Use value_range_base.
1418 * ipa-prop.c (ipa_compute_jump_functions_for_edge): Adjust
1419 for extract_range_from_unary_expr API change.
1420 * ipa-cp.c (ipa_vr_operation_and_type_effects): Likewise.
1422 2018-11-12 Eric Botcazou <ebotcazou@adacore.com>
1424 * config/mcore/mcore.h (WORD_REGISTER_OPERATIONS): Remove duplicate.
1426 2018-11-12 Richard Biener <rguenther@suse.de>
1428 * tree-vrp.h (value_range_base::symbolic_p,
1429 value_range_base::constant_p, value_range_base::zero_p,
1430 value_range_base::singleton_p): Move from value_range.
1431 (value_range::dump): Add.
1432 * gimple-ssa-evrp-analyze.c
1433 (evrp_range_analyzer::record_ranges_from_phis): Use set_varying.
1434 * ipa-cp.c (ipcp_vr_lattice::print): Use dump_value_range.
1435 * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
1437 * tree-vrp.c (value_range::symbolic_p): Move to value_range_base.
1438 (value_range::constant_p): Likewise.
1439 (value_range::singleton_p): Likewise.
1440 (value_range_base::dump): Add.
1441 (set_value_range_to_undefined): Remove.
1442 (set_value_range_to_varying): Likewise.
1443 (range_int_cst_p): Take value_range_base argument.
1444 (range_int_cst_singleton_p): Likewise.
1445 (value_range_constant_singleton): Likewise.
1446 (vrp_set_zero_nonzero_bits): Likewise.
1447 (extract_range_from_multiplicative_op): Use set_varying.
1448 (extract_range_from_binary_expr_1): Likewise. Use set_undefined.
1449 (extract_range_from_unary_expr): Likewise.
1450 (dump_value_range_base): Change to overload of dump_value_range.
1451 (vrp_prop::vrp_initialize): Use set_varying and set_undefined.
1452 (vrp_prop::visit_stmt): Likewise.
1453 (value_range::intersect_helper): Likewise.
1454 (value_range::union_helper): Likewise.
1455 (determine_value_range_1): Likewise.
1457 2018-11-12 Richard Biener <rguenther@suse.de>
1459 * tree-vrp.c (set_value_range_to_nonnull): Clear equiv.
1460 (set_value_range_to_null): Likewise.
1461 * vr-values.c (vr_values::extract_range_from_comparison):
1462 Clear equiv for constant singleton ranges.
1464 2018-11-12 Wei Xiao <wei3.xiao@intel.com>
1466 * config/i386/sse.md: Combine VFIXUPIMM* patterns
1467 (<avx512>_fixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
1468 (<avx512>_fixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
1469 (<avx512>_fixupimm<mode>_mask<round_saeonly_name>): Remove.
1470 (avx512f_sfixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
1471 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
1472 (avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Remove.
1474 2018-11-11 Sandra Loosemore <sandra@codesourcery.com>
1477 * doc/extend.texi (Common Type Attributes): For the align type
1478 attribute, copy language about decreasing alignment from the
1479 corresponding variable attribute.
1481 2018-11-11 Xianmiao Qu <xianmiao_qu@c-sky.com>
1483 * config/csky/csky.md (*fpuv2_nmulsf3_1, *fpuv2_nmuldf3_1): Handle
1486 2018-11-11 Sandra Loosemore <sandra@codesourcery.com>
1489 * doc/invoke.texi (C++ Dialect Options): Add warning about mixing
1490 -frtti and -fno-rtti code.
1492 2018-11-11 Sandra Loosemore <sandra@codesourcery.com>
1495 * doc/extend.texi (Other Builtins): Document probability associated
1496 with __builtin_expect.
1498 2018-11-11 Uros Bizjak <ubizjak@gmail.com>
1501 * config/i386/i386.h (STACK_BOUNDARY): Use TARGET_64BIT_MS_ABI
1502 instead of (TARGET_64BIT && ix86_abi == MS_ABI).
1503 * config/i386/darwin.h (STACK_BOUNDARY): Ditto.
1504 * config/i386/cygming.h (STACK_BOUNDARY): Remove.
1506 2018-11-11 Xianmiao Qu <xianmiao_qu@c-sky.com>
1508 * config/csky/csky-linux-elf.h (CC1_SPEC): Support -profile.
1510 2018-11-11 Xianmiao Qu <xianmiao_qu@c-sky.com>
1512 * config/csky/csky.h (ASM_PREFERRED_EH_DATA_FORMAT): Define.
1514 2018-11-11 Richard Biener <rguenther@suse.de>
1516 * tree-vrp.h (class value_range_base): New base class for
1517 value_range containing all but the m_equiv member.
1518 (dump_value_range_base): Add.
1519 (range_includes_zero_p): Work on value_range_base.
1520 * tree-vrp.c (value_range_base::set): Split out base handling
1522 (value_range::set): this.
1523 (value_range::set_equiv): New.
1524 (value_range_base::value_range_base): New constructors.
1525 (value_range_base::check): Split out base handling from...
1526 (value_range::check): this.
1527 (value_range::equal_p): Refactor in terms of
1528 ignore_equivs_equal_p which is now member of the base.
1529 (value_range_base::set_undefined): New.
1530 (value_range_base::set_varying): Likewise.
1531 (value_range_base::dump):Split out base handling from...
1532 (value_range::dump): this.
1533 (value_range_base::set_and_canonicalize): Split out base handling
1535 (value_range::set_and_canonicalize): this.
1536 (value_range_base::union_): New.
1537 * ipa-prop.h (struct ipa_jump_func): Use value_range_base *
1539 * ipa-cp.c (class ipcp_vr_lattice): Use value_range_base
1540 instead of value_range everywhere.
1541 (ipcp_vr_lattice::print): Use dump_value_range_base.
1542 (ipcp_vr_lattice::meet_with): Adjust.
1543 (ipcp_vr_lattice::meet_with_1): Likewise.
1544 (ipa_vr_operation_and_type_effects): Likewise.
1545 (propagate_vr_across_jump_function): Likewise.
1546 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Likewise.
1547 (ipa_get_value_range): Likewise.
1548 (ipa_set_jfunc_vr): Likewise.
1549 (ipa_compute_jump_functions_for_edge): Likewise.
1551 2018-11-10 Sandra Loosemore <sandra@codesourcery.com>
1554 * doc/invoke.texi (Optimize Options): Add @opindex entries
1555 for the positive forms of -fno-xxx and -mno-xxx options
1556 that were lacking them.
1558 2018-11-10 Segher Boessenkool <segher@kernel.crashing.org>
1560 * combine.c (make_more_copies): Only make an intermediate copy if the
1561 dest of a move is a pseudo.
1563 2018-11-09 Maya Rashish <coypu@sdf.org>
1566 * config/netbsd-elf.h (NETBSD_STARTFILE_SPEC): Use crtbeginS.o for PIE.
1567 (NETBSD_ENDFILE_SPEC): Use crtendS.o for PIE.
1569 2018-11-09 Sandra Loosemore <sandra@codesourcery.com>
1573 * doc/invoke.texi (Optimize Options): Clarify default behavior
1574 for -fno-toplevel-reorder, -fno-defer-pop, and -fno-branch-count-reg.
1576 2018-11-09 Bernd Edlinger <bernd.edlinger@hotmail.de>
1578 PR tree-optimization/87940
1579 * expr.c (string_constant): Don't strip NOPS in subexpressions.
1580 Fold PLUS_EXPR correctly.
1582 2018-11-09 Ilya Leoshkevich <iii@linux.ibm.com>
1585 * config/s390/s390.c (s390_safe_relative_long_p): New function.
1586 (annotate_constant_pool_refs): Skip insns which support
1587 relative addressing.
1588 (annotate_constant_pool_refs_1): New helper function.
1589 (find_constant_pool_ref): Skip insns which support relative
1591 (find_constant_pool_ref_1): New helper function.
1592 (replace_constant_pool_ref): Skip insns which support
1593 relative addressing.
1594 (replace_constant_pool_ref_1): New helper function.
1595 (s390_mainpool_start): Adapt to the new signature.
1596 (s390_mainpool_finish): Likewise.
1597 (s390_chunkify_start): Likewise.
1598 (s390_chunkify_finish): Likewise.
1599 (pass_s390_early_mach::execute): Likewise.
1600 (s390_prologue_plus_offset): Likewise.
1601 (s390_emit_prologue): Likewise.
1602 (s390_emit_epilogue): Likewise.
1604 2018-11-09 Jakub Jelinek <jakub@redhat.com>
1606 * gimplify.c (gimplify_scan_omp_clauses): Call sorry_at for valid
1607 but unsupported lastprivate with conditional modifier.
1609 2018-11-09 Jeff Law <law@redhat.com>
1611 * config/mips/mips.c (mips_loongson_ext2_prefetch_cookie): Handle
1612 unused argument better. Add gcc_unreachable to silence warning.
1614 2018-11-09 Martin Sebor <msebor@redhat.com>
1617 * attribs.c (has_attribute): New helper function.
1618 (decls_mismatched_attributes, maybe_diag_alias_attributes): Same.
1619 * attribs.h (decls_mismatched_attributes): Declare.
1620 * cgraphunit.c (handle_alias_pairs): Call maybe_diag_alias_attributes.
1621 (maybe_diag_incompatible_alias): Use OPT_Wattribute_alias_.
1622 * common.opt (-Wattribute-alias): Take an argument.
1623 (-Wno-attribute-alias): New option.
1624 * doc/extend.texi (Common Function Attributes): Document copy.
1625 (Common Variable Attributes): Same.
1626 * doc/invoke.texi (-Wmissing-attributes): Document enhancement.
1627 (-Wattribute-alias): Document new option argument.
1629 2018-11-09 Richard Earnshaw <rearnsha@arm.com>
1631 * config/arm/parsecpu.awk (/alias/): Tighten invisible alias
1632 matching criteria. Remove unused array initializer.
1634 2018-11-09 Bill Schmidt <wschmidt@linux.ibm.com>
1635 Jinsong Ji <jji@us.ibm.com>
1637 * config/rs6000/xmmintrin.h (_mm_cvtss_si32): Fix incorrect
1638 constraints by introducing a new temporary.
1639 (_mm_cvtss_si64): Likewise.
1641 2018-11-09 Martin Liska <mliska@suse.cz>
1643 * common.opt: Add -fipa-stack-alignment flag.
1644 * doc/invoke.texi: Document it.
1645 * final.c (rest_of_clean_state): Guard stack
1646 shrinking with flag.
1648 2018-11-09 Martin Liska <mliska@suse.cz>
1650 * cgraph.h (ipa_discover_readonly_nonaddressable_vars): Rename
1652 (ipa_discover_variable_flags): ... this.
1653 * common.opt: Come up with new flag -fipa-reference-addressable.
1654 * doc/invoke.texi: Document it.
1655 * ipa-reference.c (propagate): Call the renamed fn.
1656 * ipa-visibility.c (whole_program_function_and_variable_visibility):
1658 * ipa.c (ipa_discover_readonly_nonaddressable_vars): Renamed to
1660 (ipa_discover_variable_flags): ... this. Discover
1661 non-addressable variables only with the newly added flag.
1662 * opts.c: Enable the newly added flag with -O1 and higher
1665 2018-11-09 David Malcolm <dmalcolm@redhat.com>
1667 * json.cc (selftest::test_writing_literals): Fix comment.
1669 2018-11-09 Martin Liska <mliska@suse.cz>
1671 * config/aarch64/aarch64.c (aarch64_parse_arch): Do not copy
1672 string to a stack buffer.
1673 (aarch64_parse_cpu): Likewise.
1674 (aarch64_parse_tune): Likewise.
1676 2018-11-09 Richard Biener <rguenther@suse.de>
1678 PR tree-optimization/87953
1679 * tree-vect-loop.c (vectorizable_reduction): For analysis
1680 always pass ops[0] to vectorizable_condition.
1682 2018-11-09 Stafford Horne <shorne@gmail.com>
1683 Richard Henderson <rth@twiddle.net>
1684 Joel Sherrill <joel@rtems.org>
1686 * common/config/or1k/or1k-common.c: New file.
1687 * config/or1k/*: New.
1688 * config.gcc (or1k*-*-*): New.
1689 * configure.ac (or1k*-*-*): New test for openrisc tls.
1690 * configure: Regenerated.
1691 * doc/install.texi: Document OpenRISC triplets.
1692 * doc/invoke.texi: Document OpenRISC arguments.
1693 * doc/md.texi: Document OpenRISC.
1695 2018-11-09 Richard Earnshaw <rearnsha@arm.com>
1697 * config/arm/arm-cpus.in (arm7tdmi): Add an alias for arm7tdmi-s.
1698 (arm7tdmi-s): Delete CPU.
1699 (arm710t): Add aliases for arm720t and arm740t.
1700 (arm720t, arm740t): Delete CPUs.
1701 (arm920t): Add aliases for arm920, arm922t and arm940t.
1702 (arm920, arm922t, arm940t): Delete CPUs.
1703 (arm10tdmi): Add alias for arm1020t.
1704 (arm1020t): Delete CPU.
1705 (arm9e): Add aliases for arm946e-s, arm966e-s and arm968e-s.
1706 (arm946e-s, arm966e-s, arm968e-s): Delete CPUs.
1707 (arm10e): Add aliases for arm1020e and arm1022e.
1708 (arm1020e, arm1022e): Delete CPU.
1709 * config/arm/arm.md (generic_sched): Remove entries that are now
1711 (generic_vfp): Likewise.
1712 * config/arm/arm1020e.md: Simplify tuning selection based on alias
1714 * config/arm/arm-tune.md: Regenerated.
1715 * config/arm/arm-tables.opt: Regenerated.
1717 2018-11-09 Richard Biener <rguenther@suse.de>
1719 PR tree-optimization/87621
1720 * tree-vect-loop.c (vectorizable_reduction): Handle reduction
1721 op with only phi inputs.
1722 * tree-ssa-loop-ch.c: Include tree-ssa-sccvn.h.
1723 (ch_base::copy_headers): Run CSE on copied loop headers.
1724 (pass_ch_vect::process_loop_p): Simplify.
1726 2018-11-09 Alexandre Oliva <oliva@adacore.com>
1728 * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Adjust
1729 for non-w64 x86_64 biarch.
1731 2018-11-09 Alexandre Oliva <aoliva@redhat.com>
1733 PR rtl-optimization/86438
1734 * compare-elim.c (try_eliminate_compare): Use SET_SRC instead
1735 of in_b for the compare if in_b is SET_DEST.
1738 * config/i386/i386.c (ix86_const_not_ok_for_debug_p): Reject
1739 non-toplevel UNSPEC.
1741 2018-11-08 Aldy Hernandez <aldyh@redhat.com>
1743 * tree-vrp.c (value_range::check): Do not access internals
1745 (value_range::singleton_p): Same.
1746 (value_range::type): Same.
1747 (vrp_finalize): Use value_range API.
1749 2018-11-08 Aldy Hernandez <aldyh@redhat.com>
1751 * tree-vrp.c (may_contain_p): Do not access m_min/m_max directly.
1753 2018-11-08 Aldy Hernandez <aldyh@redhat.com>
1755 * vr-values.c (vr_values::get_value_range): Use value_range API
1756 instead of piecing together ranges.
1757 (vr_values::update_value_range): Same.
1759 2018-11-08 Aldy Hernandez <aldyh@redhat.com>
1761 * gimple-fold.c (size_must_be_zero_p): Use value_range API instead
1762 of performing ad-hoc calculations.
1763 * tree-ssanames.c (set_range_info): New overloaded function
1764 accepting value_range &.
1765 (get_range_info): Same.
1766 * tree-ssanames.h (set_range_info_raw): Remove.
1767 (set_range_info): New prototype.
1768 (get_range_info): Same.
1769 * tree-vrp.h (value_range::null_p): Rename to zero_p.
1770 * tree-vrp.c (value_range::null_p): Same.
1772 2018-11-09 Jan Hubicka <jh@suse.cz>
1774 * tree.c (fld_type_variant_equal_p): Test user align flag.
1775 (flt_type_variant): Copy user align flag.
1776 (fld_incomplete_type_of): Clear it.
1778 2018-11-09 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1780 * config/arm/neon.md (div<mode>3): New pattern.
1782 2018-11-08 Andi Kleen <ak@linux.intel.com>
1784 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PTWRITE_SET): New.
1785 (OPTION_MASK_ISA_PTWRITE_UNSET): New.
1786 (ix86_handle_option): Handle OPT_mptwrite.
1787 * config/i386/cpuid.h (bit_PTWRITE): Add.
1788 * config/i386/driver-i386.c (host_detect_local_cpu): Detect ptwrite.
1789 * config/i386/i386-builtin.def (BDESC): Add ptwrite32/64.
1790 * config/i386/i386-c.c (ix86_target_macros_internal): Define __PTWRITE__.
1791 * config/i386/i386.c (ix86_target_string): Handle ptwrite.
1792 (ix86_option_override_internal): Handle PTA_PTWRITE.
1793 (ix86_valid_target_attribute_inner_p): Define ptwrite.
1794 (def_builtin2): Force UINT64 to be 64bit only.
1795 * config/i386/i386.h (TARGET_PTWRITE): Add.
1796 (TARGET_PTWRITE_P): Add.
1798 * config/i386/i386.md: Define ptwrite.
1799 * config/i386/i386.opt: Add -mptwrite.
1800 * config/i386/immintrin.h (_ptwrite64): Add.
1802 * doc/extend.texi: Document __builtin_ia32_ptwrite*.
1803 * doc/invoke.texi: Document -mptwrite.
1805 2018-11-08 Peter Bergner <bergner@linux.ibm.com>
1807 PR rtl-optimization/87600
1808 * cfgexpand.c (expand_asm_stmt): Catch illegal asm constraint usage.
1809 * lra-constraints.c (process_alt_operands): Skip illegal hard
1810 register usage. Prefer reloading non hard register operands.
1812 2018-11-08 Sandra Loosemore <sandra@codesourcery.com>
1815 * doc/invoke.texi (Optimize Options): Clarify default behavior
1816 for -fno-sched-interblock and -fno-sched-spec.
1818 2018-11-08 Roman Geissler <roman.geissler@amadeus.com>
1820 * collect2.c (linker_select): Add USE_LLD_LD.
1821 (ld_suffixes): Add ld.lld.
1822 (main): Handle -fuse-ld=lld.
1823 * common.opt (-fuse-ld=lld): New option.
1824 * doc/invoke.texi (-fuse-ld=lld): Document.
1825 * opts.c (common_handle_option): Handle OPT_fuse_ld_lld.
1827 2018-11-08 Paul Koning <ni1d@arrl.net>
1829 * config/pdp11/constraints.md: Add "Z" series constraints for use
1830 with pre-dec and post-inc addressing.
1831 * config/pdp11/pdp11-protos.m (expand_block_move): Delete.
1832 (pdp11_expand_operands): Add int argument (word count).
1833 (pdp11_sp_frame_offset): Delete.
1834 (pdp11_cmp_length): New function.
1835 (pushpop_regeq): New function.
1836 * config/pdp11/pdp11.c (TARGET_STACK_PROTECT_RUNTIME_ENABLED_P):
1838 (pdp11_expand_prologue, pdp11_expand_epilogue): Rewrite for new
1840 (pdp11_initial_elimination_offset): Ditto.
1841 (pdp11_expand_operands): Add word count argument. Bugfixes.
1842 (output_move_multiple): Change how pointer adjustment is done.
1843 (pdp11_gen_int_label): Correct format.
1844 (output_ascii): Ditto.
1845 (pdp11_asm_output_var): Add code for DEC assembler case.
1846 (pdp11_asm_print_operand): Bugfix for CONST_DOUBLE holding integer
1848 (legitimate_const_double_p): Ditto.
1849 (pdp11_register_move_cost): Adjust for new register classes.
1850 (pdp11_regno_reg_class): Ditto.
1851 (expand_block_move): Delete.
1852 (pushpop_regeq): New function.
1853 (pdp11_legitimate_address_p): Bugfix in check for constant
1855 (pdp11_sp_frame_offset): Delete.
1856 (pdp11_reg_save_size): New helper function for new frame layout.
1857 (output_addr_const_pdp11): Remove CONST_DOUBLE case.
1858 (pdp11_expand_shift): Bugfix in check for constant shift count.
1859 (pdp11_shift_length): Ditto.
1860 (pdp11_assemble_shift): Copy input to pdp11_expand_operands.
1861 (pdp11_cmp_length): New function.
1862 * config/pdp11/pdp11.h (TARGET_CPU_CPP_BUILTINS): Add macros for
1863 some compile options.
1864 (FIXED_REGISTERS): Remove HARD_FRAME_POINTER_REGNUM.
1865 (CALL_USED_REGISTERS): Ditto.
1866 (ELIMINABLE_REGS): Ditto.
1867 (REGISTER_NAMES): Ditto.
1868 (reg_class): Add classes NOTR0_REG through NOTSP_REG for use by Z
1870 (REG_CLASS_NAMES): Ditto.
1871 (REG_CLASS_CONTENTS): Ditto. Also remove
1872 HARD_FRAME_POINTER_REGNUM.
1873 (CPU_REG_CLASS): New macro.
1874 (CLASS_MAX_NREGS): Adjust for new register classes.
1875 (FUNCTION_PROFILER): Make no-op.
1876 (may_call_alloca): Remove unused declaration.
1877 (ASM_OUTPUT_ALIGN): Add workaround for PR87795.
1878 (ASM_OUTPUT_SKIP): Fix format.
1879 * config/pdp11/pdp11.md (unspecv): Add UNSPECV_MOVMEM.
1880 (HARD_FRAME_POINTER_REGNUM): Remove.
1882 (*rts): Rename. Remove epilogue related checks.
1883 (cmpsi, cmpdi): New insn.
1884 (cbranch<mode>4): Change to apply to SI and DI modes as well.
1885 (mov<mode>): Change constraints to enforce that push/pop
1886 destination cannot use the same register as source.
1887 (*mov<mode><cc_cc>): Ditto.
1888 (movmemhi, movmemhi1, movmemhi_nocc): Change to expand block move
1889 at assembly output rather than as RTL expander.
1890 (zero_extendqihi2): Bugfix in check for same registers.
1891 (adddi3_nocc): Bugfix in check for constant operand.
1892 (addsi3_nocc): Ditto.
1893 (subdi3_nocc): Ditto.
1894 (subsi3_nocc): Ditto.
1895 (negdi2_nocc): Copy input to pdp11_expand_operands.
1896 (negsi2_nocc): Ditto.
1897 (bswap2_nocc): Ditto.
1898 * config/pdp11/pdp11.opt (mlra): Fix documentation.
1899 * config/pdp11/t-pdp11: Use -Os.
1901 2018-11-08 Richard Earnshaw <rearnsha@arm.com>
1903 * config/arm/parsecpu.awk (/alias/): New parsing rule.
1904 (/begin cpu/): Check that the cpu name hasn't been previously defined.
1905 (gen_comm_data): Print out CPU alias tables.
1906 (check_cpu): Match aliases when checking the CPU name.
1907 * config/arm/arm-protos.h (cpu_alias): New structure.
1908 (cpu_option): Add entry for aliases.
1909 * config/arm/arm-cpus.in (strongarm): Add aliases for strongarm110
1910 strongarm1100 and strongarm1110.
1911 (strongarm110, strongarm1100, strongarm1110): Delete CPU entries.
1912 (config/arm/arm-generic.md): Remove redundant references to
1913 strongarm110, strongarm1100 and strongarm1110.
1914 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
1915 Scan aliases for additional hints.
1916 (arm_parse_cpu_option_name): Also match a cpu name against the list
1918 * config/arm/arm-tables.opt: Regenerated.
1919 * config/arm/arm-tune.md: Regenerated.
1921 2018-11-08 Jakub Jelinek <jakub@redhat.com>
1923 * builtin-types.def (BT_FN_VOID_BOOL, BT_FN_VOID_SIZE_SIZE_PTR,
1924 BT_FN_UINT_UINT_PTR_PTR, BT_FN_UINT_OMPFN_PTR_UINT_UINT,
1925 BT_FN_BOOL_UINT_LONGPTR_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
1926 BT_FN_BOOL_UINT_ULLPTR_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR,
1927 BT_FN_BOOL_LONG_LONG_LONG_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
1928 BT_FN_BOOL_BOOL_ULL_ULL_ULL_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR): New.
1929 * gengtype.c (open_base_files): Add omp-general.h.
1930 * gimple.c (gimple_build_omp_critical):
1931 (gimple_build_omp_taskgroup): Add CLAUSES argument. Call
1932 gimple_omp_taskgroup_set_clauses.
1933 (gimple_build_omp_atomic_load): Add mo argument, call
1934 gimple_omp_atomic_set_memory_order.
1935 (gimple_build_omp_atomic_store): Likewise.
1936 (gimple_copy): Adjust handling of GIMPLE_OMP_TASKGROUP.
1937 * gimple.def (GIMPLE_OMP_TASKGROUP): Use GSS_OMP_SINGLE_LAYOUT
1939 (GIMPLE_OMP_TEAMS): Use GSS_OMP_PARALLEL_LAYOUT instead
1940 of GSS_OMP_SINGLE_LAYOUT, adjust comments.
1941 * gimple.h (enum gf_mask): Add GF_OMP_TEAMS_HOST, GF_OMP_TASK_TASKWAIT
1942 and GF_OMP_ATOMIC_MEMORY_ORDER. Remove GF_OMP_ATOMIC_SEQ_CST, use
1943 different value for GF_OMP_ATOMIC_NEED_VALUE.
1944 (struct gimple_statement_omp_taskreg): Add GIMPLE_OMP_TEAMS to
1946 (struct gimple_statement_omp_single_layout): And remove here.
1947 (struct gomp_teams): Inherit from gimple_statement_omp_taskreg rather
1948 than gimple_statement_omp_single_layout.
1949 (is_a_helper <gimple_statement_omp_taskreg *>::test): Allow
1951 (is_a_helper <const gimple_statement_omp_taskreg *>::test): Likewise.
1952 (gimple_omp_subcode): Formatting fix.
1953 (gimple_omp_teams_child_fn, gimple_omp_teams_child_fn_ptr,
1954 gimple_omp_teams_set_child_fn, gimple_omp_teams_data_arg,
1955 gimple_omp_teams_data_arg_ptr, gimple_omp_teams_set_data_arg,
1956 gimple_omp_teams_host, gimple_omp_teams_set_host,
1957 gimple_omp_task_taskwait_p, gimple_omp_task_set_taskwait_p,
1958 gimple_omp_taskgroup_clauses, gimple_omp_taskgroup_clauses_ptr,
1959 gimple_omp_taskgroup_set_clauses): New inline functions.
1960 (gimple_build_omp_atomic_load): Add enum omp_memory_order argument.
1961 (gimple_build_omp_atomic_store): Likewise.
1962 (gimple_omp_atomic_seq_cst_p): Remove.
1963 (gimple_omp_atomic_memory_order): New function.
1964 (gimple_omp_atomic_set_seq_cst): Remove.
1965 (gimple_omp_atomic_set_memory_order): New function.
1966 (gimple_build_omp_taskgroup): Add clauses argument.
1967 * gimple-pretty-print.c (dump_gimple_omp_taskgroup): New function.
1968 (dump_gimple_omp_task): Print taskwait with depend clauses.
1969 (dump_gimple_omp_atomic_load, dump_gimple_omp_atomic_store): Use
1970 dump_omp_atomic_memory_order.
1971 (pp_gimple_stmt_1): Handle GIMPLE_OMP_TASKGROUP.
1972 * gimplify.c (enum gimplify_omp_var_data): Add GOVD_MAP_ALLOC_ONLY,
1973 GOVD_MAP_FROM_ONLY and GOVD_NONTEMPORAL.
1974 (enum omp_region_type): Reserve bits 1 and 2 for auxiliary flags,
1975 renumber values of most of ORT_* enumerators, add ORT_HOST_TEAMS,
1976 ORT_COMBINED_HOST_TEAMS, ORT_TASKGROUP, ORT_TASKLOOP and
1977 ORT_UNTIED_TASKLOOP enumerators.
1978 (enum gimplify_defaultmap_kind): New.
1979 (struct gimplify_omp_ctx): Remove target_map_scalars_firstprivate and
1980 target_map_pointers_as_0len_arrays members, add defaultmap.
1981 (new_omp_context): Initialize defaultmap member.
1982 (gimple_add_tmp_var): Handle ORT_TASKGROUP like ORT_WORKSHARE.
1983 (maybe_fold_stmt): Don't fold even in host teams regions.
1984 (omp_firstprivatize_variable): Handle ORT_TASKGROUP like
1985 ORT_WORKSHARE. Test ctx->defaultmap[GDMK_SCALAR] instead of
1986 ctx->omp_firstprivatize_variable.
1987 (omp_add_variable): Don't add private/firstprivate for VLAs in
1989 (omp_default_clause): Print "taskloop" rather than "task" if
1991 (omp_notice_variable): Handle ORT_TASKGROUP like ORT_WORKSHARE.
1992 Handle new defaultmap clause kinds.
1993 (omp_is_private): Handle ORT_TASKGROUP like ORT_WORKSHARE. Allow simd
1994 iterator to be lastprivate or private. Fix up diagnostics if linear
1995 is used on collapse>1 simd iterator.
1996 (omp_check_private): Handle ORT_TASKGROUP like ORT_WORKSHARE.
1997 (gimplify_omp_depend): New function.
1998 (gimplify_scan_omp_clauses): Add shared clause on parallel for
1999 combined parallel master taskloop{, simd} if taskloop has
2000 firstprivate, lastprivate or reduction clause. Handle
2001 OMP_CLAUSE_REDUCTION_TASK diagnostics. Adjust tests for
2002 ORT_COMBINED_TEAMS. Gimplify depend clauses with iterators. Handle
2003 cancel and simd OMP_CLAUSE_IF_MODIFIERs. Handle
2004 OMP_CLAUSE_NONTEMPORAL. Handle new defaultmap clause kinds. Handle
2005 OMP_CLAUSE_{TASK,IN}_REDUCTION. Diagnose invalid conditional
2007 (gimplify_adjust_omp_clauses_1): Ignore GOVD_NONTEMPORAL. Handle
2008 GOVD_MAP_ALLOC_ONLY and GOVD_MAP_FROM_ONLY.
2009 (gimplify_adjust_omp_clauses): Handle OMP_CLAUSE_NONTEMPORAL. Handle
2010 OMP_CLAUSE_{TASK,IN}_REDUCTION.
2011 (gimplify_omp_task): Handle taskwait with depend clauses.
2012 (gimplify_omp_for): Add shared clause on parallel for combined
2013 parallel master taskloop{, simd} if taskloop has firstprivate,
2014 lastprivate or reduction clause. Use ORT_TASKLOOP or
2015 ORT_UNTIED_TASKLOOP instead of ORT_TASK or ORT_UNTIED_TASK. Adjust
2016 tests for ORT_COMBINED_TEAMS. Handle C++ range for loops with
2017 NULL TREE_PURPOSE in OMP_FOR_ORIG_DECLS. Firstprivatize
2018 __for_end and __for_range temporaries on OMP_PARALLEL for
2019 distribute parallel for{, simd}. Move OMP_CLAUSE_REDUCTION
2020 and OMP_CLAUSE_IN_REDUCTION from taskloop to the task construct
2021 sandwiched in between two taskloops.
2022 (computable_teams_clause): Test ctx->defaultmap[GDMK_SCALAR]
2023 instead of ctx->omp_firstprivatize_variable.
2024 (gimplify_omp_workshare): Set ort to ORT_HOST_TEAMS or
2025 ORT_COMBINED_HOST_TEAMS if not inside of target construct. If
2026 host teams, use gimplify_and_return_first etc. for body like
2027 for target or target data constructs, and at the end call
2028 gimple_omp_teams_set_host on the GIMPLE_OMP_TEAMS object.
2029 (gimplify_omp_atomic): Use OMP_ATOMIC_MEMORY_ORDER instead
2030 of OMP_ATOMIC_SEQ_CST, pass it as new argument to
2031 gimple_build_omp_atomic_load and gimple_build_omp_atomic_store, remove
2032 gimple_omp_atomic_set_seq_cst calls.
2033 (gimplify_expr) <case OMP_TASKGROUP>: Move handling into a separate
2034 case, handle taskgroup clauses.
2035 * lto-streamer-out.c (hash_tree): Handle
2036 OMP_CLAUSE_{TASK,IN}_REDUCTION.
2037 * Makefile.in (GTFILES): Add omp-general.h.
2038 * omp-builtins.def (BUILT_IN_GOMP_TASKWAIT_DEPEND,
2039 BUILT_IN_GOMP_LOOP_NONMONOTONIC_RUNTIME_START,
2040 BUILT_IN_GOMP_LOOP_MAYBE_NONMONOTONIC_RUNTIME_START,
2041 BUILT_IN_GOMP_LOOP_START, BUILT_IN_GOMP_LOOP_ORDERED_START,
2042 BUILT_IN_GOMP_LOOP_DOACROSS_START,
2043 BUILT_IN_GOMP_LOOP_NONMONOTONIC_RUNTIME_NEXT,
2044 BUILT_IN_GOMP_LOOP_MAYBE_NONMONOTONIC_RUNTIME_NEXT,
2045 BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_RUNTIME_START,
2046 BUILT_IN_GOMP_LOOP_ULL_MAYBE_NONMONOTONIC_RUNTIME_START,
2047 BUILT_IN_GOMP_LOOP_ULL_START, BUILT_IN_GOMP_LOOP_ULL_ORDERED_START,
2048 BUILT_IN_GOMP_LOOP_ULL_DOACROSS_START,
2049 BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_RUNTIME_NEXT,
2050 BUILT_IN_GOMP_LOOP_ULL_MAYBE_NONMONOTONIC_RUNTIME_NEXT,
2051 BUILT_IN_GOMP_PARALLEL_LOOP_NONMONOTONIC_RUNTIME,
2052 BUILT_IN_GOMP_PARALLEL_LOOP_MAYBE_NONMONOTONIC_RUNTIME,
2053 BUILT_IN_GOMP_PARALLEL_REDUCTIONS, BUILT_IN_GOMP_SECTIONS2_START,
2054 BUILT_IN_GOMP_TEAMS_REG, BUILT_IN_GOMP_TASKGROUP_REDUCTION_REGISTER,
2055 BUILT_IN_GOMP_TASKGROUP_REDUCTION_UNREGISTER,
2056 BUILT_IN_GOMP_TASK_REDUCTION_REMAP,
2057 BUILT_IN_GOMP_WORKSHARE_TASK_REDUCTION_UNREGISTER): New builtins.
2058 * omp-expand.c (workshare_safe_to_combine_p): Return false for
2059 non-worksharing loops.
2060 (omp_adjust_chunk_size): Don't adjust anything if chunk_size is zero.
2061 (determine_parallel_type): Don't combine parallel with worksharing
2062 which has _reductemp_ clause.
2063 (expand_parallel_call): Emit the GOMP_*nonmonotonic_runtime* or
2064 GOMP_*maybe_nonmonotonic_runtime* builtins instead of GOMP_*runtime*
2065 if there is nonmonotonic modifier or if there is no modifier and no
2066 ordered clause. For dynamic and guided schedule without monotonic
2067 and nonmonotonic modifier, default to nonmonotonic.
2068 (expand_omp_for): Likewise. Adjust expand_omp_for_generic caller, use
2069 GOMP_loop{,_ull}{,_ordered,_doacross}_start builtins if there are
2071 (expand_task_call): Add GOMP_TASK_FLAG_REDUCTION flag to flags if
2072 there are any reduction clauses.
2073 (expand_taskwait_call): New function.
2074 (expand_teams_call): New function.
2075 (expand_omp_taskreg): Allow GIMPLE_OMP_TEAMS and call
2076 expand_teams_call for it. Formatting fix. Handle taskwait with
2078 (expand_omp_for_generic): Add SCHED_ARG argument. Handle expansion
2079 of worksharing loops with task reductions.
2080 (expand_omp_for_static_nochunk, expand_omp_for_static_chunk): Handle
2081 expansion of worksharing loops with task reductions.
2082 (expand_omp_sections): Handle expansion of sections with task
2084 (expand_omp_synch): For host teams call expand_omp_taskreg.
2085 (omp_memory_order_to_memmodel): New function.
2086 (expand_omp_atomic_load, expand_omp_atomic_store,
2087 expand_omp_atomic_fetch_op): Use it and gimple_omp_atomic_memory_order
2088 instead of gimple_omp_atomic_seq_cst_p.
2089 (build_omp_regions_1, omp_make_gimple_edges): Treat taskwait with
2090 depend clauses as a standalone directive.
2091 * omp-general.c (enum omp_requires): New variable.
2092 (omp_extract_for_data): Initialize have_reductemp member. Allow
2093 NE_EXPR even in OpenMP loops, transform them into LT_EXPR or
2094 GT_EXPR loops depending on incr sign. Formatting fixes.
2095 * omp-general.h (struct omp_for_data): Add have_reductemp member.
2096 (enum omp_requires): New enum.
2097 (omp_requires_mask): Declare.
2098 * omp-grid.c (grid_eliminate_combined_simd_part): Formatting fix.
2100 * omp-low.c (struct omp_context): Add task_reductions and
2101 task_reduction_map fields.
2102 (is_host_teams_ctx): New function.
2103 (is_taskreg_ctx): Return true also if is_host_teams_ctx.
2104 (use_pointer_for_field): Use is_global_var instead of
2105 TREE_STATIC || DECL_EXTERNAL, and apply only if not privatized
2107 (build_outer_var_ref): Ignore taskgroup outer contexts.
2108 (delete_omp_context): Release task_reductions and task_reduction_map.
2109 (scan_sharing_clauses): Don't add any fields for reduction clause on
2110 taskloop. Handle OMP_CLAUSE__REDUCTEMP_. Handle
2111 OMP_CLAUSE_{IN,TASK}_REDUCTION and OMP_CLAUSE_REDUCTION with task
2112 modifier. Don't ignore shared clauses in is_host_teams_ctx contexts.
2113 Handle OMP_CLAUSE_NONTEMPORAL.
2114 (add_taskreg_looptemp_clauses): Add OMP_CLAUSE__REDUCTEMP_ clause if
2116 (scan_omp_parallel): Add _reductemp_ clause if there are any reduction
2117 clauses with task modifier.
2118 (scan_omp_task): Handle taskwait with depend clauses.
2119 (finish_taskreg_scan): Move field corresponding to _reductemp_ clause
2120 first. Move also OMP_CLAUSE__REDUCTEMP_ clause in front if present.
2121 Handle GIMPLE_OMP_TEAMS like GIMPLE_OMP_PARALLEL.
2122 (scan_omp_for): Fix comment formatting.
2123 (scan_omp_teams): Handle host teams constructs.
2124 (check_omp_nesting_restrictions): Allow teams with no outer
2125 OpenMP context. Adjust diagnostics for teams strictly nested into
2126 some explicit OpenMP construct other than target. Allow OpenMP atomics
2127 inside of simd regions.
2128 (scan_omp_1_stmt): Call scan_sharing_clauses for taskgroups.
2129 (scan_omp_1_stmt) <case GIMPLE_OMP_TEAMS>: Temporarily bump
2130 taskreg_nesting_level while scanning host teams construct.
2131 (task_reduction_read): New function.
2132 (lower_rec_input_clauses): Handle OMP_CLAUSE_REDUCTION on taskloop
2133 construct. Handle OMP_CLAUSE_IN_REDUCTION and OMP_CLAUSE__REDUCTEMP_
2134 clauses. Handle OMP_CLAUSE_REDUCTION with task modifier. Remove
2135 second argument create_tmp_var if it is NULL. Don't ignore shared
2136 clauses in is_host_teams_ctx contexts. Handle
2137 OMP_CLAUSE_FIRSTPRIVATE_NO_REFERENCE on OMP_CLAUSE_FIRSTPRIVATE
2139 (lower_reduction_clauses): Ignore reduction clauses with task
2140 modifier. Remove second argument create_tmp_var if it is NULL.
2141 Initialize OMP_ATOMIC_MEMORY_ORDER to relaxed.
2142 (lower_send_clauses): Ignore reduction clauses with task modifier.
2143 Handle OMP_CLAUSE__REDUCTEMP_. Don't send anything for
2144 OMP_CLAUSE_REDUCTION on taskloop. Handle OMP_CLAUSE_IN_REDUCTION.
2145 (maybe_add_implicit_barrier_cancel): Add OMP_RETURN argument, don't
2146 rely that it is the last stmt in body so far. Ignore outer taskgroup
2148 (omp_task_reductions_find_first, omp_task_reduction_iterate,
2149 lower_omp_task_reductions): New functions.
2150 (lower_omp_sections): Handle reduction clauses with taskgroup
2151 modifiers. Adjust maybe_add_implicit_barrier_cancel caller.
2152 (lower_omp_single): Adjust maybe_add_implicit_barrier_cancel caller.
2153 (lower_omp_for): Likewise. Handle reduction clauses with taskgroup
2155 (lower_omp_taskgroup): Handle taskgroup reductions.
2156 (create_task_copyfn): Copy over OMP_CLAUSE__REDUCTEMP_ pointer.
2157 Handle OMP_CLAUSE_IN_REDUCTION and OMP_CLAUSE_REDUCTION clauses.
2158 (lower_depend_clauses): If there are any
2159 OMP_CLAUSE_DEPEND_DEPOBJ or OMP_CLAUSE_DEPEND_MUTEXINOUTSET
2160 depend clauses, use a new array format. If OMP_CLAUSE_DEPEND_LAST is
2161 seen, assume lowering is done already and return early. Set kind
2162 on artificial depend clause to OMP_CLAUSE_DEPEND_LAST.
2163 (lower_omp_taskreg): Handle reduction clauses with task modifier on
2164 parallel construct. Handle reduction clause on taskloop construct.
2165 Handle taskwait with depend clauses.
2166 (lower_omp_1): Use lower_omp_taskreg instead of lower_omp_teams
2167 for host teams constructs.
2168 * tree.c (omp_clause_num_ops): Add in_reduction, task_reduction,
2169 nontemporal and _reductemp_ clause entries.
2170 (omp_clause_code_name): Likewise.
2171 (walk_tree_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION,
2172 OMP_CLAUSE_NONTEMPORAL and OMP_CLAUSE__REDUCTEMP_.
2173 * tree-core.h (enum omp_clause_code): Add
2174 OMP_CLAUSE_{{IN,TASK}_REDUCTION,NONTEMPORAL,_REDUCTEMP_}.
2175 (enum omp_clause_defaultmap_kind, enum omp_memory_order): New.
2176 (struct tree_base): Add omp_atomic_memory_order field into union.
2177 Remove OMP_ATOMIC_SEQ_CST comment.
2178 (enum omp_clause_depend_kind): Add OMP_CLAUSE_DEPEND_MUTEXINOUTSET
2179 and OMP_CLAUSE_DEPEND_DEPOBJ.
2180 (struct tree_omp_clause): Add subcode.defaultmap_kind.
2181 * tree.def (OMP_TASKGROUP): Add another operand, move next to other
2182 OpenMP constructs with body and clauses operands.
2183 * tree.h (OMP_BODY): Use OMP_MASTER instead of OMP_TASKGROUP.
2184 (OMP_CLAUSES): Use OMP_TASKGROUP instead of OMP_SINGLE.
2185 (OMP_TASKGROUP_CLAUSES): Define.
2186 (OMP_CLAUSE_DECL): Use OMP_CLAUSE__REDUCTEMP_ instead of
2187 OMP_CLAUSE__LOOPTEMP_.
2188 (OMP_ATOMIC_SEQ_CST): Remove.
2189 (OMP_ATOMIC_MEMORY_ORDER, OMP_CLAUSE_FIRSTPRIVATE_NO_REFERENCE,
2190 OMP_CLAUSE_LASTPRIVATE_CONDITIONAL): Define.
2191 (OMP_CLAUSE_REDUCTION_CODE, OMP_CLAUSE_REDUCTION_INIT,
2192 OMP_CLAUSE_REDUCTION_MERGE, OMP_CLAUSE_REDUCTION_PLACEHOLDER,
2193 OMP_CLAUSE_REDUCTION_DECL_PLACEHOLDER,
2194 OMP_CLAUSE_REDUCTION_OMP_ORIG_REF): Handle
2195 OMP_CLAUSE_{,IN_,TASK_}REDUCTION.
2196 (OMP_CLAUSE_REDUCTION_TASK, OMP_CLAUSE_REDUCTION_INSCAN,
2197 OMP_CLAUSE_DEFAULTMAP_KIND, OMP_CLAUSE_DEFAULTMAP_CATEGORY,
2198 OMP_CLAUSE_DEFAULTMAP_BEHAVIOR, OMP_CLAUSE_DEFAULTMAP_SET_KIND):
2200 * tree-inline.c (remap_gimple_stmt): Remap taskgroup clauses.
2201 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
2202 OMP_CLAUSE__REDUCTEMP_, OMP_CLAUSE_NONTEMPORAL.
2203 (convert_local_omp_clauses): Likewise. Remove useless test.
2204 * tree-parloops.c (create_call_for_reduction_1): Pass
2205 OMP_MEMORY_ORDER_RELAXED as new argument to
2206 dump_gimple_omp_atomic_load and dump_gimple_omp_atomic_store.
2207 * tree-pretty-print.c (dump_omp_iterators): New function.
2208 (dump_omp_clause): Handle OMP_CLAUSE__REDUCTEMP_,
2209 OMP_CLAUSE_NONTEMPORAL, OMP_CLAUSE_{TASK,IN}_REDUCTION. Print
2210 reduction modifiers. Handle OMP_CLAUSE_DEPEND_DEPOBJ and
2211 OMP_CLAUSE_DEPEND_MUTEXINOUTSET. Print iterators in depend clauses.
2212 Print __internal__ for OMP_CLAUSE_DEPEND_LAST. Handle cancel and
2213 simd OMP_CLAUSE_IF_MODIFIERs. Handle new kinds of
2214 OMP_CLAUSE_DEFAULTMAP. Print conditional: for
2215 OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
2216 (dump_omp_atomic_memory_order): New function.
2217 (dump_generic_node): Use it. Print taskgroup clauses. Print
2218 taskwait with depend clauses.
2219 * tree-pretty-print.h (dump_omp_atomic_memory_order): Declare.
2220 * tree-streamer-in.c (unpack_ts_omp_clause_value_fields):
2221 Handle OMP_CLAUSE_{TASK,IN}_REDUCTION.
2222 * tree-streamer-out.c (pack_ts_omp_clause_value_fields,
2223 write_ts_omp_clause_tree_pointers): Likewise.
2225 2018-11-08 David Malcolm <dmalcolm@redhat.com>
2228 * doc/invoke.texi (-fdump-ipa-): Document the "-optimized",
2229 "-missed", "-note", and "-all" sub-options.
2230 * ipa-inline.c (caller_growth_limits): Port from fprintf to dump
2232 (can_early_inline_edge_p): Likewise.
2233 (want_early_inline_function_p): Likewise.
2234 (want_inline_self_recursive_call_p): Likewise.
2235 (recursive_inlining): Likewise.
2236 (inline_small_functions): Likewise.
2237 (flatten_function): Likewise.
2238 (ipa_inline): Likewise.
2239 (inline_always_inline_functions): Likewise.
2240 (early_inline_small_functions): Likewise.
2241 (early_inliner): Likewise.
2242 * tree-inline.c (expand_call_inline): Likewise.
2244 2018-11-08 David Malcolm <dmalcolm@redhat.com>
2246 * pretty-print.c (pp_format): Handle %f.
2247 (selftest::test_pp_format): Add test of %f.
2248 * pretty-print.h (pp_double): New macro.
2250 2018-11-08 David Malcolm <dmalcolm@redhat.com>
2252 * dump-context.h (ASSERT_IS_CGRAPH_NODE): New macro.
2253 * dumpfile.c (make_item_for_dump_cgraph_node): Move to before...
2254 (dump_pretty_printer::decode_format): Implement "%C" for
2256 (selftest::test_capture_of_dump_calls): Rename "where" to
2257 "stmt_loc". Convert test_decl to a function decl and set its
2258 location. Add a symbol_table_test RAII instance and a
2259 cgraph_node, using it to test "%C" and dump_symtab_node.
2261 2018-11-08 Eric Botcazou <ebotcazou@adacore.com>
2264 * cgraphclones.c (duplicate_thunk_for_node): Also set DECL_IGNORED_P.
2266 2018-11-08 David Malcolm <dmalcolm@redhat.com>
2268 * cgraph.c: Include "selftest.h".
2269 (saved_symtab): New variable.
2270 (selftest::symbol_table_test::symbol_table_test): New ctor.
2271 (selftest::symbol_table_test::~symbol_table_test): New dtor.
2272 (selftest::test_symbol_table_test): New test.
2273 (selftest::cgraph_c_tests): New.
2274 * cgraph.h (saved_symtab): New decl.
2275 (selftest::symbol_table_test): New class.
2276 * selftest-run-tests.c (selftest::run_tests): Call
2277 selftest::cgraph_c_tests.
2278 * selftest.h (selftest::cgraph_c_tests): New decl.
2280 2018-11-08 Richard Biener <rguenther@suse.de>
2282 * tree-data-ref.h (lambda_int): New typedef.
2283 (lambda_vector_gcd): Adjust.
2284 (lambda_vector_new): Likewise.
2285 (lambda_matrix_new): Likewise.
2286 * tree-data-ref.c (print_lambda_vector): Adjust.
2288 2018-11-08 Richard Biener <rguenther@suse.de>
2290 PR tree-optimization/87929
2291 * tree-complex.c (expand_complex_comparison): Clean EH.
2293 2018-11-08 Martin Liska <mliska@suse.cz>
2295 * doc/extend.texi: Reword.
2296 * predict.c (expr_expected_value_1): Likewise.
2298 2018-11-08 Richard Biener <rguenther@suse.de>
2300 PR tree-optimization/87913
2301 * tree-ssa-phiopt.c (minmax_replacement): Turn EQ/NE compares
2302 of extreme values to ordered comparisons.
2304 2018-11-07 Sandra Loosemore <sandra@codesourcery.com>
2307 * doc/invoke.texi (Code Gen Options): Clarify -fno-common behavior.
2309 2018-11-07 Sandra Loosemore <sandra@codesourcery.com>
2311 * doc/invoke.texi: Remove leading dash from @opindex entries
2312 throughout the file.
2314 2018-11-07 Sandra Loosemore <sandra@codesourcery.com>
2317 * doc/invoke.texi (Option Summary): Add -e and --entry.
2318 (Link Options): Likewise.
2320 2018-11-07 Nathan Sidwell <nathan@acm.org>
2323 * Makefile.in (bitmap.o-warn): Add -Wno-error to unbreak
2324 --disable-checking bootstrap.
2326 2018-11-07 Hafiz Abid Qadeer <abidh@codesourcery.com>
2328 * configure: Regenerated.
2330 2018-11-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2333 * stor-layout.c (compute_record_mode): Set TYPE_MODE of UNION_TYPE
2334 to the mode of the widest field iff the widest field has mode class
2335 MODE_INT, or MODE_PARTIAL_INT and the union would be passed by
2338 2018-11-07 Nikolai Merinov <n.merinov@inango-systems.com>
2340 * common.opt: Add -Wattribute-warning.
2341 * doc/invoke.texi: Add documentation for -Wno-attribute-warning.
2342 * expr.c (expand_expr_real_1): Add new attribute to warning_at
2343 call to allow user configure behavior of "warning" attribute.
2345 2018-11-07 Segher Boessenkool <segher@kernel.crashing.org>
2347 * target.def: Put @: after every vs., e.g., and i.e. where it is
2348 followed by whitespace.
2349 * doc/extend.texi: Ditto.
2350 * doc/fragments.texi: Ditto.
2351 * doc/gimple.texi: Ditto.
2352 * doc/implement-c.texi: Ditto.
2353 * doc/install.texi: Ditto.
2354 * doc/invoke.texi: Ditto.
2355 * doc/md.texi: Ditto.
2356 * doc/plugins.texi: Ditto.
2357 * doc/rtl.texi: Ditto.
2358 * doc/sourcebuild.texi: Ditto.
2359 * doc/tm.texi.in: Ditto.
2360 * doc/ux.texi: Ditto.
2361 * doc/tm.texi: Regenerate.
2363 2018-11-07 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2365 * config/arm/arm-cpus.in (ares): New entry.
2366 * config/arm/arm-tables.opt: Regenerate.
2367 * config/arm/arm-tune.md: Likewise.
2368 * doc/invoke.texi (ARM Options): Document ares.
2370 2018-11-07 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2372 * config/aarch64/aarch64-cores.def (ares): Define.
2373 * config/aarch64/aarch64-tune.md: Regenerate.
2374 * doc/invoke.texi (AArch64 Options): Document ares value for mtune.
2376 2018-11-07 Jan Hubicka <jh@suse.cz>
2378 * tree.c (fld_incomplete_type_of): Clear TREE_ADDRESSABLE.
2379 (free_lang_data_in_decl): Set TREE_ADDRESSABLE for public vars and
2380 functions; clear TYPE_DECL_SUPPRESS_DEBUG and DECL_MODE for
2383 2018-11-07 Richard Biener <rguenther@suse.de>
2385 PR tree-optimization/87914
2386 * tree-vect-loop.c (vect_is_simple_reduction): Improve detection
2388 (vectorizable_reduction): Handle shifts and rotates by dispatching
2389 to vectorizable_shift.
2390 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Handle
2391 in-loop uses of vect_nested_cycle defs. Merge cycle and internal
2393 (vectorizable_shift): Export and handle being called as
2395 (vect_analyze_stmt): Call vectorizable_shift after
2396 vectorizable_reduction.
2397 * tree-vectorizer.h (vectorizable_shift): Declare.
2399 2018-11-07 Jan Hubicka <jh@suse.cz>
2401 * ipa-devirt.c (odr_types_equivalent_p): Expect constants
2402 than const decls in TREE_VALUE of enum.
2403 (dump_type_inheritance_graph): Improve duplicate dumping.
2404 (free_enum_values): New.
2405 (build_type_inheritance_graph): Use it.
2406 * tree.c (free_lang_data_in_type): Free TYPE_VALUES of enums
2407 which are not main variants or not ODR types.
2408 (verify_type_variant): Expect variants to have no TYPE_VALUES.
2410 2018-11-07 Richard Biener <rguenther@suse.de>
2412 * ipa-inline.c (want_inline_small_function_p): Compute
2413 big_speedup_p lazily and last.
2415 2018-11-07 Jan Hubicka <jh@suse.cz>
2417 * tree.c (fld_type_variant_equal_p): Skip TYPE_ALIGN check when
2418 building incomplete variant of complete type.
2419 (fld_type_variant): Do not copy TYPE_ALIGN when building incomplete
2420 variant of complete type.
2422 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
2424 * config/mips/mips.c: Fix typo in documentation of
2425 mips_loongson_ext2_prefetch_cookie.
2426 (mips_option_override): fix brain twister logical.
2427 * config/mips/mips.h: Fix typo in documentation of
2428 ISA_HAS_CTZ_CTO and define pattern.
2429 * config/mips/mips.md (prefetch): Hoist EXT2 above
2431 (prefetch_indexed): Hoist EXT2 above the EXT block.
2433 2018-11-07 Jan Hubicka <jh@suse.cz>
2435 * tree.c (free_lang_data_in_type): Add fld parameter; simplify
2436 return and parameter types of function and method types.
2437 (free_lang_data_in_cgraph): Update.
2439 2018-11-07 Martin Liska <mliska@suse.cz>
2441 PR rtl-optimization/87868
2442 * postreload-gcse.c (eliminate_partially_redundant_load): Set
2443 threshold to max_count if we would overflow.
2444 * profile-count.h: Make max_count a public constant.
2446 2018-11-07 Martin Liska <mliska@suse.cz>
2448 * mem-stats.h: Fix GNU coding style.
2450 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
2452 * config/mips/gs264e.md: New.
2453 * config/mips/mips-cpus.def: Define gs264e.
2454 * config/mips/mips-tables.opt: Regenerate.
2455 * config/mips/mips.c (mips_rtx_cost_data): Add DEFAULT_COSTS for
2457 (mips_issue_rate): Add support for gs264e.
2458 (mips_multipass_dfa_lookahead): Likewise.
2459 * config/mips/mips.h: Define TARGET_GS264E and TUNE_GS264E.
2460 (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs264e.
2461 (MIPS_ASE_MSA_SPEC): New.
2462 (BASE_DRIVER_SELF_SPECS): march=gs264e implies -mmsa.
2463 (ISA_HAS_FUSED_MADD4): Enable for TARGET_GS264E.
2464 (ISA_HAS_UNFUSED_MADD4): Exclude TARGET_GS264E.
2465 * config/mips/mips.md: Include gs264e.md.
2466 (processor): Add gs264e.
2467 * config/mips/mips.opt (MSA): Use Mask instead of Var.
2468 * doc/invoke.texi: Add gs264e to supported architectures.
2470 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
2472 * config/mips/gs464e.md: New.
2473 * config/mips/mips-cpus.def: Define gs464e.
2474 * config/mips/mips-tables.opt: Regenerate.
2475 * config/mips/mips.c (mips_rtx_cost_data): Add DEFAULT_COSTS for
2477 (mips_issue_rate): Add support for gs464e.
2478 (mips_multipass_dfa_lookahead): Likewise.
2479 (mips_option_override): Enable MMI, EXT and EXT2 for gs464e.
2480 * config/mips/mips.h: Define TARGET_GS464E and TUNE_GS464E.
2481 (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs464e.
2482 (ISA_HAS_FUSED_MADD4): Enable for TARGET_GS464E.
2483 (ISA_HAS_UNFUSED_MADD4): Exclude TARGET_GS464E.
2484 * config/mips/mips.md: Include gs464e.md.
2485 (processor): Add gs464e.
2486 * doc/invoke.texi: Add gs464e to supported architectures.
2488 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
2490 * config/mips/loongson3a.md: Rename to ...
2491 * config/mips/gs464.md: ... here.
2492 * config/mips/mips-cpus.def: Define gs464; Add loongson3a
2493 as an alias of gs464 processor.
2494 * config/mips/mips-tables.opt: Regenerate.
2495 * config/mips/mips.c (mips_issue_rate): Use PROCESSOR_GS464
2496 instead of PROCESSOR_LOONGSON_3A.
2497 (mips_multipass_dfa_lookahead): Use TUNE_GS464 instead of
2499 (mips_option_override): Enable MMI and EXT for gs464.
2500 * config/mips/mips.h: Rename TARGET_LOONGSON_3A to TARGET_GS464;
2501 Rename TUNE_LOONGSON_3A to TUNE_GS464.
2502 (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs464.
2503 (ISA_HAS_ODD_SPREG, ISA_AVOID_DIV_HILO, ISA_HAS_FUSED_MADD4,
2504 ISA_HAS_UNFUSED_MADD4): Use TARGET_GS464 instead of
2506 * config/mips/mips.md: Include gs464.md instead of loongson3a.md.
2507 (processor): Add gs464;
2508 * doc/invoke.texi: Add gs464 to supported architectures.
2510 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
2512 * config/mips/mips-protos.h
2513 (mips_loongson_ext2_prefetch_cookie): New prototype.
2514 * config/mips/mips.c (mips_loongson_ext2_prefetch_cookie): New.
2515 (mips_option_override): Enable TARGET_LOONGSON_EXT when
2516 TARGET_LOONGSON_EXT2 is true.
2517 * config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Define
2518 __mips_loongson_ext2, __mips_loongson_ext_rev=2.
2519 (ISA_HAS_CTZ_CTO): New, true if TARGET_LOONGSON_EXT2.
2520 (ISA_HAS_PREFETCH): Include TARGET_LOONGSON_EXT and
2521 TARGET_LOONGSON_EXT2.
2522 (ASM_SPEC): Add mloongson-ext2 and mno-loongson-ext2.
2523 (define_insn "ctz<mode>2"): New insn pattern.
2524 (define_insn "prefetch"): Include TARGET_LOONGSON_EXT2.
2525 (define_insn "prefetch_indexed_<mode>"): Include
2526 TARGET_LOONGSON_EXT and TARGET_LOONGSON_EXT2.
2527 * config/mips/mips.opt (-mloongson-ext2): Add option.
2528 * gcc/doc/invoke.texi (-mloongson-ext2): Document.
2530 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
2532 * config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Add
2533 __mips_loongson_ext.
2534 (MIPS_ASE_LOONGSON_EXT_SPEC): New.
2535 (BASE_DRIVER_SELF_SPECS): march=loongson3a implies
2537 (ASM_SPEC): Add mloongson-ext and mno-loongson-ext.
2538 * config/mips/mips.md (mul<mode>3, mul<mode>3_mul3_nohilo,
2539 <u>div<mode>3, <u>mod<mode>3, prefetch): Use TARGET_LOONGSON_EXT
2540 instead of TARGET_LOONGSON_3A.
2541 * config/mips/mips.opt (-mloongson-ext): Add option.
2542 * gcc/doc/invoke.texi (-mloongson-ext): Document.
2544 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
2546 * config.gcc (extra_headers): Add loongson-mmiintrin.h.
2547 * config/mips/loongson.md: Move to ...
2548 * config/mips/loongson-mmi.md: here; Adjustment.
2549 * config/mips/loongson.h: Move to ...
2550 State as deprecated. Include loongson-mmiintrin.h for back
2551 compatibility and warning.
2552 * config/mips/loongson-mmiintrin.h: ... here.
2553 * config/mips/mips.c (mips_hard_regno_mode_ok_uncached,
2554 mips_vector_mode_supported_p, AVAIL_NON_MIPS16): Use
2555 TARGET_LOONGSON_MMI instead of TARGET_LOONGSON_VECTORS.
2556 (mips_option_override): Make sure MMI use hard float;
2557 (mips_shift_truncation_mask, mips_expand_vpc_loongson_even_odd,
2558 mips_expand_vpc_loongson_pshufh, mips_expand_vpc_loongson_bcast,
2559 mips_expand_vector_init): Use TARGET_LOONGSON_MMI instead of
2560 TARGET_LOONGSON_VECTORS.
2561 * gcc/config/mips/mips.h (TARGET_LOONGSON_VECTORS): Delete.
2562 (TARGET_CPU_CPP_BUILTINS): Add __mips_loongson_mmi.
2563 (MIPS_ASE_DSP_SPEC, MIPS_ASE_LOONGSON_MMI_SPEC): New.
2564 (BASE_DRIVER_SELF_SPECS): march=loongson2e/2f/3a implies
2566 (SHIFT_COUNT_TRUNCATED): Use TARGET_LOONGSON_MMI instead of
2567 TARGET_LOONGSON_VECTORS.
2568 * gcc/config/mips/mips.md (MOVE64, MOVE128): Use
2569 TARGET_LOONGSON_MMI instead of TARGET_LOONGSON_VECTORS.
2570 (Loongson MMI patterns): Include loongson-mmi.md instead of
2572 * gcc/config/mips/mips.opt (-mloongson-mmi): New option.
2573 * gcc/doc/invoke.texi (-mloongson-mmi): Document.
2575 2018-11-07 Richard Biener <rguenther@suse.de>
2578 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Fixup
2579 BLOCK_ABSTRACT_ORIGIN to be the ultimate origin.
2581 2018-11-07 Alexandre Oliva <aoliva@redhat.com>
2583 PR rtl-optimization/87874
2584 * lra.c (lra_substitute_pseudo): Do not create a subreg for
2587 2018-11-06 Aaron Sawdey <acsawdey@linux.ibm.com>
2589 * config/rs6000/rs6000.md (bswap<mode>2): Force address into register
2590 if not in indexed or indirect form.
2591 (bswap<mode>2_load): Change predicate to indexed_or_indirect_operand.
2592 (bswap<mode>2_store): Ditto.
2594 2018-11-06 Richard Earnshaw <rearnsha@arm.com>
2596 * config/aarch64/aarch64.md (speculation_tracker): Set the mode for
2599 2018-11-06 Richard Biener <rguenther@suse.de>
2601 PR tree-optimization/86850
2602 * vec.h (vec<T, va_heap, vl_ptr>::splice): Check src.length ()
2603 instead of src.m_vec.
2605 2018-11-06 Jan Hubicka <jh@suse.cz>
2607 * tree.c (fld_simplified_type_name): Break out form ...
2608 (free_lang_data_in_type): ... here.
2609 (fld_type_variant_equal_p): Use it.
2611 2018-11-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2613 * config/default-d.c: Include memmodel.h.
2615 * config/sol2-d.c: New file.
2616 * config/t-sol2 (sol2-d.o): New rule.
2617 * config.gcc <*-*-solaris2*>: Set d_target_objs,
2618 target_has_targetdm.
2620 2018-11-06 Jan Hubicka <jh@suse.cz>
2622 * tree.c (fld_type_variant): Also copy alignment; be sure that
2623 new variant is equal.
2625 2018-11-06 Ilya Leoshkevich <iii@linux.ibm.com>
2628 * config/s390/s390.md: Add relative_long attribute.
2630 2018-11-06 Jan Hubicka <jh@suse.cz>
2632 * ipa-pure-const.c (check_decl): Do not test TYPE_NEEDS_CONSTRUCTING.
2633 * lto-streamer-out.c (hash_tree): Do not hash TYPE_NEEDS_CONSTRUCTING.
2634 * tree-streamer-in.c (unpack_ts_type_common_value_fields): Do not
2635 stream TYPE_NEEDS_CONSTRUCTING.
2636 * tree-streamer-out.c (pack_ts_type_common_value_fields): Likewise.
2637 * tree.c (free_lang_data_in_type): Clear TYPE_NEEDS_CONSTRUCTING.
2639 2018-11-06 Richard Biener <rguenther@suse.de>
2641 * tree-vect-slp.c (vect_slp_bb): Move opening of vect_slp_analyze_bb
2643 (vect_slp_analyze_bb_1): ... here to avoid hiding optimized locations.
2645 2018-11-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2647 * gcc/config/msp430/msp430.h (REG_CLASS_CONTENTS): Add R0 to
2648 REG_CLASS_CONTENTS[GEN_REGS].
2649 (REGNO_REG_CLASS): Return NO_REGS for R2 and R3.
2651 2018-11-06 Jan Hubicka <jh@suse.cz>
2653 * tree.c (fld_simplified_type_of): Clear TYPELESS_STORAGE flag.
2655 2018-11-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2658 * config/sol2.h (ASAN_CC1_SPEC): Define.
2659 (LD_WHOLE_ARCHIVE_OPTION): Define.
2660 (LD_NO_WHOLE_ARCHIVE_OPTION): Define.
2661 (ASAN_REJECT_SPEC): Provide default.
2662 (LIBASAN_EARLY_SPEC): Define.
2663 (LIBTSAN_EARLY_SPEC): Define.
2664 (LIBLSAN_EARLY_SPEC): Define.
2665 * config/i386/sol2.h (CC1_SPEC): Redefine.
2666 (ASAN_REJECT_SPEC): Define.
2668 * config/sparc/sparc.c (sparc_asan_shadow_offset): Declare.
2669 (TARGET_ASAN_SHADOW_OFFSET): Define.
2670 (sparc_asan_shadow_offset): New function.
2671 * config/sparc/sol2.h (CC1_SPEC): Append ASAN_CC1_SPEC.
2672 (ASAN_REJECT_SPEC): Define.
2674 2018-11-06 Jan Hubicka <jh@suse.cz>
2676 * tree.c (fld_type_variant): Copy canonical type.
2677 (fld_incomplete_type_of): Check that canonical types looks sane;
2678 copy canonical type.
2679 (verify_type): Accept when incomplete type has complete canonical type.
2681 2018-11-06 Jan Hubicka <jh@suse.cz>
2683 * tree.c (free_lang_data): Reset overwite_assembler_name,
2684 print_xnode, print_decl, print_type and print_identifier of
2687 2018-11-06 Richard Biener <rguenther@suse.de>
2689 PR tree-optimization/87889
2690 * tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges):
2691 Do nothing if old and new arg are the same
2693 2018-11-06 Andreas Krebbel <krebbel@linux.ibm.com>
2696 * config/s390/s390.md ("*r<noxa>sbg_di_rotl"): Remove mode
2697 attributes for operands 3 and 4.
2699 2018-11-06 Richard Biener <rguenther@suse.de>
2702 * simplify-rtx.c (simplify_binary_operation_1): Add pattern
2703 matching bitfield insertion.
2705 2018-11-06 Alexandre Oliva <aoliva@redhat.com>
2707 * auto-inc-dec.c: Include valtrack.h. Improve comments.
2708 (reg_next_debug_use): New.
2709 (attempt_change): Propagate adjusted expression into affected
2711 (merge_in_block): Track uses in debug insns.
2712 (pass_inc_dec::execute): Allocate and release
2715 2018-11-06 Wei Xiao <wei3.xiao@intel.com>
2717 * config/i386/avx512fintrin.h: Update VFIXUPIMM* intrinsics.
2718 (_mm512_fixupimm_round_pd): Update parameters and builtin.
2719 (_mm512_maskz_fixupimm_round_pd): Ditto.
2720 (_mm512_fixupimm_round_ps): Ditto.
2721 (_mm512_maskz_fixupimm_round_ps): Ditto.
2722 (_mm_fixupimm_round_sd): Ditto.
2723 (_mm_maskz_fixupimm_round_sd): Ditto.
2724 (_mm_fixupimm_round_ss): Ditto.
2725 (_mm_maskz_fixupimm_round_ss): Ditto.
2726 (_mm512_fixupimm_pd): Ditto.
2727 (_mm512_maskz_fixupimm_pd): Ditto.
2728 (_mm512_fixupimm_ps): Ditto.
2729 (_mm512_maskz_fixupimm_ps): Ditto.
2730 (_mm_fixupimm_sd): Ditto.
2731 (_mm_maskz_fixupimm_sd): Ditto.
2732 (_mm_fixupimm_ss): Ditto.
2733 (_mm_maskz_fixupimm_ss): Ditto.
2734 (_mm512_mask_fixupimm_round_pd): Update builtin.
2735 (_mm512_mask_fixupimm_round_ps): Ditto.
2736 (_mm_mask_fixupimm_round_sd): Ditto.
2737 (_mm_mask_fixupimm_round_ss): Ditto.
2738 (_mm512_mask_fixupimm_pd): Ditto.
2739 (_mm512_mask_fixupimm_ps): Ditto.
2740 (_mm_mask_fixupimm_sd): Ditto.
2741 (_mm_mask_fixupimm_ss): Ditto.
2742 * config/i386/avx512vlintrin.h:
2743 (_mm256_fixupimm_pd): Update parameters and builtin.
2744 (_mm256_maskz_fixupimm_pd): Ditto.
2745 (_mm256_fixupimm_ps): Ditto.
2746 (_mm256_maskz_fixupimm_ps): Ditto.
2747 (_mm_fixupimm_pd): Ditto.
2748 (_mm_maskz_fixupimm_pd): Ditto.
2749 (_mm_fixupimm_ps): Ditto.
2750 (_mm_maskz_fixupimm_ps): Ditto.
2751 (_mm256_mask_fixupimm_pd): Update builtin.
2752 (_mm256_mask_fixupimm_ps): Ditto.
2753 (_mm_mask_fixupimm_pd): Ditto.
2754 (_mm_mask_fixupimm_ps): Ditto.
2755 * config/i386/i386-builtin-types.def: Add new types and remove useless ones.
2756 * config/i386/i386-builtin.def: Update builtin definitions.
2757 * config/i386/i386.c: Handle new builtin types and remove useless ones.
2758 * config/i386/sse.md: Update VFIXUPIMM* patterns.
2759 (<avx512>_fixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
2760 (<avx512>_fixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
2761 (<avx512>_fixupimm<mode>_mask<round_saeonly_name>): Update.
2762 (avx512f_sfixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
2763 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
2764 (avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Update.
2765 * config/i386/subst.md:
2766 (round_saeonly_sd_mask_operand4): Add new subst_attr.
2767 (round_saeonly_sd_mask_op4): Ditto.
2768 (round_saeonly_expand_operand5): Ditto.
2769 (round_saeonly_expand): Update.
2771 2018-11-05 Max Filippov <jcmvbkbc@gmail.com>
2773 * config/xtensa/uclinux.h (XTENSA_ALWAYS_PIC): Change to 0.
2775 2018-11-05 Segher Boessenkool <segher@kernel.crashing.org>
2777 PR rtl-optimization/87871
2778 * combine.c (make_more_copies): Skip if dest is frame_pointer_rtx.
2780 2018-11-05 Paul Koning <ni1d@arrl.net>
2782 * doc/sourcebuild.texi (target attributes): Document new "inf"
2783 effective target keyword.
2785 2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
2787 * config/s390/s390.c (s390_register_move_cost): Increase costs for
2788 moves involving the CC reg.
2790 2018-11-05 Richard Biener <rguenther@suse.de>
2792 PR tree-optimization/87873
2793 * tree-ssa-loop-manip.h (split_loop_exit_edge): Add copy_constants_p
2795 * tree-ssa-loop-manip.c (split_loop_exit_edge): Likewise.
2796 * tree-vect-loop.c (vect_transform_loop): When splitting the
2797 loop exit also create forwarder PHIs for constants.
2798 * tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges):
2799 Handle constant to_arg, add extra checking we match up the correct
2802 2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
2804 * config/s390/s390.md: QImode and HImode for load on condition.
2806 2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
2808 * config/s390/predicates.md: Fix typo.
2809 * config/s390/s390.md: Allow immediates for load on condition.
2811 2018-11-05 Martin Liska <mliska@suse.cz>
2813 * alloc-pool.h (struct pool_usage): Use SIZE_AMOUNT.
2814 * bitmap.h (struct bitmap_usage): Likewise.
2815 * ggc-common.c (SCALE): Remove.
2817 (struct ggc_usage): Use SIZE_AMOUNT. And update
2819 * ggc-page.c (SCALE): Remove.
2820 (STAT_LABEL): Remove.
2821 (ggc_print_statistics): Use SIZE_AMOUNT.
2822 * gimple.h (SCALE): Remove.
2824 * input.c (ONE_K): Remove.
2827 (STAT_LABEL): Likewise.
2828 (FORMAT_AMOUNT): Likewise.
2829 (dump_line_table_statistics): Use SIZE_AMOUNT.
2830 * mem-stats.h (struct mem_usage): Likewise.
2831 * rtl.c (dump_rtx_statistics): Likewise.
2832 (rtx_alloc_counts): Change type to size_t.
2833 (rtx_alloc_sizes): Likewise.
2834 (rtx_count_cmp): New.
2835 (dump_rtx_statistics): Sort first based on counts.
2836 * tree.c (tree_nodes_cmp): New.
2837 (tree_codes_cmp): New.
2838 (dump_tree_statistics): Sort first based on counts.
2839 * system.h (ONE_K): New.
2841 (SIZE_SCALE): Likewise.
2842 (SIZE_LABEL): Likewise.
2843 (SIZE_AMOUNT): Likewise.
2844 * tree-cfg.c (dump_cfg_stats): Use SIZE_AMOUNT.
2845 * tree-dfa.c (dump_dfa_stats): Likewise.
2846 * tree-phinodes.c (phinodes_print_statistics): Likewise.
2847 * tree-ssanames.c (ssanames_print_statistics): Likewise.
2848 * tree.c (dump_tree_statistics): Likewise.
2849 * vec.c (struct vec_usage): Likewise.
2850 * trans-mem.c (tm_mangle): Enlarge buffer in order to not
2851 trigger a -Werror=format-overflow with
2852 --enable-gather-detailed-stats.
2854 2018-11-05 Martin Liska <mliska@suse.cz>
2856 * mem-stats.h (mem_alloc_description::release_instance_overhead):
2858 * vec.c (struct vec_usage): Register m_element_size.
2859 (vec_prefix::register_overhead): New arguments: elements and
2861 (vec_prefix::release_overhead): Subtract elements.
2862 * vec.h (struct vec_prefix): Change signature.
2863 (va_heap::reserve): Pass proper arguments.
2864 (va_heap::release): Likewise.
2866 2018-11-05 Martin Liska <mliska@suse.cz>
2868 * mem-stats.h (mem_alloc_description::get_list): Fix GNU coding
2872 2018-11-05 Richard Biener <rguenther@suse.de>
2874 * tree-scalar-evolution.h (final_value_replacement_loop): Update
2876 * tree-scalar-evolution.c (final_value_replacement_loop): Return
2877 whether anything was done.
2878 (scev_const_prop): Remove constant propagation part, fold
2880 * tree-ssa-loop.c (pass_scev_cprop::execute): ... here.
2881 (pass_data_scev_cprop): TODO_cleanup_cfg is now done
2884 2018-11-05 Jakub Jelinek <jakub@redhat.com>
2886 PR tree-optimization/87859
2887 * gimple-ssa-store-merging.c (struct merged_store_group): Add
2888 only_constants and first_nonmergeable_order members.
2889 (merged_store_group::merged_store_group): Initialize them.
2890 (merged_store_group::do_merge): Clear only_constants member if
2891 adding something other than INTEGER_CST store.
2892 (imm_store_chain_info::coalesce_immediate_stores): Don't merge
2893 stores with order >= first_nonmergeable_order. Use
2894 merged_store->only_constants instead of always recomputing it.
2895 Set merged_store->first_nonmergeable_order if we've skipped any
2896 stores. Attempt to merge overlapping INTEGER_CST stores that
2897 we would otherwise skip.
2900 * match.pd (X + Y < X): Don't optimize if TYPE_OVERFLOW_SANITIZED.
2902 2018-11-05 Xuepeng Guo <xuepeng.guo@intel.com>
2905 * config/i386/emmintrin.h (__v16qs): New to cope with option
2907 (_mm_cmpeq_epi8): Replace __v16qi with __v16qs.
2908 (_mm_cmplt_epi8): Likewise.
2909 (_mm_cmpgt_epi8): Likewise.
2911 2018-11-05 Richard Biener <rguenther@suse.de>
2913 PR rtl-optimization/87852
2914 * fwprop.c (use_killed_between): Only consider single-defs of the
2915 use whose definition statement dominates the use.
2917 2018-11-05 Martin Liska <mliska@suse.cz>
2920 * doc/invoke.texi: Remove options that are
2921 not disabled with -Os.
2923 2018-11-05 Martin Liska <mliska@suse.cz>
2926 * doc/extend.texi: Update constrain about the last argument
2927 of __builtin_expect_with_probability.
2929 2018-11-05 Martin Liska <mliska@suse.cz>
2932 * predict.c (expr_expected_value_1): Verify
2933 that last argument is a real constants and emit
2936 2018-11-05 Martin Liska <mliska@suse.cz>
2938 PR gcov-profile/77698
2939 * ipa-profile.c (ipa_profile): Adjust hotness threshold
2942 2018-11-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
2944 PR tree-optimization/86572
2945 * builtins.c (c_strlen): Handle negative offsets in a safe way.
2947 2018-11-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
2949 PR tree-optimization/87672
2950 * gimple-fold.c (gimple_fold_builtin_stxcpy_chk): Gimplify.
2951 * tree-ssa-strlen.c (handle_builtin_strcat): Adjust object size.
2953 2018-11-04 Uros Bizjak <ubizjak@gmail.com>
2956 * cfgexpand.c (pass_expand::execute): Move the call to
2957 finish_eh_generation in front of the call to expand_stack_alignment.
2959 2018-11-04 Venkataramanan Kumar <venkataramanan.kumar@amd.com>
2961 * common/config/i386/i386-common.c (processor_alias_table): Add
2963 * config.gcc (i[34567]86-*-linux* | ...): Add znver2.
2964 (case ${target}): Add znver2.
2965 * config/i386/driver-i386.c: (host_detect_local_cpu): Let
2966 -march=native recognize znver2 processors.
2967 * config/i386/i386-c.c (ix86_target_macros_internal): Add znver2.
2968 * config/i386/i386.c (m_znver2): New definition.
2969 (m_ZNVER): New definition.
2970 (m_AMD_MULTIPLE): Includes m_znver2.
2971 (processor_cost_table): Add znver2 entry.
2972 (processor_target_table): Add znver2 entry.
2973 (get_builtin_code_for_version): Set priority for
2975 (processor_model): Add M_AMDFAM17H_ZNVER2.
2976 (arch_names_table): Ditto.
2977 (ix86_reassociation_width): Include znver2.
2978 * config/i386/i386.h (TARGET_znver2): New definition.
2979 (struct ix86_size_cost): Add TARGET_ZNVER2.
2980 (enum processor_type): Add PROCESSOR_ZNVER2.
2981 * config/i386/i386.md (define_attr "cpu"): Add znver2.
2982 * config/i386/x86-tune-costs.h: (processor_costs) Add znver2 costs.
2983 * config/i386/x86-tune-sched.c: (ix86_issue_rate): Add znver2.
2984 (ix86_adjust_cost): Add znver2.
2985 * config/i386/x86-tune.def: Replace m_ZNVER1 by m_ZNVER.
2986 * gcc/doc/extend.texi: Add details about znver2.
2987 * gcc/doc/invoke.texi: Add details about znver2.
2989 2018-11-03 Sandra Loosemore <sandra@codesourcery.com>
2993 * config/nios2/nios2.c (nios2_rtx_costs): Recognize <mul>sidi3
2996 2018-11-02 Aaron Sawdey <acsawdey@linux.ibm.com>
2998 * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Pay
2999 attention to TARGET_AVOID_XFORM and BYTES_BIG_ENDIAN.
3001 2018-11-02 Richard Earnshaw <rearnsha@arm.com>
3003 * config/aarch64/aarch64.c ((aarch64_override_options): Disable
3004 shrink-wrapping when -mtrack-speculation.
3006 2018-11-02 Richard Biener <rguenther@suse.de>
3008 * tree-ssa-coalesce.c (struct coalesce_list): Add obstack member.
3009 (pop_cost_one_pair): Do not free pair.
3010 (pop_best_coalesce): Likewise.
3011 (create_coalesce_list): Initialize obstack.
3012 (delete_coalesce_list): Free obstack.
3013 (find_coalesce_pair): Obstack-allocate coalesce pairs.
3014 (add_cost_one_coalesce): Likewise.
3015 (struct live_track): Remove bitmap pointer indirections.
3016 (new_live_track): Adjust.
3017 (delete_live_track): Likewise.
3018 (live_track_remove_partition): Likewise.
3019 (live_track_add_partition): Likewise.
3020 (live_track_live_p): Likewise.
3021 (live_track_process_def): Likewise.
3022 (live_track_clear_base_vars): Likewise.
3024 2018-11-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3026 * configure.ac (gcc_cv_as_sparc_register_op): Remove.
3027 * configure: Regenerate.
3028 * config.in: Regenerate.
3029 * config/sparc/sparc.c (sparc_output_scratch_registers): Remove
3030 HAVE_AS_REGISTER_PSEUDO_OP guard.
3031 * config/sparc/sparc.h (ASM_ARCH64_SPEC): Remove
3032 !HAVE_AS_REGISTER_PSEUDO_OP support.
3033 (ASM_DECLARE_REGISTER_GLOBAL): Remove HAVE_AS_REGISTER_PSEUDO_OP
3036 2018-11-02 Richard Biener <rguenther@suse.de>
3038 * dwarf2out.c (build_abbrev_table): Guard lookup_external_ref call
3041 2018-11-02 Richard Biener <rguenther@suse.de>
3043 PR tree-optimization/87776
3044 * tree-ssa-sccvn.c (do_rpo_vn): Do not mark backedges
3045 executable when iterating but running into rpo-vn-max-loop-depth
3046 and not eliding the iteration.
3048 2018-11-30 Jan Hubicka <jh@suse.cz>
3050 * tree.c (free_lang_data_in_decl): Free TREE_TYPE and alignment of
3053 2018-11-01 Aaron Sawdey <acsawdey@linux.ibm.com>
3055 * config/rs6000/rs6000-protos.h (rs6000_address_for_fpconvert): Remove
3057 * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem):
3058 Combine with rs6000_address_for_fpconvert.
3059 (rs6000_address_for_fpconvert): Combine with
3060 rs6000_force_indexed_or_indirect_mem.
3061 (rs6000_expand_vector_init): Change function call from
3062 rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
3063 * config/rs6000/rs6000.md (floatsi<mode>2_lfiwax): Change call from
3064 rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
3065 (floatsi<mode>2_lfiwax_mem): Ditto.
3066 (floatunssi<mode>2_lfiwzx): Ditto.
3067 (floatunssi<mode>2_lfiwzx_mem): Ditto.
3068 (float<QHI:mode><FP_ISA3:mode>2): Ditto.
3069 (floatuns<QHI:mode><FP_ISA3:mode>2): Ditto.
3070 (fix_trunc<mode>si2_stfiwx): Ditto.
3071 (fixuns_trunc<mode>si2_stfiwx): Ditto.
3072 (float_<mode>si2_hw): Ditto.
3073 (floatuns_<mode>si2_hw): Ditto.
3074 * config/rs6000/vsx.md (*vsx_extract_si): Ditto.
3075 (vsx_splat_<mode>): Ditto.
3077 2018-11-01 Joseph Myers <joseph@codesourcery.com>
3079 * configure.ac (gcc_cv_as_ia64_ltoffx_ldxmov_relocs): Add newline
3080 at end of assembler input text.
3081 * configure: Regenerate.
3083 2018-11-01 Jakub Jelinek <jakub@redhat.com>
3085 PR tree-optimization/87826
3086 * gimple-ssa-store-merging.c (do_shift_rotate): Punt if count is
3087 negative or larger or equal to type's precision.
3089 2018-10-31 Alexandre Oliva <aoliva@redhat.com>
3091 * opts.c (default_options_table): Do not enable
3092 OPT_fdelayed_branch at -Og.
3093 * doc/invoke.texi (-fdelayed-branch): Document it.
3095 2018-10-31 Richard Henderson <richard.henderson@linaro.org>
3097 * optabs-libfuncs.c (build_libfunc_function_visibility):
3098 New, split out from...
3099 (build_libfunc_function): ... here.
3100 (init_one_libfunc_visibility): New, split out from ...
3101 (init_one_libfunc): ... here.
3103 * config/aarch64/atomics.md (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse):
3104 scratch register need not be early-clobber. Document the reason
3105 why we cannot use ST<OP>.
3107 2018-10-31 Joseph Myers <joseph@codesourcery.com>
3110 * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE. Use single
3111 line for second argument of AC_DEFINE_UNQUOTED.
3112 * doc/install.texi (Tools/packages necessary for modifying GCC):
3113 Update to autoconf 2.69 and automake 1.15.1.
3114 * aclocal.m4, config.in, configure: Regenerate.
3116 2018-10-31 Pat Haugen <pthaugen@us.ibm.com>
3118 * tree-ssa-loop-ivcanon.c (try_peel_loop): Fix typo and remove dead
3121 2018-10-31 Martin Liska <mliska@suse.cz>
3124 * common/config/aarch64/aarch64-common.c (aarch64_parse_extension):
3125 Add new argument invalid_extension.
3126 (aarch64_get_all_extension_candidates): New function.
3127 (aarch64_rewrite_selected_cpu): Add NULL to function call.
3128 * config/aarch64/aarch64-protos.h (aarch64_parse_extension): Add
3130 (aarch64_get_all_extension_candidates): New function.
3131 * config/aarch64/aarch64.c (aarch64_parse_arch): Add new
3132 argument invalid_extension.
3133 (aarch64_parse_cpu): Likewise.
3134 (aarch64_print_hint_for_extensions): New function.
3135 (aarch64_validate_mcpu): Provide hint about invalid extension.
3136 (aarch64_validate_march): Likewise.
3137 (aarch64_handle_attr_arch): Pass new argument.
3138 (aarch64_handle_attr_cpu): Provide hint about invalid extension.
3139 (aarch64_handle_attr_isa_flags): Likewise.
3141 2018-10-31 Richard Biener <rguenther@suse.de>
3145 * tree-outof-ssa.c (insert_backedge_copies): Restrict
3146 copy generation to useful cases. Place the copy before
3147 the definition of the backedge value when possible.
3149 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
3151 * config/arc/arc-arch.h (ARC_TUNE_ARC7XX): New tune value.
3152 * config/arc/arc.c (arc_active_insn): New function.
3153 (check_store_cacheline_hazard): Likewise.
3154 (workaround_arc_anomaly): Use check_store_cacheline_hazard.
3155 (arc_override_options): Disable delay slot scheduler for older
3157 (arc_store_addr_hazard_p): New implementation, old one renamed to
3159 (arc_store_addr_hazard_internal_p): Renamed.
3160 (arc_reorg): Don't combine into brcc instructions which are part
3161 of hardware hazard solution.
3162 * config/arc/arc.md (attr tune): Consider new arc7xx tune value.
3163 (tune_arc700): Likewise.
3164 * config/arc/arc.opt (arc7xx): New tune value.
3165 * config/arc/arc700.md: Improve A7 scheduler.
3167 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
3169 * config/arc/arc.c (arc_override_options): Remove
3170 TARGET_COMPACT_CASESI.
3171 * config/arc/arc.h (ASM_OUTPUT_ADDR_DIFF_ELT): Update.
3172 (CASE_VECTOR_MODE): Likewise.
3173 (CASE_VECTOR_PC_RELATIVE): Likewise.
3174 (CASE_VECTOR_SHORTEN_MODE): Likewise.
3175 (CASE_VECTOR_SHORTEN_MODE1): Delete.
3176 (ADDR_VEC_ALIGN): Update.
3177 (ASM_OUTPUT_CASE_LABEL): Undefine.
3178 (ASM_OUTPUT_BEFORE_CASE_LABEL): Undefine.
3179 (TARGET_BI_BIH): Define.
3180 (DEFAULT_BRANCH_INDEX): Likewise.
3181 * config/arc/arc.md (casesi): Rework to accept BI/BIH
3182 instructions, remove compact_casesi use case.
3183 (casesi_compact_jump): Remove.
3184 (casesi_dispatch): New pattern.
3185 * config/arc/arc.opt: Add mbranch-index option. Deprecate
3186 compact_casesi option.
3187 * doc/invoke.texi: Document mbranch-index option.
3189 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
3191 * config/arc/arc.c (arc_get_tp): Remove function.
3192 (arc_emit_call_tls_get_addr): Likewise.
3193 (arc_call_tls_get_addr): New function.
3194 (arc_legitimize_tls_address): Make use of arc_call_tls_get_addr.
3195 * config/arc/arc.md (tls_load_tp_soft): Remove.
3196 (tls_gd_get_addr): Likewise.
3198 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
3200 * config/arc/arc.md (mulsi3): Remove call to mulsi_600_lib.
3201 (mulsi3_600_lib): Remove pattern.
3202 (umulsi3_highpart_600_lib_le): Likewise.
3203 (umulsi3_highpart): Remove call to umulsi3_highpart_600_lib_le.
3204 (umulsidi3): Remove call to umulsidi3_600_lib.
3205 (umulsidi3_600_lib): Remove pattern.
3206 (peephole2): Remove peephole using the above deprecated patterns.
3208 2018-10-31 Thomas Preud'homme <thomas.preudhomme@linaro.org>
3211 * config/arm/arm.c (arm_option_check_internal): Disable the combined
3212 use of -mslow-flash-data and -mword-relocations.
3213 (arm_option_override): Enable -mword-relocations if -fpic or -fPIC.
3214 * config/arm/arm.md (SYMBOL_REF MOVT splitter): Stop checking for
3216 * doc/invoke.texi (-mword-relocations): Mention conflict with
3218 (-mslow-flash-data): Reciprocally.
3220 2018-10-31 Richard Henderson <richard.henderson@linaro.org>
3222 * config/aarch64/aarch64.c (aarch64_hard_regno_mode_ok): Force
3223 16-byte modes held in GP registers to use an even regno.
3225 * config/aarch64/aarch64.c (aarch64_emit_bic): Remove.
3226 (aarch64_atomic_ldop_supported_p): Remove.
3227 (aarch64_gen_atomic_ldop): Remove.
3228 * config/aarch64/atomic.md (atomic_<atomic_optab><ALLI>):
3229 Fully expand LSE operations here.
3230 (atomic_fetch_<atomic_optab><ALLI>): Likewise.
3231 (atomic_<atomic_optab>_fetch<ALLI>): Likewise.
3232 (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse): Drop atomic_op iterator
3233 and use ATOMIC_LDOP instead; use register_operand for the input;
3234 drop the split and emit insns directly.
3235 (aarch64_atomic_fetch_<ATOMIC_LDOP><ALLI>_lse): Likewise.
3236 (aarch64_atomic_<atomic_op>_fetch<ALLI>_lse): Remove.
3237 (@aarch64_atomic_load<ATOMIC_LDOP><ALLI>): Remove.
3239 * config/aarch64/aarch64.c (aarch64_emit_atomic_swap): Remove.
3240 (aarch64_gen_atomic_ldop): Don't call it.
3241 * config/aarch64/atomics.md (atomic_exchange<ALLI>):
3242 Use aarch64_reg_or_zero.
3243 (aarch64_atomic_exchange<ALLI>): Likewise.
3244 (aarch64_atomic_exchange<ALLI>_lse): Remove split; remove & from
3245 operand 0; use aarch64_reg_or_zero for input; merge ...
3246 (@aarch64_atomic_swp<ALLI>): ... this and remove.
3248 * config/aarch64/aarch64.c (aarch64_gen_compare_reg_maybe_ze): New.
3249 (aarch64_split_compare_and_swap): Use it.
3250 (aarch64_expand_compare_and_swap): Likewise. Remove convert_modes;
3251 test oldval against the proper predicate.
3252 * config/aarch64/atomics.md (@atomic_compare_and_swap<ALLI>):
3253 Use nonmemory_operand for expected.
3254 (cas_short_expected_pred): New.
3255 (@aarch64_compare_and_swap<SHORT>): Use it; use "rn" not "rI" to match.
3256 (@aarch64_compare_and_swap<GPI>): Use "rn" not "rI" for expected.
3257 * config/aarch64/predicates.md (aarch64_plushi_immediate): New.
3258 (aarch64_plushi_operand): New.
3260 * config/aarch64/aarch64.c (aarch64_expand_compare_and_swap):
3261 Force oldval into the rval register for TARGET_LSE; emit the compare
3262 during initial expansion so that it may be deleted if unused.
3263 (aarch64_gen_atomic_cas): Remove.
3264 * config/aarch64/atomics.md (@aarch64_compare_and_swap<SHORT>_lse):
3265 Change =&r to +r for operand 0; use match_dup for operand 2;
3266 remove is_weak and mod_f operands as unused. Drop the split
3268 (@aarch64_atomic_cas<SHORT>): ... this pattern's output; remove.
3269 (@aarch64_compare_and_swap<GPI>_lse): Similarly.
3270 (@aarch64_atomic_cas<GPI>): Similarly.
3272 2018-10-31 Richard Biener <rguenther@suse.de>
3274 * tree-eh.c (replace_trapping_overflow): Simplify ABS_EXPR case
3277 2018-10-31 Sameera Deshpande <sameera.deshpande@linaro.org>
3279 * config/aarch64/aarch64-cores.def (saphira): Use saphira pipeline.
3280 * config/aarch64/aarch64.md: Include saphira.md
3281 * config/aarch64/saphira.md: New file for pipeline description.
3283 2018-10-30 Martin Sebor <msebor@redhat.com>
3286 * gimple-ssa-sprintf.c (format_directive): Use %G to include
3288 (sprintf_dom_walker::compute_format_length):
3289 Avoid setting POSUNDER4K here.
3290 (get_destination_size): Handle null argument values.
3291 (get_user_idx_format): New function.
3292 (sprintf_dom_walker::handle_gimple_call): Handle all printf-like
3293 functions, including user-defined with attribute format printf.
3294 Use %G to include inlining context.
3295 Set POSUNDER4K here.
3297 2018-10-30 Jan Hubicka <jh@suse.cz>
3299 * params.def (lto-partitions): Bump from 32 to 128.
3301 2018-10-30 Jan Hubicka <jh@suse.cz>
3304 (free_lang_data_d, add_tree_to_fld_list, fld_worklist_push): Move
3306 (free_lang_data_in_type): Forward declare.
3307 (fld_type_variant_equal_p): New function.
3308 (fld_type_variant): New function
3309 (fld_incomplete_types): New hash.
3310 (fld_incomplete_type_of): New function
3311 (fld_simplfied-type): New function.
3312 (free_lang_data_in_decl): Add fld parameter; simplify type of FIELD_DECL
3313 (free_lang_data): Allocate and free fld_incomplete_type; update call
3314 of free_lang_data_in_decl.
3316 2018-10-30 Eric Botcazou <ebotcazou@adacore.com>
3318 * gcov.c (output_lines): Remove duplicate line.
3320 2018-10-30 Aaron Sawdey <acsawdey@linux.ibm.com>
3322 * config/rs6000/rs6000.md (bswapdi2): Force address into register
3323 if not in indexed or indirect form.
3324 (bswapdi2_load): Change predicate to indexed_or_indirect_operand.
3325 (bswapdi2_store): Ditto.
3326 * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem): New
3328 * config/rs6000/rs6000-protos.h (rs6000_force_indexed_or_indirect_mem):
3329 Prototype for helper function.
3331 2018-10-30 Martin Sebor <msebor@redhat.com>
3333 * doc/extend.texi (optimize): Clarify/expand attribute documentation.
3334 (target, pragma GCC optimize, pragma GCC target): Ditto.
3336 2018-10-30 Jonathan Wakely <jwakely@redhat.com>
3338 * doc/extend.texi: Fix prototype and description of
3339 __builtin_expect_with_probability.
3341 2018-10-30 Michael Ploujnikov <michael.ploujnikov@oracle.com>
3343 * cgraph.h (clone_function_name_1): Replaced by new
3344 clone_function_name_numbered that takes name as string; for
3345 privatize_symbol_name_1 use only.
3346 (clone_function_name): Renamed to
3347 clone_function_name_numbered to be explicit about numbering.
3348 (clone_function_name): New two-argument function that does
3349 not number its output.
3350 (clone_function_name): New three-argument function that
3351 takes a number to append to its output.
3352 * cgraphclones.c (duplicate_thunk_for_node):
3353 (clone_function_name_1): Renamed.
3354 (clone_function_name_numbered): Two new functions.
3355 (clone_function_name): Improved documentation.
3356 (cgraph_node::create_virtual_clone): Use clone_function_name_numbered.
3357 * config/rs6000/rs6000.c (make_resolver_func): Ditto.
3358 * final.c (final_scan_insn_1): Use the new clone_function_name
3360 * multiple_target.c (create_dispatcher_calls): Ditto.
3361 (create_target_clone): Ditto.
3362 * omp-expand.c (grid_expand_target_grid_body): Ditto.
3363 * omp-low.c (create_omp_child_function_name): Ditto.
3364 * omp-simd-clone.c (simd_clone_create): Ditto.
3365 * symtab.c (simd_symtab_node::noninterposable_alias): Use the
3366 new clone_function_name without numbering.
3368 2018-10-30 Richard Earnshaw <rearnsha@arm.com>
3370 * alloc-pool.h (base_pool_allocator <TBlockAllocator>::initialize):
3371 Assert that the allocation size is not zero.
3373 2018-10-30 Richard Biener <rguenther@suse.de>
3375 PR tree-optimization/87800
3376 * tree-vect-slp.c (vect_build_slp_tree_2): Reject any
3377 non-induction or reduction PHIs.
3379 2018-10-30 Sameera Deshpande <sameera.deshpande@linaro.org
3381 * config/aarch64/falkor-tag-collision-avoidance.c
3382 (execute_tag_collision_avoidance): Call df_note_add_problem.
3384 2018-10-30 Martin Liska <mliska@suse.cz>
3386 * doc/extend.texi: Fix typo in documentation
3387 of __builtin_expect_with_probability.
3389 2018-10-29 David Malcolm <dmalcolm@redhat.com>
3392 * input.c (get_substring_ranges_for_loc): Detect if
3393 linemap_resolve_location gives us a NULL map, and reject
3396 2018-10-29 Iain Buclaw <ibuclaw@gdcproject.org>
3398 * config.gcc (xstormy16-*-elf): Set tm_d_file.
3400 2018-10-29 David Malcolm <dmalcolm@redhat.com>
3401 Martin Sebor <msebor@redhat.com>
3402 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3404 * doc/ux.texi (Quoting): New subsection, adapted from material at
3405 https://gcc.gnu.org/wiki/DiagnosticsGuidelines written by
3406 MartinSebor and ManuelLopezIbanez.
3407 (Fix-it hints): Note that fix-it hints shouldn't be marked for
3410 2018-10-29 Kugan Vivekanandarajah <kuganv@linaro.org>
3413 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Fix niter
3416 2018-10-29 Paul A. Clarke <pc@us.ibm.com>
3418 * gcc.target/powerpc/ssse3-check.h: Remove inaccurate comment.
3420 2018-10-29 Paul Koning <ni1d@arrl.net>
3422 * doc/rtl.texi (CONST_WIDE_INT_ELT): Give correct macro name.
3424 2018-10-29 Paul A. Clarke <pc@us.ibm.com>
3426 * gcc/config/rs6000/mmintrin.h (_mm_packs_pi16, _mm_packs_pi32,
3427 _mm_packs_pu16, _mm_unpackhi_pi8, _mm_unpacklo_pi8, _mm_add_pi8,
3428 _mm_add_pi16, _mm_add_pi32, _mm_sub_pi8, _mm_sub_pi16, _mm_sub_pi32,
3429 _mm_cmpgt_pi8, _mm_cmpeq_pi16, _mm_cmpgt_pi16, _mm_cmpeq_pi32,
3430 _mm_cmpgt_pi32, _mm_adds_pi8, _mm_adds_pi16, _mm_adds_pu8,
3431 _mm_adds_pu16, _mm_subs_pi8, _mm_subs_pi16, _mm_subs_pu8,
3432 _mm_subs_pu16, _mm_madd_pi16, _mm_mulhi_pi16, _mm_mullo_pi16,
3433 _mm_sll_pi16, _mm_sra_pi16, _mm_srl_pi16, _mm_set1_pi16, _mm_set1_pi8):
3434 Change 'vector' to '__vector'.
3435 * gcc/config/rs6000/xmmintrin.h (_mm_cvtps_pi32, _mm_cvttps_pi32,
3436 _mm_cvtps_pi16, _mm_cvtps_pi8, _mm_max_pi16, _mm_max_pu8, _mm_min_pi16,
3437 _mm_min_pu8, _mm_mulhi_pu16, _mm_shuffle_pi16, _mm_avg_pu8,
3438 _mm_avg_pu16): Likewise. And, whitespace corrections.
3440 2018-10-29 Richard Biener <rguenther@suse.de>
3442 PR tree-optimization/87785
3443 * tree-vect-slp.c (vect_gather_slp_loads): Only gather
3446 2018-10-29 Olivier Hainque <hainque@adacore.com>
3448 * VXWORKS_NET_LIBS_RTP: New macro, network part of VXWORKS_LIBS_RTP.
3450 2018-10-29 Olivier Hainque <hainque@adacore.com>
3452 * config/vxworks.h (VXWORKS_PERSONALITY): New VxWorks
3453 ports configuration macro, defaults to "gnu".
3454 (VXWORKS_OS_CPP_BUILTINS): Use it. Feed TOOL and
3455 TOOL_FAMILY instead of _VX_TOOL/_VXTOOL_FAMILY.
3457 2018-10-29 Olivier Hainque <hainque@adacore.com>
3459 * config/vxworks.h (CLEAR_INSN_CACHE): #undef before #define.
3461 2018-10-29 Richard Biener <rguenther@suse.de>
3463 PR tree-optimization/87790
3464 * tree-vect-slp.c (vect_mark_slp_stmts): Simplify.
3465 (vect_make_slp_decision): Adjust.
3466 (vect_slp_analyze_bb_1): Likewise.
3467 (vect_detect_hybrid_slp_stmts): Properly union SLP type over
3470 2018-10-29 Richard Biener <rguenther@suse.de>
3472 PR tree-optimization/87785
3473 * tree-vect-slp.c (vect_build_slp_tree_2): Remove loads argument
3475 (vect_build_slp_tree): Likewise.
3476 (vect_gather_slp_loads): New function.
3477 (vect_analyze_slp_instance): Gather loads separately from the
3480 2018-10-29 Martin Liska <mliska@suse.cz>
3482 * Makefile.in: Make dependency to json.o.
3483 * doc/gcov.texi: Document new JSON format, remove
3484 old intermediate format documentation.
3485 * gcov.c (struct function_info): Come up with m_name and
3487 (function_info::function_info): Initialize it.
3488 (function_info::~function_info): Release it.
3489 (main): Rename flag_intermediate_format to flag_json_format.
3490 (print_usage): Describe --json-format.
3491 (process_args): Set flag_json_format.
3492 (output_intermediate_line): Remove.
3493 (output_intermediate_json_line): Likewise.
3494 (get_gcov_intermediate_filename): Return new extension
3496 (output_intermediate_file): Implement JSON emission.
3497 (output_json_intermediate_file): Implement JSON emission.
3498 (generate_results): Use ::get_name for function name.
3499 Handle JSON output file.
3500 (read_graph_file): Use ::get_name instead of cplus_demangle.
3501 (read_count_file): Likewise.
3502 (solve_flow_graph): Likewise.
3503 (add_line_counts): Likewise.
3504 (accumulate_line_counts): Use new flag_json_format.
3505 (output_function_details): Use ::get_name instead of cplus_demangle.
3506 (output_lines): Likewise.
3507 * json.cc (test_writing_literals): Add new tests.
3508 * json.h (class literal): Add new boolean constructor.
3510 2018-10-29 Segher Boessenkool <segher@kernel.crashing.org>
3512 PR rtl-optimization/87701
3513 PR rtl-optimization/87780
3514 * combine.c (make_more_copies): Rewrite.
3516 2018-10-28 Kugan Vivekanandarajah <kuganv@linaro.org>
3518 * doc/generic.texi (ABSU_EXPR): Document.
3519 * match.pd (absu(x)*absu(x) -> x*x): Handle.
3520 (absu(absu(X)) -> absu(X)): Likewise.
3521 (absu(-X) -> absu(X)): Likewise.
3522 (absu(X) where X is nonnegative -> X): Likewise.
3524 2018-10-28 Iain Buclaw <ibuclaw@gdcproject.org>
3526 * Makefile.in (tm_d_file_list, tm_d_include_list): New variables.
3527 (TM_D_H, D_TARGET_DEF, D_TARGET_H, D_TARGET_OBJS): New variables.
3528 (tm_d.h, cs-tm_d.h, default-d.o): New rules.
3529 (d/d-target-hooks-def.h, s-d-target-hooks-def-h): New rules.
3530 (s-tm-texi): Also check timestamp on d-target.def.
3531 (generated_files): Add TM_D_H and d-target-hooks-def.h.
3532 (build/genhooks.o): Also depend on D_TARGET_DEF.
3533 * config.gcc (tm_d_file, d_target_objs, target_has_targetdm): New
3535 * config/aarch64/aarch64-d.c: New file.
3536 * config/aarch64/aarch64-linux.h (GNU_USER_TARGET_D_CRITSEC_SIZE):
3538 * config/aarch64/aarch64-protos.h (aarch64_d_target_versions): New
3540 * config/aarch64/aarch64.h (TARGET_D_CPU_VERSIONS): Define.
3541 * config/aarch64/t-aarch64 (aarch64-d.o): New rule.
3542 * config/arm/arm-d.c: New file.
3543 * config/arm/arm-protos.h (arm_d_target_versions): New prototype.
3544 * config/arm/arm.h (TARGET_D_CPU_VERSIONS): Define.
3545 * config/arm/linux-eabi.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
3546 * config/arm/t-arm (arm-d.o): New rule.
3547 * config/default-d.c: New file.
3548 * config/glibc-d.c: New file.
3549 * config/gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
3550 * config/i386/i386-d.c: New file.
3551 * config/i386/i386-protos.h (ix86_d_target_versions): New prototype.
3552 * config/i386/i386.h (TARGET_D_CPU_VERSIONS): Define.
3553 * config/i386/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
3554 (GNU_USER_TARGET_D_CRITSEC_SIZE): Define.
3555 * config/i386/t-i386 (i386-d.o): New rule.
3556 * config/kfreebsd-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
3557 * config/kopensolaris-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
3558 * config/linux-android.h (ANDROID_TARGET_D_OS_VERSIONS): Define.
3559 * config/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
3560 * config/mips/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
3561 * config/mips/mips-d.c: New file.
3562 * config/mips/mips-protos.h (mips_d_target_versions): New prototype.
3563 * config/mips/mips.h (TARGET_D_CPU_VERSIONS): Define.
3564 * config/mips/t-mips (mips-d.o): New rule.
3565 * config/powerpcspe/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
3566 * config/powerpcspe/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
3567 * config/powerpcspe/powerpcspe-d.c: New file.
3568 * config/powerpcspe/powerpcspe-protos.h (rs6000_d_target_versions):
3570 * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
3571 Support GNU D by using 0 as the language type.
3572 * config/powerpcspe/powerpcspe.h (TARGET_D_CPU_VERSIONS): Define.
3573 * config/powerpcspe/t-powerpcspe (powerpcspe-d.o): New rule.
3574 * config/riscv/riscv-d.c: New file.
3575 * config/riscv/riscv-protos.h (riscv_d_target_versions): New
3577 * config/riscv/riscv.h (TARGET_D_CPU_VERSIONS): Define.
3578 * config/riscv/t-riscv (riscv-d.o): New rule.
3579 * config/rs6000/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
3580 * config/rs6000/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
3581 * config/rs6000/rs6000-d.c: New file.
3582 * config/rs6000/rs6000-protos.h (rs6000_d_target_versions): New
3584 * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
3585 Support GNU D by using 0 as the language type.
3586 * config/rs6000/rs6000.h (TARGET_D_CPU_VERSIONS): Define.
3587 * config/rs6000/t-rs6000 (rs6000-d.o): New rule.
3588 * config/s390/s390-d.c: New file.
3589 * config/s390/s390-protos.h (s390_d_target_versions): New prototype.
3590 * config/s390/s390.h (TARGET_D_CPU_VERSIONS): Define.
3591 * config/s390/t-s390 (s390-d.o): New rule.
3592 * config/sparc/sparc-d.c: New file.
3593 * config/sparc/sparc-protos.h (sparc_d_target_versions): New
3595 * config/sparc/sparc.h (TARGET_D_CPU_VERSIONS): Define.
3596 * config/sparc/t-sparc (sparc-d.o): New rule.
3597 * config/t-glibc (glibc-d.o): New rule.
3598 * configure: Regenerated.
3599 * configure.ac (tm_d_file): New variable.
3600 (tm_d_file_list, tm_d_include_list, d_target_objs): Add substitutes.
3601 * doc/contrib.texi (Contributors): Add self for the D frontend.
3602 * doc/frontends.texi (G++ and GCC): Mention D as a supported language.
3603 * doc/install.texi (Configuration): Mention libphobos as an option for
3604 --enable-shared. Mention d as an option for --enable-languages.
3605 (Testing): Mention check-d as a target.
3606 * doc/invoke.texi (Overall Options): Mention .d, .dd, and .di as file
3607 name suffixes. Mention d as a -x option.
3608 * doc/sourcebuild.texi (Top Level): Mention libphobos.
3609 * doc/standards.texi (Standards): Add section on D language.
3610 * doc/tm.texi: Regenerated.
3611 * doc/tm.texi.in: Add @node for D language and ABI, and @hook for
3612 TARGET_CPU_VERSIONS, TARGET_D_OS_VERSIONS, and TARGET_D_CRITSEC_SIZE.
3613 * dwarf2out.c (is_dlang): New function.
3614 (gen_compile_unit_die): Use DW_LANG_D for D.
3615 (declare_in_namespace): Return module die for D, instead of adding
3616 extra declarations into the namespace.
3617 (gen_namespace_die): Generate DW_TAG_module for D.
3618 (gen_decl_die): Handle CONST_DECLSs for D.
3619 (dwarf2out_decl): Likewise.
3620 (prune_unused_types_walk_local_classes): Handle DW_tag_interface_type.
3621 (prune_unused_types_walk): Handle DW_tag_interface_type same as other
3622 kinds of aggregates.
3623 * gcc.c (default_compilers): Add entries for .d, .dd and .di.
3624 * genhooks.c: Include d/d-target.def.
3626 2018-10-28 Iain Sandoe <iain@sandoe.co.uk>
3629 * config/rs6000/darwin.h (STACK_BOUNDARY): New.
3630 (RS6000_STARTING_FRAME_OFFSET): Adjust to preserve 16byte alignment.
3631 (STACK_DYNAMIC_OFFSET): Likewise.
3633 2018-10-27 Sandra Loosemore <sandra@codesourcery.com>
3636 * config/nios2/nios2.c (nios2_valid_target_attribute_rec): Fix
3639 2018-10-26 Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
3641 * doc/extend.texi (PowerPC builtins): Fix __builtin_unpack_ibm128
3642 return type and other typos.
3644 2018-10-26 Aaron Sawdey <acsawdey@linux.ibm.com>
3646 * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Change to
3647 a shorter sequence with fewer branches.
3648 (emit_final_str_compare_gpr): Ditto.
3650 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
3652 * config/rs6000/tmmintrin.h: New file.
3653 * config.gcc (powerpc*-*-*): Add tmmintrin.h to extra_headers.
3655 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
3657 * config/rs6000/mmintrin.h: Enable 32bit compilation.
3658 * config/rs6000/xmmintrin.h: Likewise.
3660 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
3662 * config/rs6000/xmmintrin.h (_mm_extract_pi16): Fix for big-endian.
3664 2018-10-26 Richard Biener <rguenther@suse.de>
3666 * tree-vect-slp.c (vect_mark_slp_stmts): Add visited hash_set
3668 (vect_mark_slp_stmts_relevant): Likewise.
3669 (vect_detect_hybrid_slp_stmts): Likewise.
3670 (vect_bb_slp_scalar_cost): Likewise.
3671 (vect_remove_slp_scalar_calls): Likewise.
3673 2018-10-26 Jan Hubicka <jh@suse.cz>
3675 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix recursion.
3676 (warn_types_mismatch): Fix walk of DECL_NAME.
3677 (odr_types_equivalent_p): Fix overactive assert.
3679 2018-10-26 Richard Biener <rguenther@suse.de>
3681 PR tree-optimization/87105
3682 * tree-vectorizer.h (_slp_tree::refcnt): New member.
3683 * tree-vect-slp.c (vect_free_slp_tree): Decrement and honor
3685 (vect_create_new_slp_node): Initialize refcnt to one.
3687 (scalar_stmts_set_t, bst_fail): Remove.
3688 (vect_build_slp_tree_2): Add bst_map argument and adjust calls.
3689 (vect_build_slp_tree): Add bst_map argument and lookup
3690 already created SLP nodes.
3691 (vect_print_slp_tree): Handle a SLP graph, print SLP node
3693 (vect_slp_rearrange_stmts): Handle a SLP graph.
3694 (vect_analyze_slp_instance): Adjust and free SLP nodes from
3695 the CSE map. Fix indenting.
3696 (vect_schedule_slp_instance): Add short-cut.
3698 2018-10-26 Martin Liska <mliska@suse.cz>
3701 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Hash with
3702 addr_expr and not with pointers.
3704 2018-10-26 Jan Hubicka <jh@suse.cz>
3706 * tree.c (free_lang_data_in_type): Only check main variants.
3707 * ipa-devirt.c (warn_odr): Make static.
3708 (types_same_for_odr): Drop strict variant.
3709 (types_odr_comparable): Likewise.
3710 (odr_or_derived_type_p): Look for main variants.
3711 (odr_name_hasher::equal): Cleanup comment.
3712 (odr_subtypes_equivalent): Add warn and warned arguments; check main
3714 (type_variants_equivalent_p): break out from ...
3715 (odr_types_equivalent): ... here; go for main variants where needed.
3716 (warn_odr): ... here; turn static.
3717 (warn_types_mismatch): Compare mangled names of main variants.
3718 * ipa-utils.h (types_odr_comparable): Drop strict parameter.
3719 (type_with_linkage_p): Sanity check that we look at main variant.
3720 * lto.c (lto_read_decls): Only consider main variant to be ODR type.
3721 * tree.h (types_same_for_odr): Drop strict argument.
3723 2018-10-26 Richard Biener <rguenther@suse.de>
3725 PR tree-optimization/87746
3726 * tree-vect-data-refs.c (vect_update_misalignment_for_peel):
3727 Simplify and fix WRT strided store groups with size not
3728 equal to step in element count.
3729 (vect_analyze_group_access_1): Dump the whole group.
3731 2018-10-25 Carl Love <cel@us.ibm.com>
3733 * config/rs6000/rs6000-c.c (P9V_BUILTIN_VEC_VSCEDPGT,
3734 P9V_BUILTIN_VEC_VSCEDPLT, P9V_BUILTIN_VEC_VSCEDPEQ,
3735 P9V_BUILTIN_VEC_VSCEDPUO): Rename base overloaded name. Add quad
3736 precicion entry for each overloaded builtin.
3737 * config/rs6000/rs6000-builtin.def (VSCEDPGT, VSCEDPLT, VSCEDPEQ,
3738 VSCEDPUO): Rename overloaded name.
3739 (VSCEDPGT, VSCEQPGT, VSCEDPLT, VSCEQPLT, VSCEDPEQ, VSCEQPEQ,
3740 VSCEDPUO, VSCEQPUO): Add defitions for overloaded builtins.
3741 * config/rs6000/vsx.md (xscmpexpqp_<code>_<mode>): Add
3742 define_expand for xscmpexqp instruction.
3743 (*xscmpexpqp): Add define_insn for the xscmpexqp instruction.
3745 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
3746 Jinsong Ji <jji@us.ibm.com>
3748 * config/rs6000/emmintrin.h (_mm_slli_epi16): Replace deprecated
3749 function with vec_sl.
3750 (_mm_slli_epi32): Likewise.
3751 (_mm_slli_epi64): Likewise.
3752 (_mm_srai_epi16): Replace deprecated function with vec_sra.
3753 (_mm_srai_epi32): Likewise.
3754 (_mm_srli_epi16): Replace deprecated function with vec_sr.
3755 (_mm_srli_epi32): Likewise.
3756 (_mm_srli_epi64): Likewise.
3757 (_mm_sll_epi16): Replace deprecated function with vec_sl.
3758 (_mm_sll_epi32): Likewise.
3759 (_mm_sll_epi64): Likewise.
3760 (_mm_sra_epi16): Replace deprecated function with vec_sra.
3761 (_mm_sra_epi32): Likewise.
3762 (_mm_srl_epi16): Replace deprecated function with vec_sr.
3763 (_mm_srl_epi32): Likewise.
3764 (_mm_srl_epi64): Likewise.
3766 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
3767 Jinsong Ji <jji@us.ibm.com>
3769 * gcc/config/rs6000/emmintrin.h (_mm_sll_epi16): Replace
3770 comparison operators with vec_cmp* for compatibility due to
3771 unfortunate history; clean up formatting and use types more
3773 (_mm_sll_epi32): Likewise.
3774 (_mm_sll_epi64): Likewise.
3775 (_mm_srl_epi16): Likewise.
3776 (_mm_srl_epi32): Likewise.
3777 (_mm_srl_epi64): Likewise.
3779 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
3780 Jinsong Ji <jji@us.ibm.com>
3782 * config/rs6000/emmintrin.h (_mm_sll_epi64): Remove wrong cast.
3783 * config/rs6000/xmmintrin.h (_mm_min_ps): Change m's type to
3784 __vector __bool int. Use vec_cmpgt in preference to deprecated
3785 function vec_vcmpgtfp.
3786 (_mm_max_ps): Likewise.
3788 2018-10-25 Jeff Law <law@redhat.com>
3790 * config/rl78/rl78.c (insn_ok_now): Always re-recognize the insn
3793 2018-10-25 Martin Sebor <msebor@redhat.com>
3795 * doc/extend.texi (aligned): Expand attribute description.
3796 (Alignment): Rename section. Discuss function arguments.
3798 2018-10-25 Jan Hubicka <jh@suse.cz>
3800 * ipa-devirt.c (main_odr_variant): Remove.
3801 (hash_odr_name, types_same_for_odr, types_odr_comparable,
3802 odr_name_hasher::equal, odr_subtypes_equivalent_p):
3803 Drop use of main_odr_variant.
3804 (add_type_duplicate): Silence confused warnings on integer types.
3805 (get_odr_type): Always look for main variant.
3806 (register_odr_type): Simplify.
3808 2018-10-25 Richard Biener <rguenther@suse.de>
3810 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses):
3811 Initialize ng to silence error with release checking bootstrap.
3813 2018-10-25 Richard Biener <rguenther@suse.de>
3815 * tree-if-conv.c: Include tree-ssa-sccvn.h.
3816 (tree_if_conversion): Run CSE on the if-converted loop body.
3818 2018-10-25 Ilya Leoshkevich <iii@linux.ibm.com>
3820 * config/s390/constraints.md (ZL): New constraint.
3821 * config/s390/s390.c (legitimate_pic_operand_p): Accept LARL
3823 * config/s390/s390.md (movdi_larl): Remove.
3824 (movdi_64): Add the LARL alternative.
3826 2018-10-25 Ilya Leoshkevich <iii@linux.ibm.com>
3829 * rtl.c (RTX_CODE_HWINT_P_1): New helper macro.
3830 (RTX_CODE_HWINT_P): New macro.
3831 (rtx_code_size): Use RTX_CODE_HWINT_P ().
3833 2018-10-25 Jan Hubicka <jh@suse.cz>
3835 * ipa-devirt.c (odr_types_equivalent_p): Do not ICE if one of types
3838 2018-10-25 Richard Biener <rguenther@suse.de>
3840 PR tree-optimization/87665
3841 PR tree-optimization/87745
3842 * tree-vectorizer.h (get_earlier_stmt): Remove.
3843 (get_later_stmt): Pick up UID from the original non-pattern stmt.
3845 2018-10-25 Sam Tebbs <sam.tebbs@arm.com>
3847 * options.texi (Deprecated): Move list to Var section.
3849 2018-10-24 Bill Schmidt <wschmidt@linux.ibm.com>
3850 Jinsong Ji <jji@us.ibm.com>
3852 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Change deprecated
3853 __vector long to __vector long long.
3854 (_mm_cvtpd_ps): Likewise.
3855 (_mm_cvttpd_epi32): Likewise.
3856 (_mm_cvtpi32_pd): Likewise.
3857 (_mm_unpackhi_epi64): Likewise.
3858 (_mm_unpacklo_epi64): Likewise.
3860 2018-10-24 Segher Boessenkool <segher@kernel.crashing.org>
3862 PR rtl-optimization/87720
3863 * combine.c (make_more_copies): Skip if the dest is pc_rtx.
3865 2018-10-24 Alexandre Oliva <aoliva@redhat.com>
3867 * gimple-ssa-isolate-paths.c
3868 (find_implicit_erroneous_behavior): Do not change code if the
3869 pass is running for warnings only.
3870 (find_explicit_erroneous_behavior): Likewise.
3872 2018-10-24 Michael Meissner <meissner@linux.ibm.com>
3874 * config/rs6000/rs6000.c (TARGET_MANGLE_DECL_ASSEMBLER_NAME):
3875 Define as rs6000_mangle_decl_assembler_name.
3876 (rs6000_mangle_decl_assembler_name): If the user switched from IBM
3877 long double to IEEE long double, switch the names of the long
3878 double built-in functions to be <func>f128 instead of <func>l.
3880 2018-10-24 Martin Sebor <msebor@redhat.com>
3882 * doc/extend.texi (nonnull): List no-argument form. Reference
3883 -fno-delete-null-pointer-checks and -fisolate-erroneous-paths-attribute.
3885 2018-10-24 Richard Biener <rguenther@suse.de>
3887 * tree-ssa-sccvn.c (do_rpo_vn): Free rpo_state.
3889 2018-10-24 Martin Liska <mliska@suse.cz>
3891 PR tree-optimization/84436
3892 * tree-switch-conversion.c (switch_conversion::contains_same_values_p):
3894 (switch_conversion::contains_linear_function_p): New.
3895 (switch_conversion::build_one_array): Support linear
3896 transformation on input.
3897 * tree-switch-conversion.h (struct switch_conversion): Add
3898 contains_linear_function_p declaration.
3900 2018-10-24 Richard Biener <rguenther@suse.de>
3902 * varasm.c (const_hash_1): Return hash of ADDR_EXPR
3903 if its argument is CONSTANT_CLASS_P.
3905 2018-10-11 Jan Hubicka <hubicka@ucw.cz>
3907 * ipa-utils.h (type_with_linkage_p): No longer check for TYPE_STUB_DECL;
3908 it is wrong for forward declarations.
3910 2018-10-24 Ilya Leoshkevich <iii@linux.ibm.com>
3912 * config/s390/s390.c (s390_check_qrst_address): Add the missing
3913 SYMBOL_REF_P () check.
3915 2018-10-24 Richard Biener <rguenther@suse.de>
3917 PR tree-optimization/87105
3918 * tree-vect-data-refs.c (vect_analyze_group_access_1): Adjust
3919 dump classification.
3920 (vect_analyze_data_ref_accesses): Handle duplicate loads and
3921 stores by splitting the affected group after the fact.
3922 * tree-vect-slp.c (vect_build_slp_tree_2): Dump when we
3923 fail the SLP build because of size constraints.
3925 2018-10-24 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3927 * configure.ac (gcc_cv_ld_aligned_shf_merge): New test.
3928 * configure: Regenerate.
3929 * config.in: Regenerate.
3930 * varasm.c (mergeable_string_section): Use readonly_data_section
3931 if linker doesn't support SHF_MERGE with alignment > 8.
3932 (mergeable_constant_section): Likewise.
3934 2018-10-24 Richard Biener <rguenther@suse.de>
3936 PR tree-optimization/84013
3937 * tree-ssa-structalias.c (struct msdi_data): New struct for
3938 marshalling data to walk_stmt_load_store_ops.
3939 (maybe_set_dependence_info): Refactor as callback for
3940 walk_stmt_load_store_ops.
3941 (compute_dependence_clique): Set restrict info on all stmt kinds.
3943 2018-10-24 Martin Liska <mliska@suse.cz>
3945 * cgraph.c (cgraph_node::dump):
3946 Remove reduntant dumps and make tp_first_run dump more compact.
3948 2018-10-24 Richard Biener <rguenther@suse.de>
3950 PR tree-optimization/87665
3951 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Adjust
3954 2018-10-12 Jeff Law <law@redhat.com>
3956 * config/h8300/h8300.c (h8300_expand_prologue): Fix stm generation
3959 2018-10-23 Richard Biener <rguenther@suse.de>
3961 * tree-vrp.c (add_assert_info): Guard dump_printf with
3963 * gimple-ssa-evrp-analyze.c
3964 (evrp_range_analyzer::record_ranges_from_incoming_edge):
3965 Use value_range::ignore_equivs_equal_p.
3967 2018-10-23 Richard Biener <rguenther@suse.de>
3969 PR tree-optimization/87105
3970 PR tree-optimization/87608
3971 * passes.def (pass_all_early_optimizations): Add early phi-opt
3973 * tree-ssa-phiopt.c (value_replacement): Ignore NOPs and predicts in
3974 addition to debug stmts.
3975 (tree_ssa_phiopt_worker): Add early_p argument, do only min/max
3976 and abs replacement early.
3977 * tree-cfg.c (gimple_empty_block_p): Likewise.
3979 2018-10-23 Richard Earnshaw <rearnsha@arm.com>
3982 * config.gcc (arm*-*-netbsdelf*): Default to StrongARM if no CPU
3983 specified to configure.
3984 (arm*-*-*): Use ARM7TDMI as the target CPU if no default provided.
3986 2018-10-23 Richard Biener <rguenther@suse.de>
3988 PR tree-optimization/87700
3989 * tree-ssa-copy.c (set_copy_of_val): Fix change detection logic.
3991 2018-10-23 Jakub Jelinek <jakub@redhat.com>
3994 * config/i386/avx512vlintrin.h (_mm_mask_mullo_epi32): Change type of
3995 second argument from __mmask16 to __mmask8.
3996 * config/i386/avx512vlbwintrin.h (_mm_mask_packus_epi32,
3997 _mm_mask_packs_epi32): Likewise.
3998 * config/i386/avx512pfintrin.h (_mm512_mask_prefetch_i64scatter_ps):
4000 (_mm512_mask_prefetch_i64scatter_pd): Likewise. Formatting fix.
4002 2018-10-23 Richard Biener <rguenther@suse.de>
4004 * tree-vect-stmts.c (vect_analyze_stmt): Fix typo in comment.
4006 2018-10-23 Richard Biener <rguenther@suse.de>
4008 PR tree-optimization/86144
4009 * tree-vect-stmts.c (vect_analyze_stmt): Prefer -mveclibabi
4010 over simd attribute.
4012 2018-10-23 Richard Biener <rguenther@suse.de>
4014 PR tree-optimization/87693
4015 * tree-ssa-threadedge.c (thread_around_empty_blocks): Handle
4016 the case we do not find the taken edge.
4018 2018-10-22 Bill Schmidt <wschmidt@linux.ibm.com>
4019 Jinsong Ji <jji@us.ibm.com>
4021 * config/rs6000/emmintrin.h (_MM_SHUFFLE2): Comment cleanup.
4022 (_mm_store_pd): Use unaligned vector type for pointer cast.
4023 (_mm_maskmoveu_si128): Likewise.
4024 * config/rs6000/xmmintrin.h (__m128_u): New typedef.
4025 (_mm_store_ps): Use unaligned vector type for pointer cast.
4027 2018-10-22 Paul Koning <ni1d@arrl.net>
4029 * symtab.c (symtab_node::increase_alignment): Correct max
4032 2018-10-22 Yury Gribov <tetra2005@gmail.com>
4034 PR tree-optimization/87633
4035 * match.pd: Do not generate unordered integer comparisons.
4037 2018-10-22 Segher Boessenkool <segher@kernel.crashing.org>
4039 PR rtl-optimization/87600
4040 * combine.c: Add include of expr.h.
4041 (cant_combine_insn_p): Do not combine moves from any hard non-fixed
4042 register to a pseudo.
4043 (make_more_copies): New function, add a copy to a new pseudo after
4044 the moves from hard registers into pseudos.
4045 (rest_of_handle_combine): Declare rebuild_jump_labels_after_combine
4046 later. Call make_more_copies.
4048 2018-10-22 Andrew Stubbs <ams@codesourcery.com>
4050 * lra-constraints.c (process_alt_operands): New local array,
4051 matching_early_clobber. Check matching_early_clobber before
4052 decrementing reject, and set matching_early_clobber after.
4054 2018-10-22 Segher Boessenkool <segher@kernel.crashing.org>
4057 * config/rs6000/rs6000.c (print_operand_address): For unexpected RTL
4058 call output_addr_const and hope for the best.
4060 2018-10-22 Richard Biener <rguenther@suse.de>
4062 * gimple-ssa-evrp-analyze.c
4063 (evrp_range_analyzer::record_ranges_from_incoming_edge): Be
4064 smarter about what ranges to use.
4065 * tree-vrp.c (add_assert_info): Dump here.
4066 (register_edge_assert_for_2): Instead of here at multiple but
4069 * gcc.dg/tree-ssa/evrp12.c: New testcase.
4070 * gcc.dg/predict-6.c: Adjust.
4071 * gcc.dg/tree-ssa/vrp33.c: Disable EVRP.
4072 * gcc.dg/tree-ssa/vrp02.c: Likewise.
4073 * gcc.dg/tree-ssa/cunroll-9.c: Likewise.
4075 2018-10-22 Steven Bosscher <steven@gcc.gnu.org>
4076 Richard Biener <rguenther@suse.de>
4078 * bitmap.h: Update data structure documentation, including a
4079 description of bitmap views as either linked-lists or splay trees.
4080 (struct bitmap_element_def): Update comments for splay tree bitmaps.
4081 (struct bitmap_head_def): Likewise.
4082 (bitmap_list_view, bitmap_tree_view): New prototypes.
4083 (bitmap_initialize_stat): Initialize a bitmap_head's indx and
4085 (bmp_iter_set_init): Assert the iterated bitmaps are in list form.
4086 (bmp_iter_and_init, bmp_iter_and_compl_init): Likewise.
4087 * bitmap.c (bitmap_elem_to_freelist): Unregister overhead of a
4088 released bitmap element here.
4089 (bitmap_element_free): Remove.
4090 (bitmap_elt_clear_from): Work on splay tree bitmaps.
4091 (bitmap_list_link_element): Renamed from bitmap_element_link. Move
4092 this function similar ones such that linked-list bitmap implementation
4093 functions are grouped.
4094 (bitmap_list_unlink_element): Renamed from bitmap_element_unlink,
4095 and moved for grouping.
4096 (bitmap_list_insert_element_after): Renamed from
4097 bitmap_elt_insert_after, and moved for grouping.
4098 (bitmap_list_find_element): New function spliced from bitmap_find_bit.
4099 (bitmap_tree_link_left, bitmap_tree_link_right,
4100 bitmap_tree_rotate_left, bitmap_tree_rotate_right, bitmap_tree_splay,
4101 bitmap_tree_link_element, bitmap_tree_unlink_element,
4102 bitmap_tree_find_element): New functions for splay-tree bitmap
4104 (bitmap_element_link, bitmap_element_unlink, bitmap_elt_insert_after):
4105 Renamed and moved, see above entries.
4106 (bitmap_tree_listify_from): New function to convert part of a splay
4107 tree bitmap to a linked-list bitmap.
4108 (bitmap_list_view): Convert a splay tree bitmap to linked-list form.
4109 (bitmap_tree_view): Convert a linked-list bitmap to splay tree form.
4110 (bitmap_find_bit): Remove.
4111 (bitmap_clear, bitmap_clear_bit, bitmap_set_bit,
4112 bitmap_single_bit_set_p, bitmap_first_set_bit, bitmap_last_set_bit):
4113 Handle splay tree bitmaps.
4114 (bitmap_copy, bitmap_count_bits, bitmap_and, bitmap_and_into,
4115 bitmap_elt_copy, bitmap_and_compl, bitmap_and_compl_into,
4116 bitmap_compl_and_into, bitmap_elt_ior, bitmap_ior, bitmap_ior_into,
4117 bitmap_xor, bitmap_xor_into, bitmap_equal_p, bitmap_intersect_p,
4118 bitmap_intersect_compl_p, bitmap_ior_and_compl,
4119 bitmap_ior_and_compl_into, bitmap_set_range, bitmap_clear_range,
4120 bitmap_hash): Reject trying to act on splay tree bitmaps. Make
4121 corresponding changes to use linked-list specific bitmap_element
4122 manipulation functions as applicable for efficiency.
4123 (bitmap_tree_to_vec): New function.
4124 (debug_bitmap_elt_file): New function split out from ...
4125 (debug_bitmap_file): ... here. Handle splay tree bitmaps.
4126 (bitmap_print): Likewise.
4128 PR tree-optimization/63155
4129 * tree-ssa-propagate.c (ssa_prop_init): Use tree-view for the
4131 * tree-ssa-coalesce.c (coalesce_ssa_name): Populate used_in_copies
4134 2018-10-22 Martin Liska <mliska@suse.cz>
4136 PR tree-optimization/87686
4138 2018-08-29 Martin Liska <mliska@suse.cz>
4140 * tree-switch-conversion.c (switch_conversion::expand):
4141 Strenghten assumption about gswitch statements.
4143 2018-10-22 Martin Liska <mliska@suse.cz>
4145 * ipa-icf.c (sem_item::compare_attributes): Remove.
4146 (sem_item::compare_referenced_symbol_properties): Use
4147 attribute_list_equal instead.
4148 (sem_function::equals_wpa): Likewise.
4149 * ipa-icf.h: Remove compare_attributes.
4151 2018-10-22 Richard Biener <rguenther@suse.de>
4154 * mem-stats.h (mem_usage::operator==): Fix pasto.
4156 2018-10-22 Richard Biener <rguenther@suse.de>
4158 PR tree-optimization/87640
4159 * tree-vrp.c (set_value_range_with_overflow): Decompose
4161 (extract_range_from_binary_expr_1): Adjust.
4163 2018-10-22 Martin Jambor <mjambor@suse.cz>
4165 * tree-eh.h (stmt_could_throw_p): Add function parameter.
4166 (stmt_can_throw_external): Likewise.
4167 (stmt_can_throw_internal): Likewise.
4168 * tree-eh.c (lower_eh_constructs_2): Pass cfun to stmt_could_throw_p.
4169 (lower_eh_constructs_2): Likewise.
4170 (stmt_could_throw_p): Add fun parameter, use it instead of cfun.
4171 (stmt_can_throw_external): Likewise.
4172 (stmt_can_throw_internal): Likewise.
4173 (maybe_clean_eh_stmt_fn): Pass cfun to stmt_could_throw_p.
4174 (maybe_clean_or_replace_eh_stmt): Pass cfun to stmt_could_throw_p.
4175 (maybe_duplicate_eh_stmt_fn): Pass new_fun to stmt_could_throw_p.
4176 (maybe_duplicate_eh_stmt): Pass cfun to stmt_could_throw_p.
4177 (pass_lower_eh_dispatch::execute): Pass cfun to
4178 stmt_can_throw_external.
4179 (cleanup_empty_eh): Likewise.
4180 (verify_eh_edges): Pass cfun to stmt_could_throw_p.
4181 * cgraph.c (cgraph_edge::set_call_stmt): Pass a function to
4182 stmt_can_throw_external instead of pushing it to cfun.
4183 (symbol_table::create_edge): Likewise.
4184 * gimple-fold.c (fold_builtin_atomic_compare_exchange): Pass cfun to
4185 stmt_can_throw_internal.
4186 * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Pass cfun
4187 to stmt_could_throw_p.
4188 * gimple-ssa-store-merging.c (handled_load): Pass cfun to
4189 stmt_can_throw_internal.
4190 (pass_store_merging::execute): Likewise.
4191 * gimple-ssa-strength-reduction.c
4192 (find_candidates_dom_walker::before_dom_children): Pass cfun to
4194 * gimplify-me.c (gimple_regimplify_operands): Pass cfun to
4195 stmt_can_throw_internal.
4196 * ipa-pure-const.c (check_call): Pass cfun to stmt_could_throw_p and
4197 to stmt_can_throw_external.
4198 (check_stmt): Pass cfun to stmt_could_throw_p.
4199 (check_stmt): Pass cfun to stmt_can_throw_external.
4200 (pass_nothrow::execute): Likewise.
4201 * trans-mem.c (expand_call_tm): Pass cfun to stmt_can_throw_internal.
4202 * tree-cfg.c (is_ctrl_altering_stmt): Pass cfun to
4203 stmt_can_throw_internal.
4204 (verify_gimple_in_cfg): Pass cfun to stmt_could_throw_p.
4205 (stmt_can_terminate_bb_p): Pass cfun to stmt_can_throw_external.
4206 (gimple_purge_dead_eh_edges): Pass cfun to stmt_can_throw_internal.
4207 * tree-complex.c (expand_complex_libcall): Pass cfun to
4208 stmt_could_throw_p and to stmt_can_throw_internal.
4209 (expand_complex_multiplication): Pass cfun to stmt_can_throw_internal.
4210 * tree-inline.c (copy_edges_for_bb): Likewise.
4211 (maybe_move_debug_stmts_to_successors): Likewise.
4212 * tree-outof-ssa.c (ssa_is_replaceable_p): Pass cfun to
4214 * tree-parloops.c (oacc_entry_exit_ok_1): Likewise.
4215 * tree-sra.c (scan_function): Pass cfun to stmt_can_throw_external.
4216 * tree-ssa-alias.c (stmt_kills_ref_p): Pass cfun to
4217 stmt_can_throw_internal.
4218 * tree-ssa-ccp.c (optimize_atomic_bit_test_and): Likewise.
4219 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Pass cfun to
4221 (mark_aliased_reaching_defs_necessary_1): Pass cfun to
4222 stmt_can_throw_internal.
4223 * tree-ssa-forwprop.c (pass_forwprop::execute): Likewise.
4224 * tree-ssa-loop-im.c (movement_possibility): Pass cfun to
4226 * tree-ssa-loop-ivopts.c (find_givs_in_stmt_scev): Likewise.
4227 (add_autoinc_candidates): Pass cfun to stmt_can_throw_internal.
4228 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
4229 (convert_mult_to_fma_1): Likewise.
4230 (convert_to_divmod): Likewise.
4231 * tree-ssa-phiprop.c (propagate_with_phi): Likewise.
4232 * tree-ssa-pre.c (compute_avail): Pass cfun to stmt_could_throw_p.
4233 * tree-ssa-propagate.c
4234 (substitute_and_fold_dom_walker::before_dom_children): Likewise.
4235 * tree-ssa-reassoc.c (suitable_cond_bb): Likewise.
4236 (maybe_optimize_range_tests): Likewise.
4237 (linearize_expr_tree): Likewise.
4238 (reassociate_bb): Likewise.
4239 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
4240 * tree-ssa-scopedtables.c (hashable_expr_equal_p): Likewise.
4241 * tree-ssa-strlen.c (adjust_last_stmt): Likewise.
4242 (handle_char_store): Likewise.
4243 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Pass cfun to
4244 stmt_can_throw_internal.
4245 * tree-vect-patterns.c (check_bool_pattern): Pass cfun to
4247 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
4248 (vectorizable_call): Pass cfun to stmt_can_throw_internal.
4249 (vectorizable_simd_clone_call): Likewise.
4250 * value-prof.c (gimple_ic): Pass cfun to stmt_could_throw_p.
4251 (gimple_stringop_fixed_value): Likewise.
4253 2018-10-22 Ilya Leoshkevich <iii@linux.ibm.com>
4255 * config/s390/s390.c (s390_loadrelative_operand_p): Accept
4256 literal pool references.
4257 (s390_check_qrst_address): Adapt to the new behavior of
4258 s390_loadrelative_operand_p ().
4260 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
4263 * config/i386/sse.md (*andnot<mode>3_bcst): New.
4265 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
4268 * config/i386/sse.md (*<code><mode>3_bcst): New.
4270 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
4273 * config/i386/sse.md (avx512bcst): Updated for V4SI, V2DI, V8SI,
4274 V4DI, V16SI and V8DI.
4275 (*sub<mode>3<mask_name>_bcst): New.
4276 (*add<mode>3<mask_name>_bcst): Likewise.
4278 2018-10-21 Bill Schmidt <wschmidt@linux.ibm.com>
4279 Jinsong Ji <jji@us.ibm.com>
4281 * config/rs6000/emmintrin.h (_mm_movemask_pd): Replace __vector
4282 __m64 with __vector unsigned long long for compatibility.
4283 (_mm_movemask_epi8): Likewise.
4284 * config/rs6000/xmmintrin.h (_mm_cvtps_pi32): Likewise.
4285 (_mm_cvttps_pi32): Likewise.
4286 (_mm_cvtpi32_ps): Likewise.
4287 (_mm_cvtps_pi16): Likewise.
4288 (_mm_loadh_pi): Likewise.
4289 (_mm_storeh_pi): Likewise.
4290 (_mm_movehl_ps): Likewise.
4291 (_mm_movelh_ps): Likewise.
4292 (_mm_loadl_pi): Likewise.
4293 (_mm_storel_pi): Likewise.
4294 (_mm_movemask_ps): Likewise.
4295 (_mm_shuffle_pi16): Likewise.
4297 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
4300 * config/i386/avx512fintrin.h (_mm512_fnmsub_round_pd): Use
4301 __builtin_ia32_vfnmsubpd512_mask.
4302 (_mm512_mask_fnmsub_round_pd): Likewise.
4303 (_mm512_fnmsub_pd): Likewise.
4304 (_mm512_mask_fnmsub_pd): Likewise.
4305 (_mm512_maskz_fnmsub_round_pd): Use
4306 __builtin_ia32_vfnmsubpd512_maskz.
4307 (_mm512_maskz_fnmsub_pd): Likewise.
4308 (_mm512_fnmsub_round_ps): Use __builtin_ia32_vfnmsubps512_mask.
4309 (_mm512_mask_fnmsub_round_ps): Likewise.
4310 (_mm512_fnmsub_ps): Likewise.
4311 (_mm512_mask_fnmsub_ps): Likewise.
4312 (_mm512_maskz_fnmsub_round_ps): Use
4313 __builtin_ia32_vfnmsubps512_maskz.
4314 (_mm512_maskz_fnmsub_ps): Likewise.
4315 * config/i386/avx512vlintrin.h (_mm256_mask_fnmsub_pd): Use
4316 __builtin_ia32_vfnmsubpd256_mask.
4317 (_mm256_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256_maskz.
4318 (_mm_mask_fnmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
4319 (_mm_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd128_maskz.
4320 (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
4321 (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
4322 (_mm256_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_maskz.
4323 (_mm_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_mask.
4324 (_mm_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_maskz.
4325 * config/i386/fmaintrin.h (_mm_fnmsub_pd): Use
4326 __builtin_ia32_vfnmsubpd.
4327 (_mm256_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256.
4328 (_mm_fnmsub_ps): Use __builtin_ia32_vfnmsubps.
4329 (_mm256_fnmsub_ps): Use __builtin_ia32_vfnmsubps256.
4330 (_mm_fnmsub_sd): Use __builtin_ia32_vfnmsubsd3.
4331 (_mm_fnmsub_ss): Use __builtin_ia32_vfnmsubss3.
4332 * config/i386/i386-builtin.def: Add
4333 __builtin_ia32_vfnmsubpd256_mask,
4334 __builtin_ia32_vfnmsubpd256_maskz,
4335 __builtin_ia32_vfnmsubpd128_mask,
4336 __builtin_ia32_vfnmsubpd128_maskz,
4337 __builtin_ia32_vfnmsubps256_mask,
4338 __builtin_ia32_vfnmsubps256_maskz,
4339 __builtin_ia32_vfnmsubps128_mask,
4340 __builtin_ia32_vfnmsubps128_maskz,
4341 __builtin_ia32_vfnmsubpd512_mask,
4342 __builtin_ia32_vfnmsubpd512_maskz,
4343 __builtin_ia32_vfnmsubps512_mask,
4344 __builtin_ia32_vfnmsubps512_maskz, __builtin_ia32_vfnmsubss3,
4345 __builtin_ia32_vfnmsubsd3, __builtin_ia32_vfnmsubps,
4346 __builtin_ia32_vfnmsubpd, __builtin_ia32_vfnmsubps256 and.
4347 __builtin_ia32_vfnmsubpd256.
4348 * config/i386/sse.md (fma4i_fnmsub_<mode>): New.
4349 (<avx512>_fnmsub_<mode>_maskz<round_expand_name>): Likewise.
4350 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_1):
4352 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_2):
4354 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_3):
4356 (fmai_vmfnmsub_<mode><round_name>): Likewise.
4358 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
4361 * config/i386/avx512fintrin.h (_mm512_fnmadd_round_pd): Use
4362 __builtin_ia32_vfnmaddpd512_mask.
4363 (_mm512_mask_fnmadd_round_pd): Likewise.
4364 (_mm512_fnmadd_pd): Likewise.
4365 (_mm512_mask_fnmadd_pd): Likewise.
4366 (_mm512_maskz_fnmadd_round_pd): Use
4367 __builtin_ia32_vfnmaddpd512_maskz.
4368 (_mm512_maskz_fnmadd_pd): Likewise.
4369 (_mm512_fnmadd_round_ps): Use __builtin_ia32_vfnmaddps512_mask.
4370 (_mm512_mask_fnmadd_round_ps): Likewise.
4371 (_mm512_fnmadd_ps): Likewise.
4372 (_mm512_mask_fnmadd_ps): Likewise.
4373 (_mm512_maskz_fnmadd_round_ps): Use
4374 __builtin_ia32_vfnmaddps512_maskz.
4375 (_mm512_maskz_fnmadd_ps): Likewise.
4376 * config/i386/avx512vlintrin.h (_mm256_mask_fnmadd_pd): Use
4377 __builtin_ia32_vfnmaddpd256_mask.
4378 (_mm256_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256_maskz.
4379 (_mm_mask_fnmadd_pd): Use __builtin_ia32_vfmaddpd128_mask
4380 (_mm_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd128_maskz.
4381 (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
4382 (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
4383 (_mm256_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_maskz.
4384 (_mm_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_mask.
4385 (_mm_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_maskz.
4386 * config/i386/fmaintrin.h (_mm_fnmadd_pd): Use
4387 __builtin_ia32_vfnmaddpd.
4388 (_mm256_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256.
4389 (_mm_fnmadd_ps): Use __builtin_ia32_vfnmaddps.
4390 (_mm256_fnmadd_ps): Use __builtin_ia32_vfnmaddps256.
4391 (_mm_fnmadd_sd): Use __builtin_ia32_vfnmaddsd3.
4392 (_mm_fnmadd_ss): Use __builtin_ia32_vfnmaddss3.
4393 * config/i386/i386-builtin.def: Add
4394 __builtin_ia32_vfnmaddpd256_mask,
4395 __builtin_ia32_vfnmaddpd256_maskz,
4396 __builtin_ia32_vfnmaddpd128_mask,
4397 __builtin_ia32_vfnmaddpd128_maskz,
4398 __builtin_ia32_vfnmaddps256_mask,
4399 __builtin_ia32_vfnmaddps256_maskz,
4400 __builtin_ia32_vfnmaddps128_mask,
4401 __builtin_ia32_vfnmaddps128_maskz,
4402 __builtin_ia32_vfnmaddpd512_mask,
4403 __builtin_ia32_vfnmaddpd512_maskz,
4404 __builtin_ia32_vfnmaddps512_mask,
4405 __builtin_ia32_vfnmaddps512_maskz, __builtin_ia32_vfnmaddss3,
4406 __builtin_ia32_vfnmaddsd3, __builtin_ia32_vfnmaddps,
4407 __builtin_ia32_vfnmaddpd, __builtin_ia32_vfnmaddps256 and.
4408 __builtin_ia32_vfnmaddpd256.
4409 * config/i386/sse.md (fma4i_fnmadd_<mode>): New.
4410 (<avx512>_fnmadd_<mode>_maskz<round_expand_name>): Likewise.
4411 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_1):
4413 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_2):
4415 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_3):
4417 (fmai_vmfnmadd_<mode><round_name>): Likewise.
4419 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
4422 * config/i386/avx512fintrin.h (_mm512_fmsub_round_pd): Use
4423 __builtin_ia32_vfmsubpd512_mask.
4424 (_mm512_mask_fmsub_round_pd): Likewise.
4425 (_mm512_fmsub_pd): Likewise.
4426 (_mm512_mask_fmsub_pd): Likewise.
4427 (_mm512_maskz_fmsub_round_pd): Use
4428 __builtin_ia32_vfmsubpd512_maskz.
4429 (_mm512_maskz_fmsub_pd): Likewise.
4430 (_mm512_fmsub_round_ps): Use __builtin_ia32_vfmsubps512_mask.
4431 (_mm512_mask_fmsub_round_ps): Likewise.
4432 (_mm512_fmsub_ps): Likewise.
4433 (_mm512_mask_fmsub_ps): Likewise.
4434 (_mm512_maskz_fmsub_round_ps): Use
4435 __builtin_ia32_vfmsubps512_maskz.
4436 (_mm512_maskz_fmsub_ps): Likewise.
4437 * config/i386/avx512vlintrin.h (_mm256_mask_fmsub_pd): Use
4438 __builtin_ia32_vfmsubpd256_mask.
4439 (_mm256_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd256_maskz.
4440 (_mm_mask_fmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
4441 (_mm_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd128_maskz.
4442 (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
4443 (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
4444 (_mm256_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps256_maskz.
4445 (_mm_mask_fmsub_ps): Use __builtin_ia32_vfmsubps128_mask.
4446 (_mm_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps128_maskz.
4447 * config/i386/fmaintrin.h (_mm_fmsub_pd): Use
4448 __builtin_ia32_vfmsubpd.
4449 (_mm256_fmsub_pd): Use __builtin_ia32_vfmsubpd256.
4450 (_mm_fmsub_ps): Use __builtin_ia32_vfmsubps.
4451 (_mm256_fmsub_ps): Use __builtin_ia32_vfmsubps256.
4452 (_mm_fmsub_sd): Use __builtin_ia32_vfmsubsd3.
4453 (_mm_fmsub_ss): Use __builtin_ia32_vfmsubss3.
4454 * config/i386/i386-builtin.def: Add
4455 __builtin_ia32_vfmsubpd256_mask,
4456 __builtin_ia32_vfmsubpd256_maskz,
4457 __builtin_ia32_vfmsubpd128_mask,
4458 __builtin_ia32_vfmsubpd128_maskz,
4459 __builtin_ia32_vfmsubps256_mask,
4460 __builtin_ia32_vfmsubps256_maskz,
4461 __builtin_ia32_vfmsubps128_mask,
4462 __builtin_ia32_vfmsubps128_maskz,
4463 __builtin_ia32_vfmsubpd512_mask,
4464 __builtin_ia32_vfmsubpd512_maskz,
4465 __builtin_ia32_vfmsubps512_mask,
4466 __builtin_ia32_vfmsubps512_maskz, __builtin_ia32_vfmsubss3,
4467 __builtin_ia32_vfmsubsd3, __builtin_ia32_vfmsubps,
4468 __builtin_ia32_vfmsubpd, __builtin_ia32_vfmsubps256 and.
4469 __builtin_ia32_vfmsubpd256.
4470 * config/i386/sse.md (fma4i_fmsub_<mode>): New.
4471 (<avx512>_fmsub_<mode>_maskz<round_expand_name>): Likewise.
4472 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_1):
4474 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_2):
4476 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_3):
4478 (fmai_vmfmsub_<mode><round_name>): Likewise.
4480 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
4482 * config/i386/sse.md (*<plusminus_insn><mode>3<mask_name>_bcst_1):
4483 Remove plus. Renamed to ...
4484 (*sub<mode>3<mask_name>_bcst): This.
4485 (*add<mode>3<mask_name>_bcst_2): Renamede to ...
4486 (*add<mode>3<mask_name>_bcst): This.
4488 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
4491 * config/i386/sse.md (*mul<mode>3<mask_name>_bcst): New.
4493 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
4496 * i386/avx512vlintrin.h (_mm256_or_epi32): New.
4497 (_mm_or_epi32): Likewise.
4498 (_mm256_xor_epi32): Likewise.
4499 (_mm_xor_epi32): Likewise.
4500 (_mm256_or_epi64): Likewise.
4501 (_mm_or_epi64): Likewise.
4502 (_mm256_xor_epi64): Likewise.
4503 (_mm_xor_epi64): Likewise.
4505 2018-10-20 H.J. Lu <hongjiu.lu@intel.com>
4508 * config/i386/sse.md (*<avx512>_div<mode>3<mask_name>_bcst): New.
4510 2018-10-20 Jakub Jelinek <jakub@redhat.com>
4513 * varasm.c (decode_addr_const): Handle COMPOUND_LITERAL_EXPR.
4515 2018-10-20 Andreas Schwab <schwab@linux-m68k.org>
4517 * doc/ux.texi: Move @section directly after @node.
4519 2018-10-19 Jakub Jelinek <jakub@redhat.com>
4523 * omp-low.c (check_omp_nesting_restrictions): Diagnose ordered without
4524 depend closely nested inside of loop with ordered clause with
4527 2018-10-19 David Malcolm <dmalcolm@redhat.com>
4529 * Makefile.in (TEXI_GCCINT_FILES): Add ux.texi.
4530 * doc/gccint.texi: Include ux.texi and use it in top-level menu.
4531 * doc/ux.texi: New file.
4533 2018-10-19 Segher Boessenkool <segher@kernel.crashing.org>
4535 * config/rs6000/rs6000.h (REG_ALLOC_ORDER): Move 68 (that is, CR0) to
4536 be the first CR field allocated.
4538 2018-10-19 Richard Biener <rguenther@suse.de>
4541 * config/i386/i386.c (ix86_builtin_vectorization_cost): Use
4542 TYPE_VECTOR_SUBPARTS and avoid relying on vector mode.
4544 2018-10-19 H.J. Lu <hongjiu.lu@intel.com>
4547 * config/i386/sse.md
4548 (*<plusminus_insn><mode>3<mask_name>_bcst_1): New.
4549 (*add<mode>3<mask_name>_bcst_2): Likewise.
4551 2018-10-19 H.J. Lu <hongjiu.lu@intel.com>
4553 * config/i386/sse.md
4554 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
4555 Replace nonimmediate_operand with register_operand.
4556 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
4558 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
4561 2018-10-19 Ilya Leoshkevich <iii@linux.ibm.com>
4563 PR rtl-optimization/87596
4564 * lra-constraints.c (spill_hard_reg_in_range): Use INSN_P () +
4565 lra_get_insn_recog_data () instead of lra_insn_recog_data[]
4566 for instructions in FROM..TO range.
4568 2018-10-19 Eric Botcazou <ebotcazou@adacore.com>
4570 * cfgexpand.c (expand_one_var): Use specific wording in error message
4571 for non-local frame variables.
4572 * stor-layout.c (layout_decl): Do not issue a warning for them.
4574 2018-10-19 Robin Dapp <rdapp@linux.ibm.com>
4576 * haifa-sched.c (priority): Add force_recompute parameter.
4577 (apply_replacement): Call priority () with force_recompute = true.
4578 (restore_pattern): Likewise.
4580 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
4582 * simplify-rtx.c (simplify_subreg): Limit mask of vec_merge to
4583 HOST_BITS_PER_WIDE_INT.
4584 (test_vector_ops_duplicate): Likewise.
4586 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
4589 * config/i386/sse.md (VF_AVX512): New.
4590 (avx512bcst): Likewise.
4591 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
4593 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
4595 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
4598 2018-10-18 Jonathan Wakely <jwakely@redhat.com>
4600 * doc/invoke.texi (-dumpversion): Improve grammar.
4601 (-dumpfullversion): Make more consistent with -dumpversion.
4603 2018-10-18 Uros Bizjak <ubizjak@gmail.com>
4605 * config/i386/i386.c (ix86_emit_fp_unordered_jump):
4606 Set JUMP_LABEL to the jump insn.
4607 (ix86_emit_i387_log1p): Use ix86_expand_branch to expand branch.
4608 Predict emitted jump and add label to jump insn.
4610 2018-10-18 David Malcolm <dmalcolm@redhat.com>
4612 PR tree-optimization/87562
4613 * input.c (get_substring_ranges_for_loc): Use
4614 LRK_SPELLING_LOCATION rather than LRK_MACRO_EXPANSION_POINT when
4615 getting the linemap for the endpoint. Verify that it's either
4616 in the same linemap as the start point's spelling location, or
4617 at least in the same file.
4619 2018-10-18 Richard Biener <rguenther@suse.de>
4621 * config/i386/i386.c (ix86_builtin_vectorization_cost): Do not
4622 feed width-specific load/store costs through ix86_vec_cost.
4623 * config/i386/x86-tune-costs.h (athlon_cost): Adjust.
4624 (k8_cost): Likewise.
4625 (bdver_cost): Likewise.
4626 (znver1_cost): Likewise.
4627 (btver1_cost): Likewise.
4628 (btver2_cost): Likewise.
4630 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
4632 * simplify-rtx.c (simplify_subreg): Call simplify_gen_subreg
4633 to simplify subreg of vec_merge.
4635 2018-10-18 Richard Biener <rguenther@suse.de>
4637 * config/i386/i386.c: Fix costing of vector FMA.
4639 2018-10-18 Richard Biener <rguenther@suse.de>
4641 * config/i386/i386.c (ix86_vec_cost): Remove !parallel path
4643 (ix86_builtin_vectorization_cost): For vec_construct properly
4644 cost insertion into SSE regs.
4645 (...): Adjust calls to ix86_vec_cost.
4647 2018-10-18 Richard Biener <rguenther@suse.de>
4651 2018-02-07 Richard Biener <rguenther@suse.de>
4653 PR tree-optimization/84204
4654 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
4657 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
4660 * simplify-rtx.c (simplify_subreg): Simplify subreg of vec_merge
4662 (test_vector_ops_duplicate): Add test for a scalar subreg of a
4663 VEC_MERGE of a VEC_DUPLICATE.
4665 2018-10-17 Joseph Myers <joseph@codesourcery.com>
4667 * doc/cpp.texi (__STDC_VERSION__): Document C2X handling.
4668 * doc/invoke.texi (-std=c2x, -std=gnu2x): Document new options.
4669 * doc/standards.texi (C Language): Document C2X.
4670 * dwarf2out.c (highest_c_language), config/rl78/rl78.c
4671 (rl78_option_override): Handle "GNU C2X" language name.
4673 2018-10-17 Joseph Myers <joseph@codesourcery.com>
4675 * doc/invoke.texi (-std=c17), doc/standards.texi (C Language):
4676 Document C17 as published in 2018.
4678 2018-10-17 Eric Botcazou <ebotcazou@adacore.com>
4681 * fold-const.c (fold_truth_andor_1): If the right side is not constant,
4682 bail out if both sides do not have the same storage order.
4684 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
4686 * bitmap.c (bitmap_head::dump): New.
4687 * bitmap.h (bitmap_head): Add dump().
4688 * gimple-ssa-evrp-analyze.c
4689 (evrp_range_analyzer::try_find_new_range): Adjust for value_range API.
4690 (evrp_range_analyzer::set_ssa_range_info): Same.
4691 (evrp_range_analyzer::record_ranges_from_phis): Same.
4692 (evrp_range_analyzer::record_ranges_from_stmt): Same.
4693 * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Same.
4694 * gimple-ssa-sprintf.c (get_int_range): Same.
4695 (format_integer): Same.
4696 (sprintf_dom_walker::handle_gimple_call): Same.
4697 * ipa-cp.c (ipcp_vr_lattice::meet_with_1): Same.
4698 (ipcp_vr_lattice::top_p): Same.
4699 (ipcp_vr_lattice::bottom_p): Same.
4700 (ipcp_vr_lattice::set_to_bottom): Same.
4701 (ipa_vr_operation_and_type_effects): Same.
4702 (propagate_vr_across_jump_function): Same.
4703 (ipcp_store_vr_results): Same.
4704 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Same.
4705 (ipa_print_node_jump_functions_for_edge): Same.
4706 (ipa_get_value_range): Same.
4707 (ipa_compute_jump_functions_for_edge): Same.
4708 (ipa_write_jump_function): Same.
4709 * tree-ssa-dom.c (simplify_stmt_for_jump_threading): Same.
4710 * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
4712 * vr-values.c (set_value_range_to_nonnegative): Same.
4713 (set_value_range_to_truthvalue): Same.
4714 (vr_values::get_value_range): Same.
4715 (vr_values::set_defs_to_varying): Same.
4716 (vr_values::update_value_range): Same.
4717 (symbolic_range_based_on_p): Same.
4718 (vr_values::op_with_boolean_value_range_p): Same.
4719 (vr_values::extract_range_for_var_from_comparison_expr): Same.
4720 (vr_values::extract_range_from_ssa_name): Same.
4721 (vr_values::extract_range_from_binary_expr): Same.
4722 (vr_values::extract_range_from_unary_expr): Same.
4723 (vr_values::extract_range_from_cond_expr): Same.
4724 (vr_values::extract_range_from_comparison): Same.
4725 (vr_values::check_for_binary_op_overflow): Same.
4726 (vr_values::extract_range_basic): Same.
4727 (vr_values::extract_range_from_assignment): Same.
4728 (compare_ranges): Same.
4729 (compare_range_with_value): Same.
4730 (vr_values::adjust_range_with_scev): Same.
4731 (vrp_valueize): Same.
4732 (vrp_valueize_1): Same.
4733 (vr_values::get_vr_for_comparison): Same.
4734 (vr_values::compare_name_with_value): Same.
4735 (vr_values::compare_names): Same.
4736 (vr_values::vrp_evaluate_conditional): Same.
4737 (find_case_label_ranges): Same.
4738 (vr_values::vrp_visit_switch_stmt): Same.
4739 (vr_values::extract_range_from_phi_node): Same.
4740 (vr_values::simplify_div_or_mod_using_ranges): Same.
4741 (vr_values::simplify_bit_ops_using_ranges): Same.
4742 (test_for_singularity): Same.
4743 (range_fits_type_p): Same.
4744 (vr_values::simplify_cond_using_ranges_1): Same.
4745 (vr_values::simplify_switch_using_ranges): Same.
4746 (vr_values::simplify_float_conversion_using_ranges): Same.
4747 (vr_values::two_valued_val_range_p): Same.
4748 (vr_values::add_equivalence): Move to value_range::equiv_add.
4749 * vr-values.h (vr_values::add_equivalence): Remove.
4750 (VR_INITIALIZER): Remove.
4751 * tree-vrp.c (value_range::set): New.
4752 (value_range::equiv_add): New.
4753 (value_range::value_range): New.
4754 (value_range::deep_copy): New.
4755 (value_range::check): New.
4756 (value_range::equal_p): New.
4757 (value_range::ignore_equivs_equal_p): New.
4758 (value_range::operator==): New.
4759 (value_range::operator!=): New.
4760 (value_range::symbolic_p): New.
4761 (value_range::numeric_p): New.
4762 (value_range::set_undefined): New.
4763 (value_range::set_varying): New.
4764 (value_range::may_contain_p): New.
4765 (value_range::equiv_clear): New.
4766 (value_range::singleton_p): New.
4767 (value_range::intersect): New.
4768 (value_range::dump): New.
4769 (value_range::set_and_canonicalize): New.
4770 (set_value_range): Adjust for value_range API.
4771 (set_value_range_to_undefined): Same.
4772 (set_value_range_to_varying): Same.
4773 (set_and_canonicalize_value_range): Same.
4774 (set_value_range_to_nonnull): Same.
4775 (set_value_range_to_null): Same.
4776 (range_is_null): Same.
4777 (range_is_nonnull): Same.
4778 (range_int_cst_p): Same.
4779 (range_int_cst_singleton_p): Same.
4780 (symbolic_range_p): Same.
4781 (range_includes_zero_p): Same.
4782 (value_range_constant_singleton): Same.
4783 (vrp_set_zero_nonzero_bits): Same.
4784 (ranges_from_anti_range): Same.
4785 (extract_range_into_wide_ints): Same.
4786 (extract_range_from_multiplicative_op): Same.
4787 (set_value_range_with_overflow): Same.
4788 (extract_range_from_binary_expr_1): Same.
4789 (extract_range_from_unary_expr): Same.
4790 (dump_value_range): Same.
4791 (debug_value_range): Same.
4792 (vrp_prop::check_array_ref): Same.
4793 (vrp_prop::check_mem_ref): Same.
4794 (vrp_prop::vrp_initialize): Same.
4795 (vrp_prop::visit_stmt): Same.
4796 (intersect_ranges): Same.
4797 (vrp_prop::visit_phi): Same.
4798 (vrp_prop::vrp_finalize): Same.
4799 (determine_value_range_1): Same.
4800 (determine_value_range): Same.
4801 (vrp_intersect_ranges_1): Rename to...
4802 (vrp_intersect_1): this.
4803 (vrp_intersect_ranges): Rename to...
4804 (value_range::intersect_helper): ...this.
4805 (vrp_meet_1): Rename to...
4806 (value_range::union_helper): ...this.
4807 (vrp_meet): Rename to...
4808 (value_range::union_): ...this.
4809 (copy_value_range): Remove.
4810 * tree-vrp.h (struct value_range): Rewrite into a proper class.
4811 (value_range::vrtype): New.
4812 (value_range::type): New.
4813 (value_range::equiv): New.
4814 (value_range::min): New.
4815 (value_range::max): New.
4816 (value_range::varying_p): New.
4817 (value_range::undefined_p): New.
4818 (value_range::null_p): New.
4819 (value_range::equiv_add): New.
4820 (copy_value_range): Remove.
4822 2018-10-17 David Malcolm <dmalcolm@redhat.com>
4824 * Makefile.in (SELFTEST_TARGETS): New.
4825 (selftest) Change from s-selftest-c to $(SELFTEST_TARGETS).
4826 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
4827 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move to
4829 (CPP_SELFTEST_FLAGS, CPP_SELFTEST_DEPS, s-selftest-c++)
4830 (selftest-c++-gdb, selftest-c++-valgrind): Move to
4832 * configure: Regenerate.
4833 * configure.ac (selftest_languages): New.
4835 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
4837 * tree-vrp.c (extract_range_from_multiplicative_op): Remove
4838 overflow wraps argument.
4839 (extract_range_from_binary_expr_1): Do not pass overflow wraps to
4840 wide_int_range_multiplicative_op.
4841 * wide-int-range.cc (wide_int_range_mult_wrapping): Remove
4842 overflow wraps argument.
4843 (wide_int_range_multiplicative_op): Same.
4844 (wide_int_range_lshift): Same.
4845 (wide_int_range_div): Same.
4846 * wide-int-range.h (wide_int_range_multiplicative_op): Same.
4847 (wide_int_range_lshift): Same.
4848 (wide_int_range_div): Same.
4850 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
4852 * wide-int-range.h (wide_int_range_shift_undefined_p): Adjust to
4853 use sign as argument.
4854 * tree-vrp.c (extract_range_from_binary_expr_1): Pass sign to
4855 wide_int_range_shift_undefined_p.
4857 2018-10-16 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4859 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>):
4861 (@despeculate_copy<ALLI_TI:mode>): ... This.
4862 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): Remove
4865 2018-10-16 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4867 * config.gcc: Obsolete *-*-solaris2.10*.
4868 * doc/install.texi (Specific, *-*-solaris2*): Document it.
4870 2018-10-12 Jeff Law <law@redhat.com>
4872 * config/ft32/ft32.md (ft32_general_movsrc_operand): Disable
4873 reg + sym +- const_int addressing modes.
4875 2018-10-15 David Malcolm <dmalcolm@redhat.com>
4877 * common.opt (fdiagnostics-minimum-margin-width=): New option.
4878 * diagnostic-show-locus.c (layout::layout): Apply the minimum
4880 (layout::start_annotation_line): Only print up to 3 of the
4881 margin character, to avoid touching the left-hand side.
4882 (selftest::test_diagnostic_show_locus_fixit_lines): Update for
4883 minimum margin width, as set by test_diagnostic_context's ctor.
4884 (selftest::test_fixit_insert_containing_newline): Likewise.
4885 (selftest::test_fixit_insert_containing_newline_2): Likewise.
4886 (selftest::test_line_numbers_multiline_range): Clear
4887 dc.min_margin_width.
4888 * diagnostic.c (diagnostic_initialize): Initialize
4890 * diagnostic.h (struct diagnostic_context): Add field
4892 * doc/invoke.texi: Add -fdiagnostics-minimum-margin-width=.
4893 * opts.c (common_handle_option): Handle
4894 OPT_fdiagnostics_minimum_margin_width_.
4895 * selftest-diagnostic.c
4896 (selftest::test_diagnostic_context::test_diagnostic_context):
4897 Initialize min_margin_width to 6.
4898 * toplev.c (general_init): Initialize global_dc->min_margin_width.
4900 2018-10-15 David Malcolm <dmalcolm@redhat.com>
4902 * gcc-rich-location.h (gcc_rich_location::add_location_if_nearby):
4903 Fix usage of "error_at_rich_loc" in the comment.
4905 2018-10-15 Renlin Li <renlin.li@arm.com>
4908 * tree-vectorizer.c (try_vectorize_loop_1): Don't use
4909 if-conversioned loop when it contains ifn with types not
4910 supported by backend.
4911 * internal-fn.c (expand_direct_optab_fn): Add an assert.
4912 (direct_internal_fn_supported_p): New helper function.
4913 * internal-fn.h (direct_internal_fn_supported_p): Declare.
4915 2018-10-15 Jakub Jelinek <jakub@redhat.com>
4918 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
4919 Remove OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
4920 OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
4922 2018-10-15 Bin Cheng <bin.cheng@linux.alibaba.com>
4924 PR tree-optimization/87022
4925 * tree-loop-distribution.c (pg_add_dependence_edges): Check all
4926 bits in dist vector rather than the first one.
4928 2018-10-15 Richard Biener <rguenther@suse.de>
4931 * tree-ssa-structalias.c (struct vls_data): Add escaped_p member.
4932 (visit_loadstore): When a used restrict tag escaped verify that
4933 the points-to solution of "other" pointers do not include
4935 (compute_dependence_clique): If a used restrict tag escaped
4936 communicated that down to visit_loadstore.
4938 2018-10-15 Andreas Krebbel <krebbel@linux.ibm.com>
4940 * config/s390/s390.c (s390_expand_vec_init): Force vector element
4941 into reg if it isn't a general operand.
4943 2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
4946 * config/i386/sse.md (*vec_dupv2di): Add register source to
4949 2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
4952 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
4953 Add OPTION_MASK_ISA_AVX512IFMA_UNSET,
4954 OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
4955 OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
4957 2018-10-13 Eric Botcazou <ebotcazou@adacore.com>
4959 * dwarf2cfi.c (struct dw_trace_info): Add args_size_defined_for_eh.
4960 (notice_args_size): Set it in the current trace if no insn that can
4961 throw internally has been seen yet.
4962 (connect_traces): When connecting args_size between traces, allow the
4963 incoming values not to match if there is an insn setting it before the
4964 first insn that can throw internally; in that case, force the creation
4965 of a CFI note on this latter insn.
4967 2018-10-13 Jonathan Wakely <jwakely@redhat.com>
4969 * opt-problem.h (opt_wrapper): Use template-argument-list when naming
4970 the base class, because using the injected-class-name was not clearly
4971 specified until DR 176.
4973 2018-10-12 Paul Koning <ni1d@arrl.net>
4975 * config/pdp11/pdp11.md (doloop_end): New expander.
4976 (doloop_end_insn): renamed from "doloop_end".
4977 (addqi3): New pattern.
4978 (subqi3): New pattern.
4979 * config/pdp11/predicates.md (incdec_operand): New predicate.
4981 2018-10-12 Yury Gribov <tetra2005@gmail.com>
4984 * real.c (format_helper::can_represent_integral_type_p): New function
4985 * real.h (format_helper::can_represent_integral_type_p): Ditto.
4986 * match.pd: New pattern.
4988 2018-10-12 Alexandre Oliva <oliva@adacore.com>
4990 * configure.ac: Introduce --enable-large-address-aware
4991 to define MINGW_DEFAULT_LARGE_ADDR_AWARE.
4992 * doc/install.texi: Document it.
4993 * configure, config.in: Rebuilt.
4994 * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Define,
4995 based on MINGW_DEFAULT_LARGE_ADDR_AWARE.
4996 (LINK_SPEC): Insert it.
4997 * config/i386/mingw-w64.h: Likewise.
4999 * cygming.h (HAVE_GAS_ALIGNED_COMM): Fallback-define.
5001 2018-10-12 Peter Bergner <bergner@linux.ibm.com>
5003 PR rtl-optimization/87600
5004 * ira-lives (non_conflicting_reg_copy_p): Disable for non LRA targets.
5006 2018-10-12 Paul Koning <ni1d@arrl.net>
5008 * doc/md.texi (doloop_end): Document that the pattern code may
5009 need to check operand mode.
5011 2018-10-12 Wilco Dijkstra <wdijkstr@arm.com>
5013 * config/aarch64/aarch64.md (zero_extendsidi2_aarch64): Add alternatives
5014 to zero-extend between int and floating-point registers.
5015 (load_pair_zero_extendsidi2_aarch64): Add alternative for zero-extended
5016 ldp into floating-point registers. Add type and arch attributes.
5017 (zero_extend<SHORT:mode><GPI:mode>2_aarch64): Add arch attribute.
5018 Use f_loads for type attribute.
5020 2018-10-11 Martin Sebor <msebor@redhat.com>
5022 * doc/extend.texi (attribute packed): Correct typos.
5024 2018-10-11 Martin Sebor <msebor@redhat.com>
5026 * doc/extend.texi (attribute flatten): Mention interaction with
5029 2018-10-11 Jan Hubicka <hubicka@ucw.cz>
5032 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
5033 Set new_decl virtual flag to zero.
5035 2018-10-11 Martin Sebor <msebor@redhat.com>
5038 * doc/extend.texi (attribute format_arg): Discuss using multiple
5039 attributes on a single function.
5041 2018-10-11 Giuliano Belinassi <giuliano.belinassi@usp.br>
5043 PR tree-optimization/86829
5044 * match.pd (sin (atan (x))): New simplification rules.
5045 (cos (atan (x))): Likewise.
5046 * real.c (build_sinatan_real): New function.
5047 * real.h (build_sinatan_real): Prototype.
5049 2018-10-11 Will Schmidt <will_schmidt@vnet.ibm.com>
5051 * config/rs6000/rs6000.c (map_to_integral_tree_type): New helper
5053 (fold_mergeeo_helper): New helper function.
5054 (rs6000_gimple_fold_builtin): Add hooks for vec_mergee and vec_mergeo
5055 intrinsics. Correct some whitespace indentation issues.
5057 2018-10-11 Wilco Dijkstra <wdijkstr@arm.com>
5060 * config/aarch64/aarch64.c (aarch64_mask_and_shift_for_ubfiz_p):
5061 Use HOST_WIDE_INT_1U for shift.
5063 2018-10-11 Doug Rupp <rupp@adacore.com>
5064 Olivier Hainque <hainque@adacore.com>
5066 * config/rs6000/vxworks.h (VXWORKS_RELAX_LINK_SPEC): New macro.
5067 Pass --relax to the linker for RTPs.
5068 (LINK_SPEC): Append VXWORKS_RELAX_LINK_SPEC.
5070 2018-10-11 Andrew Stubbs <ams@codesourcery.com>
5071 Jan Hubicka <jh@suse.cz>
5072 Martin Jambor <mjambor@suse.cz>
5074 * print-rtl.c (print_rtx_operand_codes_E_and_V): Print how many times
5075 the same elements are repeated rather than printing all of them.
5076 * read-rtl.c (rtx_reader::read_rtx_operand): Recognize and expand
5077 "repeated" elements.
5078 * read-rtl-function.c (test_loading_repeat): New function.
5079 (read_rtl_function_c_tests): Call test_loading_repeat.
5080 * rtl-tests.c (test_dumping_repeat): New function.
5081 (rtl_tests_c_tests): Call test_dumping_repeat.
5083 2018-10-11 Richard Biener <rguenther@suse.de>
5085 * config/i386/x86-tune-costs.h (bdver?_memcpy, bdver?_memset,
5086 bdver?_cost): Unify to ...
5087 (bdver_memcpy, bdver_memset, bdver_cost): ... this.
5088 * config/i386/i386.c (processor_cost_table): Adjust.
5090 2018-10-10 Eric Botcazou <ebotcazou@adacore.com>
5093 * cgraphunit.c (cgraph_node::expand_thunk): Force DECL_IGNORED_P on
5094 the thunk when expanding to GIMPLE.
5096 2018-10-10 Bernd Edlinger <bernd.edlinger@hotmail.de>
5098 * varasm.c (mergeable_string_section): Don't try to move zero-length
5099 strings to the merge section.
5101 2018-10-10 Uros Bizjak <ubizjak@gmail.com>
5104 * config/i386/mmx.md (const_vector 0 -> mem splitter): New splitter.
5106 2018-10-10 Jakub Jelinek <jakub@redhat.com>
5109 * config/i386/i386-builtin.def (IX86_BUILTIN_RDPMC): Move from args set
5110 to special_args set.
5112 2018-10-10 Richard Biener <rguenther@suse.de>
5114 * config/i386/sse.md (reduc_plus_scal_v8df, reduc_plus_scal_v4df,
5115 reduc_plus_scal_v2df, reduc_plus_scal_v16sf, reduc_plus_scal_v8sf,
5116 reduc_plus_scal_v4sf): Merge into pattern reducing to half width
5117 and recursing and pattern terminating the recursion on SSE
5118 vector width using ix86_expand_reduc.
5119 (reduc_sminmax_scal_<mode>): Split into part reducing to half
5120 width and recursing and SSE2 vector variant doing the final
5121 reduction with ix86_expand_reduc.
5122 (reduc_uminmax_scal_<mode>): Likewise for the AVX512 variants
5123 with terminating the recursion at AVX level, splitting that
5126 2018-10-09 David Malcolm <dmalcolm@redhat.com>
5128 * genmatch.c (error_cb): Rename to...
5129 (diagnostic_cb): ...this, converting int params to enums.
5130 (fatal_at): Update for renaming.
5131 (warning_at): Likewise.
5133 * input.c (selftest::ebcdic_execution_charset::apply):
5134 Update for renaming of...
5135 (selftest::ebcdic_execution_charset::on_error): ...this, renaming
5137 (selftest::ebcdic_execution_charset::on_diagnostic): ...this,
5138 converting level and reason to enums.
5139 (class selftest::lexer_error_sink): Rename to...
5140 (class selftest::lexer_test_options): ...this, renaming field
5141 "m_errors" to "m_diagnostics".
5142 (selftest::lexer_test_options::apply): Update for renaming of...
5143 (selftest::lexer_test_options::on_error): ...this, renaming to...
5144 (selftest::lexer_test_options::on_diagnostic): ...this
5145 converting level and reason to enums.
5146 (selftest::test_lexer_string_locations_raw_string_unterminated):
5147 Update for renamings.
5148 * opth-gen.awk (struct cpp_reason_option_codes_t): Use enum for
5151 2018-10-09 Paul A. Clarke <pc@us.ibm.com>
5153 * config.gcc (powerpc*-*-*): Add pmmintrin.h to extra_headers.
5154 * config/rs6000/pmmintrin.h: New file.
5156 2018-10-09 Eric Botcazou <ebotcazou@adacore.com>
5158 PR tree-optimization/86659
5159 * gimple-match.h (gimple_match_op constructors): Initialize reverse.
5161 2018-10-09 Richard Biener <rguenther@suse.de>
5163 PR tree-optimization/63155
5164 * tree-ssa-structalias.c: Include tree-ssa.h.
5165 (get_constraint_for_ssa_var): For undefs return nothing_id.
5166 (find_func_aliases): Cleanup PHI handling.
5168 2018-10-09 Richard Biener <rguenther@suse.de>
5170 * tree-vectorizer.c (dump_stmt_cost): Fix cut&paste missing
5173 2018-10-09 Martin Liska <mliska@suse.cz>
5175 * asan.c (asan_emit_stack_protection): If a stack variable
5176 is located in a same file as current function, then emit
5177 line info into variable definition string.
5179 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
5181 * print-rtl.c (rtx_writer::print_rtx_operand_code_i): Print column
5184 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
5186 * cgraphunit.c (cgraph_node::expand_thunk): Do not force DECL_IGNORED_P
5189 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
5191 PR tree-optimization/86659
5192 * gimple-match.h (struct gimple_match_op): Add reverse field.
5193 (gimple_match_op::set_op): New overloaded method.
5194 * gimple-match-head.c (maybe_build_generic_op) <BIT_FIELD_REF>: Set
5195 the REF_REVERSE_STORAGE_ORDER flag on the value.
5196 (gimple_simplify) <GIMPLE_ASSIGN>: For BIT_FIELD_REF, propagate the
5197 REF_REVERSE_STORAGE_ORDER flag and avoid simplifying if it is set.
5199 2018-10-08 Richard Sandiford <richard.sandiford@arm.com>
5202 * gimple-ssa-backprop.c (backprop::intersect_uses): Use
5203 FOR_EACH_IMM_USE_FAST instead of FOR_EACH_IMM_USE_STMT.
5205 2018-10-08 H.J. Lu <hongjiu.lu@intel.com>
5208 * config/i386/avx512fintrin.h (_mm512_mask_fmaddsub_round_pd):
5209 Defined with __builtin_ia32_vfmaddsubpd512_mask.
5211 2018-10-08 Richard Biener <rguenther@suse.de>
5213 * config/i386/x86-tune-costs.h (znver1_cost): Make AVX256 vector loads
5214 cost the same as AVX128 ones.
5216 2018-10-08 Paul Koning <ni1d@arrl.net>
5218 * config/pdp11/pdp11-protos.h (output_block_move): Remove.
5219 (expand_block_move): New function.
5220 * config/pdp11/pdp11.c (output_block_move): Remove.
5221 (expand_block_move): New function.
5222 * config/pdp11/pdp11.h (MOVE_RATIO): New definition.
5223 * config/pdp11/pdp11.md (movmemhi): Use expand_block_move.
5224 (*movmemhi1): Remove.
5226 2018-10-08 Robin Dapp <rdapp@linux.ibm.com>
5228 * config/s390/2827.md: Increase latencies for some FP instructions.
5230 2018-10-08 Richard Biener <rguenther@suse.de>
5232 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
5234 * tree-vectorizer.c (dump_stmt_cost): Add cost param and dump it.
5235 * tree-vectorizer.h (dump_stmt_cost): Adjust.
5236 (add_stmt_cost): Dump return value of the hook.
5238 2018-10-08 Richard Biener <rguenther@suse.de>
5240 PR tree-optimization/63155
5241 * tree-ssa-propagate.c (add_ssa_edge): Do cheap check first.
5242 (ssa_propagation_engine::ssa_propagate): Remove redundant
5243 bitmap bit clearing.
5245 2018-10-05 Peter Bergner <bergner@linux.ibm.com>
5247 PR rtl-optimization/86939
5248 PR rtl-optimization/87479
5249 * ira.h (non_conflicting_reg_copy_p): New prototype.
5250 * ira-lives.c (ignore_reg_for_conflicts): New static variable.
5251 (make_hard_regno_dead): Don't add conflicts for register
5252 ignore_reg_for_conflicts.
5253 (make_object_dead): Likewise.
5254 (non_conflicting_reg_copy_p): New function.
5255 (process_bb_node_lives): Set ignore_reg_for_conflicts for copies.
5256 Remove special conflict handling of REAL_PIC_OFFSET_TABLE_REGNUM.
5257 * lra-lives.c (ignore_reg_for_conflicts): New static variable.
5258 (make_hard_regno_dead): Don't add conflicts for register
5259 ignore_reg_for_conflicts. Remove special conflict handling of
5260 REAL_PIC_OFFSET_TABLE_REGNUM. Remove now unused argument
5261 check_pic_pseudo_p and update callers.
5262 (mark_pseudo_dead): Don't add conflicts for register
5263 ignore_reg_for_conflicts.
5264 (process_bb_lives): Set ignore_reg_for_conflicts for copies.
5266 2018-10-05 Andrew Waterman <andrew@sifive.com>
5267 Jim Wilson <jimw@sifive.com>
5269 * config/riscv/riscv.md (f<quiet_pattern>_quiet<ANYF:mode><X:mode>4):
5270 Add define_expand. Add ! HONOR_SNANS check to current pattern. Add
5271 new pattern using HONOR_SNANS that emits one extra instruction.
5273 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
5275 * config/rs6000/rs6000.md (unnamed mfcr scc_comparison_operator
5276 patterns): Merge SI and DI patterns to a GPR pattern.
5277 (unnamed define_insn and define_split for record form of that): Merge
5278 to a single define_insn_and_split pattern.
5280 2018-10-05 David Malcolm <dmalcolm@redhat.com>
5283 * input.c (expand_location_to_spelling_point): Add param "aspect"
5284 and use rather than hardcoding LOCATION_ASPECT_CARET.
5285 (get_substring_ranges_for_loc): Handle the case of a single token
5286 within a macro expansion.
5287 * input.h (expand_location_to_spelling_point): Add "aspect" param,
5288 defaulting to LOCATION_ASPECT_CARET.
5290 2018-10-05 Paul Koning <ni1d@arrl.net>
5292 * config/pdp11/pdp11.c (TARGET_CXX_GUARD_TYPE): Define.
5293 (TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT): Define.
5294 (TARGET_CXX_LIBRARY_RTTI_COMDAT): Define.
5295 (pdp11_guard_type): New function.
5297 2018-10-05 Paul Koning <ni1d@arrl.net>
5299 * config/pdp11/pdp11.h (FLOAT_TYPE_SIZE): Always 32.
5300 * config/pdp11/pdp11.opt (mfloat32): Remove.
5302 * doc/invoke.texi (pdp11 -mfloat32): Remove:
5303 (pdp11 -mfloat64): Remove.
5305 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
5307 * config/i386/i386.md (*cmpxf_cc_i387): Remove pattern.
5308 (*cmp<mode>_cc_i387): Ditto.
5309 (*cmpu<mode>_cc_i387): Ditto.
5310 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
5311 * config/i386/i386.c (ix86_expand_fp_compare): Remove
5313 <case IX86_FPCMP_SAHF>: Do not generate pattern with HImode clobber.
5314 Emit x86_sahf_1 pattern.
5315 (ix86_expand_compare): Update call to ix86_expand_fp_compare.
5316 (ix86_expand_carry_flag_compare): Ditto.
5318 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
5320 * config/i386/i386.md (*cmpxf_i387): Change operand 2 predicate
5321 to reg_or_0_operand. Add "C" constraint.
5322 (*cmpxf_cc_i387): Ditto.
5323 (*cmp<mode>_i387): Change operand 2 predicate
5324 to nonimm_or_0_operand. Add "C" constraint.
5325 (*cmp<mode>_cc_i387): Ditto.
5326 (*cmp<mode>_0_i387): Remove insn pattern.
5327 (*cmp<mode>_0_cc_i387): Ditto.
5329 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
5331 * config/i386/constraints.md ("C"): Do not depend on TARGET_SSE.
5332 * config/i386/predicates.md (nonimm_or_0_operand): Rename
5333 from vector_move_operand. Update all uses.
5335 2018-10-05 Martin Sebor <msebor@redhat.com>
5337 PR tree-optimization/87490
5338 * builtins.c (expand_builtin_strnlen): Handle a null data.decl
5341 2018-10-05 Richard Biener <rguenther@suse.de>
5343 PR tree-optimization/63155
5344 * tree-ssa-ccp.c (ccp_propagate::visit_phi): Avoid excess
5345 vertical space in dumpfiles.
5346 * tree-ssa-propagate.h
5347 (ssa_propagation_engine::process_ssa_edge_worklist): Remove.
5348 * tree-ssa-propagate.c (cfg_blocks_back): New global.
5349 (ssa_edge_worklist_back): Likewise.
5350 (curr_order): Likewise.
5351 (cfg_blocks_get): Remove abstraction.
5352 (cfg_blocks_add): Likewise.
5353 (cfg_blocks_empty_p): Likewise.
5354 (add_ssa_edge): Add to current or next worklist based on
5356 (add_control_edge): Likewise.
5357 (ssa_propagation_engine::process_ssa_edge_worklist): Fold
5359 (ssa_propagation_engine::ssa_propagate): ... here. Unify
5360 iteration from CFG and SSA edge worklist so we process
5361 everything in RPO order, prioritizing forward progress
5363 (ssa_prop_init): Allocate new worklists, do not dump
5365 (ssa_prop_fini): Free new worklists.
5367 2018-10-05 Richard Biener <rguenther@suse.de>
5369 * tree-core.h (tree_block::abstract_flag): Remove.
5370 (tree_block::block_num): Make full 32bits.
5371 * tree.def (BLOCK): Remove docs about BLOCK_ABSTRACT.
5372 * tree.h (BLOCK_ABSTRACT): Remove.
5373 * dwarf2out.c (gen_lexical_block_die): Remove dead code
5374 resulting from BLOCK_ABSTRACT being always false.
5375 (gen_inlined_subroutine_die): Likewise.
5376 (gen_block_die): Likewise.
5377 * tree.c (block_ultimate_origin): Likewise.
5378 * tree-pretty-print.c (dump_block_node): Remove code dealing
5379 with BLOCK_ABSTRACT.
5380 * tree-ssa-live.c (dump_scope_block): Likewise.
5381 * tree-streamer-in.c (unpack_ts_block_value_fields): Likewise.
5382 * tree-streamer-out.c (pack_ts_block_value_fields): Likewise.
5384 2018-10-05 Richard Biener <rguenther@suse.de>
5386 * config/i386/i386.c (ix86_add_stmt_cost): When scalar cost
5387 is asked for initialize mode to the component mode of the
5390 2018-10-05 H.J. Lu <hongjiu.lu@intel.com>
5393 * config/i386/gnu-user.h (ASM_SPEC): Don't pass -msse2avx to
5394 assembler for -mavx.
5395 * config/i386/gnu-user64.h (ASM_SPEC): Likewise.
5397 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
5400 * config/rs6000/rs6000-builtin.def (RS6000_BUILTIN_SET_FPSCR_DRN): Use
5402 * config/rs6000/rs6000.md (rs6000_set_fpscr_rn): Require the operand
5403 to be DImode. When using mffscrn, force the operand to a register.
5405 2018-10-04 Uros Bizjak <ubizjak@gmail.com>
5407 * config/i386/i386.md (*fop_<X87MODEF:mode>_2_i387): Macroize insn
5408 from *fop_<MODEF:mode>_2_i387 and *fop_xf_2_i387 using
5409 X87MODEF mode iterator.
5410 (*fop_<X87MODEF:mode>_3_i387): Macroize insn from
5411 *fop_<MODEF:mode>_3_i387 and *fop_xf_3_i387 using
5412 X87MODEF mode iterator.
5414 2018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
5416 * doc/invoke.texi (-Wno-prio-ctor-dtor): Document new warning
5417 -Wno-prio-ctor-dtor.
5419 2018-10-04 David Malcolm <dmalcolm@redhat.com>
5421 * Makefile.in (OBJS): Add opt-problem.o.
5422 * dump-context.h: Include "selftest.h.
5423 (selftest::temp_dump_context): New forward decl.
5424 (class dump_context): Make friend of class
5425 selftest::temp_dump_context.
5426 (dump_context::dump_loc_immediate): New decl.
5427 (class dump_pretty_printer): Move here from dumpfile.c.
5428 (class temp_dump_context): Move to namespace selftest.
5429 (temp_dump_context::temp_dump_context): Add param
5430 "forcibly_enable_dumping".
5431 (selftest::verify_dumped_text):
5432 (ASSERT_DUMPED_TEXT_EQ): Move here from dumpfile.c.
5433 (selftest::verify_item):
5434 (ASSERT_IS_TEXT): Move here from dumpfile.c.
5435 (ASSERT_IS_TREE): Likewise.
5436 (ASSERT_IS_GIMPLE): Likewise.
5437 * dumpfile.c (dump_context::dump_loc): Move immediate dumping
5439 (dump_context::dump_loc_immediate): ...this new function.
5440 (class dump_pretty_printer): Move to dump-context.h.
5441 (dump_switch_p_1): Don't enable MSG_PRIORITY_REEMITTED.
5442 (opt_info_switch_p_1): Enable MSG_PRIORITY_REEMITTED.
5443 (temp_dump_context::temp_dump_context): Move to "selftest"
5444 namespace. Add param "forcibly_enable_dumping", and use it to
5445 conditionalize the use of m_pp;
5446 (selftest::verify_dumped_text): Make non-static.
5447 (ASSERT_DUMPED_TEXT_EQ): Move to dump-context.h.
5448 (selftest::verify_item): Make non-static.
5449 (ASSERT_IS_TEXT): Move to dump-context.h.
5450 (ASSERT_IS_TREE): Likewise.
5451 (ASSERT_IS_GIMPLE): Likewise.
5452 (selftest::test_capture_of_dump_calls): Pass "true" for new
5453 param of temp_dump_context.
5454 * dumpfile.h (enum dump_flag): Add MSG_PRIORITY_REEMITTED, adding
5455 it to MSG_ALL_PRIORITIES. Update values of TDF_COMPARE_DEBUG and
5457 * opt-problem.cc: New file.
5458 * opt-problem.h: New file.
5459 * optinfo-emit-json.cc
5460 (selftest::test_building_json_from_dump_calls): Pass "true" for
5461 new param of temp_dump_context.
5462 * optinfo.cc (optinfo_kind_to_dump_flag): New function.
5463 (optinfo::emit_for_opt_problem): New function.
5464 (optinfo::emit): Clarity which emit_item is used.
5465 * optinfo.h (optinfo::get_dump_location): New accessor.
5466 (optinfo::emit_for_opt_problem): New decl.
5467 (optinfo::emit): Make const.
5468 * selftest-run-tests.c (selftest::run_tests): Call
5469 selftest::opt_problem_cc_tests.
5470 * selftest.h (selftest::opt_problem_cc_tests): New decl.
5471 * tree-data-ref.c (dr_analyze_innermost): Convert return type from
5472 bool to opt_result, converting fprintf messages to
5473 opt_result::failure_at calls. Add "stmt" param for use by the
5475 (create_data_ref): Pass "stmt" to the dr_analyze_innermost call.
5476 (runtime_alias_check_p): Convert return type from bool to
5477 opt_result, converting dump_printf calls to
5478 opt_result::failure_at, using the statement DDR_A for their
5480 (find_data_references_in_stmt): Convert return type from bool to
5481 opt_result, converting "return false" to opt_result::failure_at
5483 * tree-data-ref.h: Include "opt-problem.h".
5484 (dr_analyze_innermost): Convert return type from bool to opt_result,
5485 and add a const gimple * param.
5486 (find_data_references_in_stmt): Convert return type from bool to
5488 (runtime_alias_check_p): Likewise.
5489 * tree-predcom.c (find_looparound_phi): Pass "init_stmt" to
5490 dr_analyze_innermost.
5491 * tree-vect-data-refs.c (vect_mark_for_runtime_alias_test):
5492 Convert return type from bool to opt_result, adding a message for
5493 the PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS zero case.
5494 (vect_analyze_data_ref_dependence): Convert return type from bool
5495 to opt_result. Change sense of return type from "false"
5496 effectively meaning "no problems" to "false" meaning a problem,
5497 so that "return false" becomes "return opt_result::success".
5498 Convert "return true" calls to opt_result::failure_at, using
5499 the location of statement A rather than vect_location.
5500 (vect_analyze_data_ref_dependences): Convert return type from bool
5502 (verify_data_ref_alignment): Likewise, converting dump_printf_loc
5503 calls to opt_result::failure_at, using the stmt location rather
5505 (vect_verify_datarefs_alignment): Convert return type from bool
5507 (vect_enhance_data_refs_alignment): Likewise. Split local "stat"
5508 into multiple more-tightly-scoped copies.
5509 (vect_analyze_data_refs_alignment): Convert return type from bool
5511 (vect_analyze_data_ref_accesses): Likewise, converting a
5512 "return false" to a "return opt_result::failure_at", adding a
5514 (vect_prune_runtime_alias_test_list): Convert return type from
5515 bool to opt_result, converting dump_printf_loc to
5516 opt_result::failure_at. Add a %G to show the pertinent statement,
5517 and use the stmt's location rather than vect_location.
5518 (vect_find_stmt_data_reference): Convert return type from
5519 bool to opt_result, converting dump_printf_loc to
5520 opt_result::failure_at, using stmt's location.
5521 (vect_analyze_data_refs): Convert return type from bool to
5522 opt_result. Convert "return false" to "return
5523 opt_result::failure_at", adding messages as needed.
5524 * tree-vect-loop.c (vect_determine_vf_for_stmt_1): Convert return
5525 type from bool to opt_result.
5526 (vect_determine_vf_for_stmt): Likewise.
5527 (vect_determine_vectorization_factor): Likewise, converting
5528 dump_printf_loc to opt_result::failure_at, using location of phi
5529 rather than vect_location.
5530 (vect_analyze_loop_form_1): Convert return type from bool to
5531 opt_result, converting dump_printf_loc calls, retaining the use of
5533 (vect_analyze_loop_form): Convert return type from loop_vec_info
5534 to opt_loop_vec_info.
5535 (vect_analyze_loop_operations): Convert return type from bool to
5536 opt_result, converting dump_printf_loc calls, using the location
5537 of phi/stmt rather than vect_location where available. Convert
5538 various "return false" to "return opt_result::failure_at" with
5539 "unsupported phi" messages.
5540 (vect_get_datarefs_in_loop): Convert return type from bool to
5541 opt_result. Add a message for the
5542 PARAM_LOOP_MAX_DATAREFS_FOR_DATADEPS failure.
5543 (vect_analyze_loop_2): Convert return type from bool to
5544 opt_result. Ensure "ok" is set to a opt_result::failure_at before
5545 each "goto again;", adding new messages where needed.
5546 Add "unsupported grouped {store|load}" messages.
5547 (vect_analyze_loop): Convert return type from loop_vec_info to
5549 * tree-vect-slp.c (vect_analyze_slp): Convert return type from
5551 * tree-vect-stmts.c (process_use): Likewise, converting
5552 dump_printf_loc call and using stmt location, rather than
5554 (vect_mark_stmts_to_be_vectorized): Likeise.
5555 (vect_analyze_stmt): Likewise, adding a %G.
5556 (vect_get_vector_types_for_stmt): Convert return type from bool to
5557 opt_result, converting dump_printf_loc calls and using stmt
5558 location, rather than vect_location.
5559 (vect_get_mask_type_for_stmt): Convert return type from tree to
5560 opt_tree, converting dump_printf_loc calls and using stmt location.
5561 * tree-vectorizer.c: Include "opt-problem.h.
5562 (try_vectorize_loop_1): Flag "Analyzing loop at" dump message as
5563 MSG_PRIORITY_INTERNALS. Convert local "loop_vinfo" from
5564 loop_vec_info to opt_loop_vec_info. If if fails, and dumping is
5565 enabled, use it to report at the top level "couldn't vectorize
5566 loop" followed by the problem.
5567 * tree-vectorizer.h (opt_loop_vec_info): New typedef.
5568 (vect_mark_stmts_to_be_vectorized): Convert return type from bool
5570 (vect_analyze_stmt): Likewise.
5571 (vect_get_vector_types_for_stmt): Likewise.
5572 (tree vect_get_mask_type_for_stmt): Likewise.
5573 (vect_analyze_data_ref_dependences): Likewise.
5574 (vect_enhance_data_refs_alignment): Likewise.
5575 (vect_analyze_data_refs_alignment): Likewise.
5576 (vect_verify_datarefs_alignment): Likewise.
5577 (vect_analyze_data_ref_accesses): Likewise.
5578 (vect_prune_runtime_alias_test_list): Likewise.
5579 (vect_find_stmt_data_reference): Likewise.
5580 (vect_analyze_data_refs): Likewise.
5581 (vect_analyze_loop): Convert return type from loop_vec_info to
5583 (vect_analyze_loop_form): Likewise.
5584 (vect_analyze_slp): Convert return type from bool to opt_result.
5586 2018-10-04 David Malcolm <dmalcolm@redhat.com>
5588 * doc/invoke.texi (-fopt-info): Document new "internals"
5590 * dump-context.h (dump_context::apply_dump_filter_p): New decl.
5591 * dumpfile.c (dump_options): Update for renaming of MSG_ALL to
5593 (optinfo_verbosity_options): Add "internals".
5594 (kind_as_string): Update for renaming of MSG_ALL to MSG_ALL_KINDS.
5595 (dump_context::apply_dump_filter_p): New member function.
5596 (dump_context::dump_loc): Use apply_dump_filter_p rather than
5597 explicitly masking the dump_kind.
5598 (dump_context::begin_scope): Increment the scope depth first. Use
5599 apply_dump_filter_p rather than explicitly masking the dump_kind.
5600 (dump_context::emit_item): Use apply_dump_filter_p rather than
5601 explicitly masking the dump_kind.
5602 (dump_dec): Likewise.
5603 (dump_hex): Likewise.
5604 (dump_switch_p_1): Default to MSG_ALL_PRIORITIES.
5605 (opt_info_switch_p_1): Default to MSG_PRIORITY_USER_FACING.
5606 (opt_info_switch_p): Update handling of default
5607 MSG_OPTIMIZED_LOCATIONS to cope with default of
5608 MSG_PRIORITY_USER_FACING.
5609 (dump_basic_block): Use apply_dump_filter_p rather than explicitly
5610 masking the dump_kind.
5611 (selftest::test_capture_of_dump_calls): Update test_dump_context
5612 instances to use MSG_ALL_KINDS | MSG_PRIORITY_USER_FACING rather
5613 than MSG_ALL. Generalize scope test to be run at all four
5614 combinations of with/without MSG_PRIORITY_USER_FACING and
5615 MSG_PRIORITY_INTERNALS, adding examples of explicit priority
5616 for each of the two values.
5617 * dumpfile.h (enum dump_flag): Add comment about the MSG_* flags.
5618 Rename MSG_ALL to MSG_ALL_KINDS. Add MSG_PRIORITY_USER_FACING,
5619 MSG_PRIORITY_INTERNALS, and MSG_ALL_PRIORITIES, updating the
5620 values for TDF_COMPARE_DEBUG and TDF_ALL_VALUES.
5621 (AUTO_DUMP_SCOPE): Add a note to the comment about the interaction
5622 with MSG_PRIORITY_*.
5623 * tree-vect-loop-manip.c (vect_loop_versioning): Mark versioning
5624 dump messages as MSG_PRIORITY_USER_FACING.
5625 * tree-vectorizer.h (DUMP_VECT_SCOPE): Add a note to the comment
5626 about the interaction with MSG_PRIORITY_*.
5628 2018-10-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
5630 * varasm.c (output_constant): Add new parameter merge_strings.
5631 Make strings properly zero terminated in merge string sections.
5632 (mergeable_string_section): Don't fail if the last char is non-zero.
5633 (assemble_variable_contents): Handle merge string sections.
5634 (assemble_variable): Likewise.
5635 (assemble_constant_contents): Likewise.
5636 (output_constant_def_contents): Likewise.
5637 (output_constructor_array_range,
5638 output_constructor_regular_field): Adjust call to output_constant.
5639 (output_object_block): Adjust call to assemble_constant_contents
5640 and assemble_variable_contents.
5642 2018-10-04 Martin Liska <mliska@suse.cz>
5645 * cgraphunit.c (process_function_and_variable_attributes):
5646 Warn about a function with alias attribute and a body.
5648 2018-10-04 Martin Liska <mliska@suse.cz>
5651 * multiple_target.c (redirect_to_specific_clone): New function.
5652 (ipa_target_clone): Use it.
5653 * tree-inline.c: Fix comment.
5655 2018-10-04 David Malcolm <dmalcolm@redhat.com>
5657 * dumpfile.c (gcc::dump_manager::dump_manager): Initialize new
5659 (gcc::dump_manager::~dump_manager): Free m_optinfo_filename.
5660 (gcc::dump_manager::register_pass): New member function, adapted
5661 from loop body in gcc::pass_manager::register_pass, adding a
5662 call to update_dfi_for_opt_info.
5663 (gcc::dump_manager::opt_info_enable_passes): Store the
5664 -fopt-info options into the new fields. Move the loop
5666 (gcc::dump_manager::update_dfi_for_opt_info): ...this new member
5668 * dumpfile.h (struct opt_pass): New forward decl.
5669 (gcc::dump_manager::register_pass): New decl.
5670 (gcc::dump_manager::update_dfi_for_opt_info): New decl.
5671 (class gcc::dump_manager): Add fields "m_optgroup_flags",
5672 "m_optinfo_flags", and "m_optinfo_filename".
5673 * passes.c (gcc::pass_manager::register_pass): Move all of the
5674 dump-handling code to gcc::dump_manager::register_pass.
5676 2018-10-04 Peter Bergner <bergner@linux.ibm.com>
5678 PR rtl-optimization/87466
5679 * target.def (setjmp_preserves_nonvolatile_regs_p): New target hook.
5680 * doc/tm.texi.in (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P): New hook.
5681 * doc/tm.texi: Regenerate.
5682 * ira-lives.c (process_bb_node_lives): Use the new target hook.
5683 * lra-lives.c (process_bb_lives): Likewise.
5684 * config/rs6000/rs6000.c (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P):
5687 2018-10-04 Tamar Christina <tamar.christina@arm.com>
5689 * params.c (add_params): Fix initialization.
5691 2018-10-04 Martin Liska <mliska@suse.cz>
5693 PR gcov-profile/84107
5694 * tree-profile.c (init_ic_make_global_vars):
5695 Remove ic_void_ptr_var and ic_gcov_type_ptr_var.
5696 Come up with new ic_tuple* variables. Emit
5697 __gcov_indirect_call{,_topn} variables.
5698 (gimple_gen_ic_profiler): Access the variable
5700 (gimple_gen_ic_func_profiler): Access
5701 __gcov_indirect_call.callee field.
5702 (gimple_init_gcov_profiler): Use ptr_type_node.
5703 * value-prof.c (gimple_ic): Use ptr_type_node.
5705 2018-10-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5707 PR tree-optimization/85787
5708 * ipa-pure-const.c (malloc_candidate_p_1): Move most of
5709 malloc_candidate_p into this function and add support for
5710 detecting multiple phis.
5711 (DUMP_AND_RETURN): Move from malloc_candidate_p into top-level macro.
5713 2018-10-04 Martin Liska <mliska@suse.cz>
5716 * ipa-inline.c (inline_to_all_callers_1):
5717 Call ultimate_alias_target for node being inlined.
5719 2018-10-03 Jeff Law <law@redhat.com>
5721 * gimple-ssa-sprintf.c (format_string): Do not hardcode size of
5723 * tree.c (get_typenode_from_name): Moved from fortran/trans-types.c.
5724 * tree.h (get_typenode_from_name): Prototype.
5726 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
5728 * config/i386/i386.md (*cmp<X87MODEF:mode>_<SWI24:mode>_i387):
5729 Change operand 2 predicate to nonimmediate_operand.
5730 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
5732 2018-10-03 Martin Sebor <msebor@redhat.com>
5733 Jeff Law <law@redhat.com>
5735 * gimple-ssa-sprintf.c (struct fmtresult): Add new member and
5737 (get_string_length): Detect unterminated arrays.
5738 (format_string): Same.
5739 (format_directive): Warn about unterminated arrays.
5740 (handle_gimple_call): Mark statements with no_warning as needed.
5742 2018-10-03 Jim Wilson <jimw@sifive.com>
5744 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): For ABI_ILP32E,
5745 also define __riscv_abi_rve. Delete trailing white space.
5747 2018-10-03 Paul Koning <ni1d@arrl.net>
5749 Enable LRA register allocator for PDP11.
5750 * config/pdp11/constraints.md (Q): Use define_memory_constraint.
5753 * config/pdp11/pdp11.c (pdp11_lra_p): New function.
5754 * config/pdp11/pdp11.opt (-mlra): New option.
5755 * doc/invoke.texi (PDP-11 Options): Document -mlra.
5757 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
5759 * config/i386/i386.md (*<absneg:code>extendsfdf2): Remove.
5760 (*<absneg:code>extend<mode>xf2): Ditto.
5762 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
5764 PR tree-optimization/87415
5765 * tree-vrp.c (set_value_range_with_overflow): Special case one bit
5768 2018-10-02 Jeff Law <law@redhat.com>
5770 * gimple-fold.c (get_range_strlen): Only set *nonstr when
5771 an unterminated string is discovered. Bubble up range
5772 even for unterminated strings.
5773 (gimple_fold_builtin_strlen): Do not fold if get_range_strlen
5774 indicates the string was not terminated via NONSTR.
5776 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
5778 * tree-vrp.c (extract_range_from_unary_expr): Special case all
5779 pointer conversions.
5780 Do not do anything special for anti-ranges.
5782 2018-10-03 Jérôme Lambourg <lambourg@adacore.com>
5784 * config/arm/vxworks.h (ARM_TARGET2_DWARF_FORMAT): Adjust to
5785 DW_EH_PE_pcrel | DW_EH_PE_indirect for RTPs.
5787 2018-10-03 Martin Liska <mliska@suse.cz>
5789 PR gcov-profile/86109
5790 * coverage.c (coverage_begin_function): Do not
5791 mark lambdas as artificial.
5792 * tree-core.h (struct GTY): Remove tm_clone_flag
5793 and introduce new lambda_function.
5794 * tree.h (DECL_LAMBDA_FUNCTION): New macro.
5796 2018-10-02 Aaron Sawdey <acsawdey@linux.ibm.com>
5799 * config/rs6000/rs6000-string.c (expand_strn_compare): Check that both
5800 P8_VECTOR and VSX are enabled.
5802 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
5804 * config/s390/driver-native.c (s390_host_detect_local_cpu): Add
5805 0x3907 as CPU model number.
5807 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
5809 * common/config/s390/s390-common.c: Rename PF_ARCH12 to PF_Z14.
5810 * config/s390/s390.h (enum processor_flags): Rename PF_ARCH12 to
5811 PF_Z14. Rename TARGET_CPU_ARCH12 to TARGET_CPU_Z14,
5812 TARGET_CPU_ARCH12_P to TARGET_CPU_Z14_P, TARGET_ARCH12 to
5813 TARGET_Z14, and TARGET_ARCH12_P to TARGET_Z14_P.
5814 * config/s390/s390.md: Likewise. Rename also the cpu attribute
5815 value from arch12 to z14.
5817 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
5819 * config/i386/i386.md (fxam<mode>2_i387_with_temp): Remove.
5821 (isinf<mode>2): Ditto.
5823 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
5825 * config/i386/i386.c (ix86_emit_i387_round): Extend op1 to XFmode
5826 before emitting fxam. Perform calculations in XFmode.
5828 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
5830 * match.pd (((X /[ex] A) +- B) * A): New transformation.
5832 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
5835 * fold-const.c (fold_plusminus_mult_expr): Handle complex and vectors.
5836 * tree.c (signed_or_unsigned_type_for): Handle complex.
5838 2018-10-02 Jeff Law <law@redhat.com>
5840 * gimple-fold.c (get_range_strlen): Remove dead code.
5842 2018-10-02 Martin Sebor <msebor@redhat.com>
5843 Jeff Law <law@redhat.com>
5845 * builtins.c (unterminated_array): Add new arguments.
5846 If argument is not terminated, bubble up size and exact
5848 (expand_builtin_strnlen): Detect, avoid expanding
5849 and diagnose unterminated arrays.
5850 (c_strlen): Fill in offset of start of unterminated strings.
5851 * builtins.h (unterminated_array): Update prototype.
5853 2018-10-02 Richard Biener <rguenther@suse.de>
5855 * config/i386/sse.md (reduc_plus_scal_v4df): Avoid the use
5856 of haddv4df, first reduce to SSE width and exploit the fact
5857 that we only need element zero with the reduction result.
5858 (reduc_plus_scal_v2df): Likewise.
5860 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
5862 * dojump.h (do_jump): Delete.
5863 (do_jump_1): Likewise.
5864 (split_comparison): Move around.
5865 * dojump.c (do_jump): Make static.
5866 (do_jump_1): Likewise.
5867 (jumpifnot): Move around.
5868 (jumpifnot_1): Likewise.
5870 (jumpif_1): Likewise.
5871 * expr.c (expand_expr_real_1): Call jumpif[not] instead of do_jump.
5873 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
5875 * reorg.c (make_return_insns): Use emit_copy_of_insn_after for the
5876 insns in the delay slot and add_insn_after for the jump insn.
5878 2018-10-02 Richard Biener <rguenther@suse.de>
5880 * tree-inline.c (expand_call_inline): Use the location of
5881 the callee declaration for the inline-entry marker.
5882 * final.c (notice_source_line): Remove special-casing of
5883 NOTE_INSN_INLINE_ENTRY.
5885 2018-10-01 Carl Love <cel@us.ibm.com>
5888 * config/rs6000/rs6000-builtin.def (__builtin_mffsl): New.
5889 (__builtin_mtfsb0): New.
5890 (__builtin_mtfsb1): New.
5891 ( __builtin_set_fpscr_rn): New.
5892 (__builtin_set_fpscr_drn): New.
5893 * config/rs6000/rs6000.c (rs6000_expand_mtfsb_builtin): Add.
5894 (rs6000_expand_set_fpscr_rn_builtin): Add.
5895 (rs6000_expand_set_fpscr_drn_builtin): Add.
5896 (rs6000_expand_builtin): Add case statement entries for
5897 RS6000_BUILTIN_MTFSB0, RS6000_BUILTIN_MTFSB1,
5898 RS6000_BUILTIN_SET_FPSCR_RN, RS6000_BUILTIN_SET_FPSCR_DRN,
5899 RS6000_BUILTIN_MFFSL.
5900 (rs6000_init_builtins): Add ftype initialization and def_builtin
5901 calls for __builtin_mffsl, __builtin_mtfsb0, __builtin_mtfsb1,
5902 __builtin_set_fpscr_rn, __builtin_set_fpscr_drn.
5903 * config/rs6000.md (rs6000_mtfsb0, rs6000_mtfsb1, rs6000_mffscrn,
5904 rs6000_mffscdrn): Add define_insn.
5905 (rs6000_set_fpscr_rn, rs6000_set_fpscr_drn): Add define_expand.
5906 * doc/extend.texi: Add documentation for the builtins.
5908 2018-10-01 Richard Biener <rguenther@suse.de>
5910 PR tree-optimization/87465
5911 * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Fix typo
5912 causing branch miscounts.
5914 2018-10-01 Tamar Christina <tamar.christina@arm.com>
5916 * common/config/aarch64/aarch64-common.c (TARGET_OPTION_DEFAULT_PARAM,
5917 aarch64_option_default_param): New.
5918 (params.h): Include.
5919 (TARGET_OPTION_VALIDATE_PARAM, aarch64_option_validate_param): New.
5920 * config/aarch64/aarch64.c (aarch64_override_options_internal): Simplify
5921 stack-clash protection validation code.
5923 2018-10-01 Tamar Christina <tamar.christina@arm.com>
5925 * params.c (validate_param): New.
5926 (add_params): Use it.
5927 (set_param_value): Refactor param validation into validate_param.
5928 (diagnostic.h): Include.
5929 * diagnostic.h (diagnostic_ready_p): New.
5931 2018-10-01 Tamar Christina <tamar.christina@arm.com>
5933 * params.c (set_param_value):
5934 Add index of parameter being validated.
5935 * common/common-target.def (option_validate_param): New.
5936 * common/common-targhooks.h (default_option_validate_param): New.
5937 * common/common-targhooks.c (default_option_validate_param): New.
5938 * doc/tm.texi.in (TARGET_OPTION_VALIDATE_PARAM): New.
5939 * doc/tm.texi: Regenerate.
5941 2018-10-01 Tamar Christina <tamar.christina@arm.com>
5944 * config/aarch64/aarch64.c (aarch64_override_options_internal):
5945 Add validation for stack-clash parameters and set defaults.
5947 2018-10-01 Tamar Christina <tamar.christina@arm.com>
5950 * configure.ac: Add stack-clash-protection-guard-size.
5951 * doc/install.texi: Document it.
5952 * config.in (DEFAULT_STK_CLASH_GUARD_SIZE): New.
5953 * params.def: Update comment for guard-size.
5954 (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE,
5955 PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Update description.
5956 * configure: Regenerate.
5958 2018-10-01 Tamar Christina <tamar.christina@arm.com>
5961 * config/aarch64/aarch64.h (STACK_CLASH_MIN_BYTES_OUTGOING_ARGS,
5962 STACK_DYNAMIC_OFFSET): New.
5963 * config/aarch64/aarch64.c (aarch64_layout_frame):
5964 Update outgoing args size.
5965 (aarch64_stack_clash_protection_alloca_probe_range,
5966 TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
5968 2018-10-01 Tamar Christina <tamar.christina@arm.com>
5971 * explow.c (anti_adjust_stack_and_probe_stack_clash): Support custom
5973 * target.def (stack_clash_protection_alloca_probe_range): New.
5974 (stack_clash_protection_final_dynamic_probe): Remove.
5975 * targhooks.h (default_stack_clash_protection_alloca_probe_range) New.
5976 (default_stack_clash_protection_final_dynamic_probe): Remove.
5977 * targhooks.c: Likewise.
5978 * doc/tm.texi.in (TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
5979 (TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE): Remove.
5980 * doc/tm.texi: Regenerate.
5982 2018-10-01 Tamar Christina <tamar.christina@arm.com>
5985 * config/aarch64/aarch64-protos.h (aarch64_output_probe_sve_stack_clash): New.
5986 * config/aarch64/aarch64.c (aarch64_output_probe_sve_stack_clash,
5987 aarch64_clamp_to_uimm12_shift): New.
5988 (aarch64_allocate_and_probe_stack_space): Add SVE specific section.
5989 * config/aarch64/aarch64.md (probe_sve_stack_clash): New.
5991 2018-10-01 Tamar Christina <tamar.christina@arm.com>
5994 * config/aarch64/aarch64.c (aarch64_layout_frame): Add assert.
5996 2018-10-01 Jeff Law <law@redhat.com>
5997 Richard Sandiford <richard.sandiford@linaro.org>
5998 Tamar Christina <tamar.christina@arm.com>
6001 * config/aarch64/aarch64.md
6002 (probe_stack_range): Add k (SP) constraint.
6003 * config/aarch64/aarch64.h (STACK_CLASH_CALLER_GUARD,
6004 STACK_CLASH_MAX_UNROLL_PAGES): New.
6005 * config/aarch64/aarch64.c (aarch64_output_probe_stack_range): Emit
6006 stack probes for stack clash.
6007 (aarch64_allocate_and_probe_stack_space): New.
6008 (aarch64_expand_prologue): Use it.
6009 (aarch64_expand_epilogue): Likewise and update IP regs re-use criteria.
6010 (aarch64_sub_sp): Add emit_move_imm optional param.
6012 2018-10-01 MCC CS <deswurstes@users.noreply.github.com>
6014 PR tree-optimization/87261
6015 * match.pd: Remove trailing whitespace.
6016 Add (x & y) | ~(x | y) -> ~(x ^ y),
6017 (~x | y) ^ (x ^ y) -> x | ~y and (x ^ y) | ~(x | y) -> ~(x & y)
6019 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
6021 * config/arc/arc.md (*add_n): Clean up pattern, update instruction
6023 (ashlsi3_insn): Update instruction constraints.
6024 (ashrsi3_insn): Likewise.
6025 (rotrsi3): Likewise.
6026 (add_shift): Likewise.
6027 * config/arc/constraints.md (Csz): New 32 bit constraint. It
6028 avoids placing in the limm field small constants which, otherwise,
6029 could end into a small instruction.
6031 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
6033 * config/arc/arc.md (maddsidi4_split): Don't use dmac if the
6034 destination register is not odd-even.
6035 (umaddsidi4_split): Likewise.
6037 2018-10-01 Richard Biener <rguenther@suse.de>
6039 * tree-inline.c (expand_call_inline): Store origin of fn
6040 in BLOCK_ABSTRACT_ORIGIN for the inline BLOCK.
6041 * tree.c (block_ultimate_origin): Simplify and do some
6044 2018-09-30 Uros Bizjak <ubizjak@gmail.com>
6046 * config/i386/mmx.md (EMMS): New int iterator.
6047 (emms): New int attribute.
6048 (mmx_<emms>): Macroize insn from *mmx_emms and *mmx_femms using
6049 EMMS int iterator. Explicitly declare clobbers.
6050 (mmx_emms): Remove expander.
6052 * config/i386/predicates.md (emms_operation): Remove predicate.
6053 (vzeroall_pattern): New predicate.
6054 (vzeroupper_pattern): Rename from vzeroupper_operation.
6055 * config/i386/i386.c (ix86_avx_u128_mode_after): Use
6056 vzeroupper_pattern and vzeroall_pattern predicates.
6058 2018-09-30 Peter Bergner <bergner@linux.ibm.com>
6060 PR rtl-optimization/86939
6061 * ira-lives.c (make_hard_regno_born): Rename from this...
6062 (make_hard_regno_live): ... to this. Remove update to conflict
6063 information. Update function comment.
6064 (make_hard_regno_dead): Add conflict information update. Update
6066 (make_object_born): Rename from this...
6067 (make_object_live): ... to this. Remove update to conflict information.
6068 Update function comment.
6069 (make_object_dead): Add conflict information update. Update function
6071 (mark_pseudo_regno_live): Call make_object_live.
6072 (mark_pseudo_regno_subword_live): Likewise.
6073 (mark_hard_reg_dead): Update function comment.
6074 (mark_hard_reg_live): Call make_hard_regno_live.
6075 (process_bb_node_lives): Likewise.
6076 * lra-lives.c (make_hard_regno_born): Rename from this...
6077 (make_hard_regno_live): ... to this. Remove update to conflict
6078 information. Remove now uneeded check_pic_pseudo_p argument.
6079 Update function comment.
6080 (make_hard_regno_dead): Add check_pic_pseudo_p argument and add update
6081 to conflict information. Update function comment.
6082 (mark_pseudo_live): Remove update to conflict information. Update
6084 (mark_pseudo_dead): Add conflict information update.
6085 (mark_regno_live): Call make_hard_regno_live.
6086 (mark_regno_dead): Call make_hard_regno_dead with new arguement.
6087 (process_bb_lives): Call make_hard_regno_live and make_hard_regno_dead.
6089 2018-09-29 H.J. Lu <hongjiu.lu@intel.com>
6092 * config/i386/i386.c (construct_container): Use TImode for
6093 BLKmode values in 2 integer registers.
6095 2018-09-29 Jeff Law <law@redhat.com>
6097 * builtins.c (unterminated_array): Pass in c_strlen_data * to
6098 c_strlen rather than just a tree *.
6099 (c_strlen): Change NONSTR argument to a c_strlen_data pointer.
6100 Update recursive calls appropriately. If caller did not provide a
6101 suitable data pointer, create a local one. When a non-terminated
6102 string is discovered, bubble up information about the string via the
6103 c_strlen_data object.
6104 * builtins.h (c_strlen): Update prototype.
6105 (c_strlen_data): New structure.
6106 * gimple-fold.c (get_range_strlen): Update calls to c_strlen.
6107 For a type 2 call, if c_strlen indicates a non-terminated string
6108 use the length of the non-terminated string.
6109 (gimple_fold_builtin_stpcpy): Update calls to c_strlen.
6111 2018-09-29 Jakub Jelinek <jakub@redhat.com>
6114 * config/i386/avx512fintrin.h (_mm512_abs_pd, _mm512_mask_abs_pd): Use
6115 __m512d type for __A argument rather than __m512.
6117 2018-09-28 John David Anglin <danglin@gcc.gnu.org>
6119 * match.pd (simple_comparison): Don't optimize if either operand is
6120 a function pointer when target needs function pointer canonicalization.
6122 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
6124 * config/rs6000/driver-rs6000.c (asm_names): Adjust the entries for
6125 power5 .. power9 to remove indirection.
6126 * config/rs6000/rs6000.h (ASM_CPU_POWER5_SPEC, ASM_CPU_POWER6_SPEC,
6127 ASM_CPU_POWER7_SPEC, ASM_CPU_POWER8_SPEC, ASM_CPU_POWER9_SPEC,
6128 ASM_CPU_476_SPEC): Delete.
6129 (ASM_CPU_SPEC): Adjust.
6130 (EXTRA_SPECS): Delete asm_cpu_power5, asm_cpu_power6, asm_cpu_power7,
6131 asm_cpu_power8, asm_cpu_power9, asm_cpu_476.
6133 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
6135 * config.in: Delete HAVE_AS_DCI.
6136 * config/powerpcspe/powerpcspe.h: Treat HAVE_AS_DCI as always true.
6137 * config/rs6000/rs6000.h: Ditto.
6138 * configure.ac: Delete HAVE_AS_DCI.
6139 * configure: Regenerate.
6141 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
6143 * config.in (HAVE_AS_LWSYNC): Delete.
6144 * config/powerpcspe/powerpcspe.h (TARGET_LWSYNC_INSTRUCTION): Delete.
6145 * config/powerpcspe/sync.md (*lwsync): Always generate lwsync, never
6147 * config/rs6000/rs6000.h (TARGET_LWSYNC_INSTRUCTION): Delete.
6148 * config/rs6000/sync.md (*lwsync): Always generate lwsync, never do it
6150 * configure.ac: Delete HAVE_AS_LWSYNC.
6151 * configure: Regenerate.
6153 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
6154 Pierre-Marie de Rodat <derodat@adacore.com>
6156 * calls.c (expand_call): Try to do a tail call for thunks at -O0 too.
6157 * cgraph.h (struct cgraph_thunk_info): Add indirect_offset.
6158 (cgraph_node::create_thunk): Add indirect_offset parameter.
6159 (thunk_adjust): Likewise.
6160 * cgraph.c (cgraph_node::create_thunk): Add indirect_offset parameter
6161 and initialize the corresponding field with it.
6162 (cgraph_node::dump): Dump indirect_offset field.
6163 * cgraphclones.c (duplicate_thunk_for_node): Deal with indirect_offset.
6164 * cgraphunit.c (cgraph_node::analyze): Be prepared for external thunks.
6165 (thunk_adjust): Add indirect_offset parameter and deal with it.
6166 (cgraph_node::expand_thunk): Deal with the indirect_offset field and
6167 pass it to thunk_adjust. Do not call the target hook if it's non-zero
6168 or if the thunk is external or local. Fix formatting. Do not chain
6169 the RESULT_DECL to BLOCK_VARS. Pass the static chain to the target,
6170 if any, in the GIMPLE representation.
6171 * ipa-icf.c (sem_function::equals_wpa): Deal with indirect_offset.
6172 * lto-cgraph.c (lto_output_node): Write indirect_offset field.
6173 (input_node): Read indirect_offset field.
6174 * tree-inline.c (expand_call_inline): Pass indirect_offset field in the
6175 call to thunk_adjust.
6176 * tree-nested.c (struct nesting_info): Add thunk_p field.
6177 (create_nesting_tree): Set it.
6178 (convert_all_function_calls): Copy static chain from targets to thunks.
6179 (finalize_nesting_tree_1): Return early for thunks.
6180 (unnest_nesting_tree_1): Do not finalize thunks.
6181 (gimplify_all_functions): Do not gimplify thunks.
6183 2018-09-28 David Malcolm <dmalcolm@redhat.com>
6185 * opt-suggestions.c (option_proposer::build_option_suggestions):
6186 Release "option_values".
6188 2018-09-28 David Malcolm <dmalcolm@redhat.com>
6190 * coverage.c (get_coverage_counts): Convert problem-reporting dump
6191 messages from MSG_OPTIMIZED_LOCATIONS to MSG_MISSED_OPTIMIZATION.
6192 * dumpfile.c (kind_as_string): New function.
6193 (dump_loc): Rather than a hardcoded prefix of "note: ", use
6194 kind_as_string to vary the prefix based on dump_kind.
6195 (selftest::test_capture_of_dump_calls): Update for above.
6197 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
6199 * config/i386/i386.h (SSE_REGNO): Fix check for FIRST_REX_SSE_REG.
6200 (GET_SSE_REGNO): Rename from SSE_REGNO. Update all uses for rename.
6202 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
6204 * config/i386/i386.h (CC_REGNO): Remove FPSR_REG.
6205 * config/i386/i386.c (ix86_fixed_condition_code_regs): Use
6206 INVALID_REGNUM instead of FPSR_REG.
6207 (ix86_md_asm_adjust): Do not clobber FPSR_REG.
6208 * config/i386/i386.md: Update comment of FP compares.
6209 (fldenv): Do not clobber FPSR_REG.
6211 2018-09-28 Richard Biener <rguenther@suse.de>
6213 * tree.h (BLOCK_ORIGIN): New.
6214 * omp-expand.c (grid_expand_target_grid_body): Assign
6215 BLOCK_ORIGIN to BLOCK_ABSTRACT_ORIGIN.
6216 * tree-inline.c (remap_block): Likewise.
6217 * auto-profile.c (get_function_decl_from_block): Simplify
6218 by eliding the BLOCK_ABSTRACT_ORIGIN chasing.
6219 * langhooks.c (lhd_print_error_function): Likewise.
6220 * optinfo-emit-json.cc (optrecord_json_writer::inlining_chain_to):
6222 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
6223 * tree.c (block_nonartificial_location): Likewise.
6224 (block_ultimate_origin): Likewise.
6225 * tree-pretty-print.c (percent_K_format): Likewise. Remove
6226 no longer needed LTO case.
6228 2018-09-28 Andrew Stubbs <ams@codesourcery.com>
6229 Jan Hubicka <jh@suse.cz>
6230 Martin Jambor <mjambor@suse.cz>
6232 * simplify-rtx.c (simplify_merge_mask): New function.
6233 (simplify_ternary_operation): Use it, also see if VEC_MERGEs with the
6234 same masks are used in op1 or op2.
6235 (test_vec_merge): New function.
6236 (test_vector_ops): Call test_vec_merge.
6238 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
6240 * config/sparc/sparc-protos.h (sparc_branch_cost): Declare.
6241 * config/sparc/sparc.h (BRANCH_COST): Call sparc_branch_cost.
6242 * config/sparc/sparc.c (struct processor_costs): Add branch_cost field.
6243 (cypress_costs): Set it.
6244 (supersparc_costs): Likewise.
6245 (hypersparc_costs): Likewise.
6246 (leon_cost): Likewise.
6247 (leon3_costs): Likewise.
6248 (sparclet_costs): Likewise.
6249 (ultrasparc_costs): Likewise.
6250 (ultrasparc_costs): Likewise.
6251 (niagara_costs): Likewise.
6252 (niagara2_costs): Likewise.
6253 (niagara3_costs): Likewise.
6254 (niagara4_costs): Likewise.
6255 (niagara7_costs): Likewise.
6256 (m8_costs): Likewise.
6257 (TARGET_CAN_FOLLOW_JUMP): Define.
6258 (pass_work_around_errata::gate): Minor tweak.
6259 (sparc_option_override): Remove MASK_FSMULD mask for V7 processors.
6260 Do not set both MASK_VIS4 and MASK_VIS4B for M8 processor.
6261 Automaitcally clear MASK_FSMULD mask for V7 processors.
6262 (sparc_can_follow_jump): New static function.
6263 (output_ubranch): Deal with CROSSING_JUMP_P.
6264 (sparc_use_sched_lookahead): Rewrite using switch statement.
6265 (sparc_issue_rate): Reorder.
6266 (sparc_branch_cost): New function.
6268 2018-09-27 Martin Sebor <msebor@redhat.com>
6270 * tree.h (tree_to_shwi): Add attribute nonnull and pure.
6271 (tree_to_poly_int64, tree_to_uhwi, tree_to_poly_uint64): Same.
6272 (int_fits_type_p): Same.
6274 2018-09-27 Uros Bizjak <ubizjak@gmail.com>
6276 * config/i386/i386.md (FPCR_REG): Remove.
6277 (UNSPEC_FLDCW): Remove.
6278 (x86_fnstcw_1): Use (const_int 0) instead of FPCR_REG.
6279 (x86_fldcw_1): Remove insn pattern.
6280 (fnstenv): Do not clobber FPCR_REG.
6282 * config/i386/i386.h (FIXED_REGISTERS) Remove fpsr register.
6283 (CALL_USED_REGISTERS): Ditto.
6284 (REG_ALLOC_ORDER): Ditto.
6285 (REG_CLASS_CONTENTS): Ditto.
6286 (HI_REGISTER_NAMES): Ditto.
6287 (ADDITIONAL_REGISTER_NAMES): Use defines instead
6288 of numerical constants.
6289 * config/i386/i386.c (regclass_map): Remove fpsr register.
6290 (dbx_register_map): Ditto.
6291 (dbx64_register_map): Ditto.
6292 (svr4_dbx_register_map): Ditto.
6293 (print_reg): Do not handle FPCR_REG.
6295 2018-09-27 Segher Boessenkool <segher@kernel.crashing.org>
6298 * config.in (HAVE_AS_CMPB, HAVE_AS_DFP, HAVE_AS_FPRND, HAVE_AS_MFPGPR,
6299 HAVE_AS_POPCNTB, HAVE_AS_POPCNTD, HAVE_AS_POWER8, HAVE_AS_POWER9):
6300 Delete, always treat as true.
6301 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
6302 Ditto. Simplify remaining code.
6303 * config/powerpcspe/powerpcspe.h: Ditto.
6304 * config/rs6000/rs6000.c (rs6000_option_override_internal): Ditto.
6305 Simplify remaining code.
6306 (rs6000_expand_builtin): Ditto.
6307 * config/rs6000/rs6000.h: Ditto.
6308 * configure.ac: Ditto.
6309 * configure: Regenerate.
6311 2018-09-27 Martin Liska <mliska@suse.cz>
6313 * coverage.c (get_coverage_counts): Revert the formatting
6314 of missing profile opt info.
6316 2018-09-27 Richard Biener <rguenther@suse.de>
6320 * dwarf2out.c (set_block_origin_self): Do not mark outermost
6321 block as we do not output that.
6322 (gen_inlined_subroutine_die): Elide the originally outermost
6323 block, matching what we do for concrete instances.
6324 (decls_for_scope): Add parameter specifying whether to recurse
6327 2018-09-27 Andrew Stubbs <ams@codesourcery.com>
6328 Tom de Vries <tom@codesourcery.com>
6332 * expmed.c (emit_cstore): Fix handling of result_mode == BImode and
6333 STORE_FLAG_VALUE == 1.
6335 2018-09-27 Andreas Krebbel <krebbel@linux.ibm.com>
6337 * config/s390/s390.md (PPA_TX_ABORT, PPA_OOO_BARRIER): New
6338 constant definitions.
6339 ("tx_assist"): Replace magic number with PPA_TX_ABORT.
6340 ("*ppa"): Enable pattern also for -march=zEC12 -mno-htm.
6341 ("speculation_barrier"): New expander definition.
6343 2018-09-26 Indu Bhagat <indu.bhagat@oracle.com>
6345 PR gcov-profile/86957
6346 * common.opt: New warning option -Wmissing-profile.
6347 * coverage.c (get_coverage_counts): Add warning for missing .gcda file.
6348 * doc/invoke.texi: Document -Wmissing-profile.
6350 2018-09-26 Jim Wilson <jimw@sifive.com>
6352 * config/riscv/riscv.md (subsi3_extended2): Add J constraint.
6353 (negdi2, negsi2, negsi2_extended, negsi2_extended2): New.
6355 2018-09-26 Martin Sebor <msebor@redhat.com>
6357 * tree.c (zerop): Change return type to bool.
6358 (integer_zerop, integer_onep, integer_each_onep): Same.
6359 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
6360 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
6361 (real_onep, real_minus_onep, chain_index): Same.
6362 (print_type_hash_statistics, type_list_equal): Same.
6363 * tree.h (zerop): Same.
6364 (zerop, integer_zerop, integer_onep, integer_each_onep): Same.
6365 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
6366 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
6367 (real_onep, real_minus_onep, chain_index): Same.
6368 (print_type_hash_statistics, type_list_equal): Same.
6370 2018-09-26 Jim Wilson <jimw@sifive.com>
6372 * config/riscv/riscv.h (FUNCTION_ARG_REGNO_P): Fix comment.
6374 2018-09-26 Jakub Jelinek <jakub@redhat.com>
6377 * config/i386/i386.c: Include debug.h and dwarf2out.h.
6378 (output_indirect_thunk): Emit DW_CFA_def_cfa_offset after the
6381 2018-09-25 Andrew Stubbs <ams@codesourcery.com>
6383 * builtins.c (get_builtin_sync_mem): Force address mode conversion.
6385 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
6387 * config/i386/i386.h (enum reg_class): Remove FP_TOP_SSE_REGS
6388 and FP_SECOND_SSE_REGS.
6389 (REG_CLASS_NAMES): Ditto.
6390 (REG_CLASS_CONTENTS): Ditto.
6391 * config/i386/i386.c (ix86_preferred_reload_class) Do not handle
6392 FP_TOP_SSE_REGS and FP_SECOND_SSE_REGS classes.
6393 (ix86_preferred_output_reload_class): Ditto.
6394 * config/i386/i386.md (fix_trunc<mode>_i387_fisttp): Change "=&1f"
6395 clobber constraint to "=&f".
6396 (fix_truncdi_i387): Ditto.
6397 (lrintxfdi2): Ditto.
6398 (fistdi2_<rounding>): Ditto.
6399 (fpremxf4_i387): Change "=u" constraint to "=f".
6400 (fprem1xf4_i387): Ditto.
6402 (fptanxf4_i387): Ditto.
6403 (fxtractxf3_i387): Ditto.
6404 (fscalexf4_i387): Ditto.
6405 (atan2xf3): Change "u" constraint to "f".
6406 (fyl2xxf3_i387): Ditto.
6407 (fyl2xp1xf3_i387): Ditto.
6409 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
6412 * config/i386/i386.h (NUM_MODES_FOR_MODE_SWITCHING): Update
6413 for removed I387_MASK_PM entity.
6416 2018-09-26 Jeff Law <law@redhat.com>
6418 2018-09-26 Alexey Neyman <stilor@att.net>
6420 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
6421 headers are no longer pulled in by <isl/val.h>.
6423 2018-09-26 Richard Biener <rguenther@suse.de>
6426 * dwarf2out.c (gen_lexical_block_die): Do not equate inline
6427 or concrete instance DIE to the tree. Create abstract origin
6428 attributes also for concrete instances.
6430 2018-09-26 Alexey Neyman <stilor@att.net>
6432 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
6433 headers are no longer pulled in by <isl/val.h>.
6435 2018-09-26 Matthew Malcomson <matthew.malcomson@arm.com>
6437 * config/arm/arm.c (arm_split_compare_and_swap, arm_split_atomic_op):
6438 Use new helper functions.
6439 * config/arm/sync.md (atomic_load<mode>, atomic_store<mode>):
6440 Use new helper functions.
6441 * config/arm/aarch-common-protos.h (aarch_mm_needs_acquire,
6442 aarch_mm_needs_release): New declarations.
6443 * config/arm/aarch-common.c (aarch_mm_needs_acquire,
6444 aarch_mm_needs_release): New.
6446 2018-09-26 Eric Botcazou <ebotcazou@adacore.com>
6448 * config/arm/arm.c (arm_reorg): Skip Thumb reorg pass for thunks.
6449 (arm32_output_mi_thunk): Deal with long calls.
6451 2018-09-26 Richard Biener <rguenther@suse.de>
6455 * tree-inline.c (expand_call_inline): When the location
6456 of the call is UNKNOWN_LOCATION use DECL_SOURCE_LOCATION
6457 or BUILTINS_LOCATION for the BLOCK_SOURCE_LOCATION of
6458 the inserted BLOCK to make inlined_function_outer_scope_p
6460 * dwarf2out.c (add_call_src_coords_attributes): Do not add
6461 coords for reserved locations.
6463 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
6465 * config/rs6000/rs6000.md (*movcc_internal1): Use set_attr_alternative.
6466 (*call_indirect_nonlocal_sysv<mode>): Ditto.
6467 (*call_value_indirect_nonlocal_sysv<mode>): Ditto.
6468 (*sibcall_nonlocal_sysv<mode>): Ditto.
6469 (*sibcall_value_nonlocal_sysv<mode>): Ditto.
6470 (<bd>_<mode>): Ditto.
6471 (<bd>tf_<mode>): Ditto.
6473 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
6475 * config/rs6000/altivec.md (*altivec_mov<mode>): Write the output
6476 control string as a list of templates instead of as C code.
6477 (*altivec_movti): Ditto.
6478 * config/rs6000/darwin.md (movdf_low_di): Ditto.
6480 2018-09-25 Jim Wilson <jimw@sifive.com>
6482 * config/riscv/riscv.c (riscv_split_symbol): Mark auipc label as weak
6483 when target symbol is weak.
6485 2018-09-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
6488 * builtins.c (unterminated_array): Simplify.
6489 * expr.c (string_constant): Handle SSA_NAME. Add more exceptions
6490 where pointer arithmetic is safe.
6492 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
6495 * config/rs6000/altivec.md (altivec_vspltb): Use
6496 const_0_to_15_operand instead of u5bit_cint_operand.
6497 (*altivec_vspltb_internal): Ditto.
6498 (altivec_vspltb_direct): Ditto.
6499 (altivec_vsplth): Use const_0_to_7_operand instead of
6501 (*altivec_vsplth_internal): Ditto.
6502 (altivec_vsplth_direct): Ditto.
6503 (altivec_vspltw): Use const_0_to_3_operand instead of
6505 (*altivec_vspltw_internal): Ditto.
6506 (altivec_vspltw_direct): Ditto.
6507 (altivec_vspltsf): Ditto.
6508 (*altivec_vspltsf_internal): Ditto.
6509 * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Handle the
6510 various splats with the proper size immediate. Reorder the various
6511 cases by ascending size of immediate, and put all such together.
6513 2018-09-25 Richard Biener <rguenther@suse.de>
6516 * dwarf2out.c (add_AT_external_die_ref): Remove now redundant
6518 (maybe_create_die_with_external_ref): Do not create
6519 DW_TAG_imported_unit here.
6520 (add_abstract_origin_attribute): Handle external BLOCK refs.
6521 (dwarf2out_abstract_function): Simplify LTO case.
6522 (dwarf2out_early_finish): Create DW_TAG_imported_unit explicitely
6523 rather than using maybe_create_die_with_external_ref.
6525 2018-09-25 Uros Bizjak <ubizjak@gmail.com>
6528 * config/i386/i386.md (frndintxf2_mask_pm): Remove.
6529 (frndintxf2_mask_pm_i387): Ditto.
6530 (nearbyintxf2): Rewrite expander pattern to match rintxf2.
6531 Enable for !flag_trapping_math.
6532 (nearbyint<mode>2): Enable x87 modes for !flag_trapping_math.
6533 Enable SSE modes for TARGET_SSE4_1 and expand them with round insn.
6534 Change operand 1 predicate to nonimmediate_operand.
6535 (attr "i387_cw"): Remove mask_pm.
6536 * config/i386/i386.h (enum ix86_stack_slot): Remove SLOT_CW_MASK_PM.
6537 (enum ix86_entity): Remove I387_MASK_PM.
6538 * config/i386/i386.c (ix86_i387_mode_needed): Do not
6539 handle I387_MASK_PM.
6540 (ix86_mode_needed): Ditto.
6541 (ix86_mode_after): Ditto.
6542 (ix86_mode_entry): Ditto.
6543 (ix86_mode_exit): Ditto.
6544 (emit_i387_cw_initialization): Do not handle I387_CW_MASK_PM.
6546 2018-09-25 Jakub Jelinek <jakub@redhat.com>
6548 * vr-values.c (vr_values::vr_values): Initialize to_remove_edges and
6549 to_update_switch_stmts to vNULL instead of calling create on them
6552 2018-09-25 Richard Biener <rguenther@suse.de>
6554 PR tree-optimization/87402
6555 * tree-ssa-sccvn.c (SSA_VISITED): Remove unused function.
6556 (visit_phi): Re-instantiate handling of supposed to be VARYING
6557 but non-VARYING backedge value.
6559 2018-09-25 Richard Biener <rguenther@suse.de>
6562 * dwarf2out.c (struct sym_off_pair): New.
6563 (external_die_map): New global.
6564 (lookup_decl_die): When in LTO create DIEs lazily from the
6566 (lookup_block_die): New function, create DIEs lazily in LTO.
6567 (equate_block_to_die): New function.
6568 (dwarf2out_die_ref_for_decl): During WPA get the association
6569 from the external DIE map.
6570 (dwarf2out_register_external_die): Record mapping into the
6572 (maybe_create_die_with_external_ref): New function split out from
6573 DIE generation part of old dwarf2out_register_external_die.
6574 (add_abstract_origin_attribute): Do not return the DIE. When
6575 in LTO reference externals directly.
6576 (dwarf2out_abstract_function): When in LTO ignore calls for
6577 decls with external DIEs (already present abstract instances).
6578 (gen_call_site_die): Adjust.
6579 (add_high_low_attributes): Likewise.
6580 (gen_lexical_block_die): Likewise.
6581 (gen_inlined_subroutine_die): Likewie.
6582 (gen_block_die): Likewise.
6583 (dwarf2out_inline_entry): Likewise.
6584 (dwarf2out_early_finish): In LTRANS phase create DW_TAG_imported_unit
6587 2018-09-25 Martin Liska <mliska@suse.cz>
6589 * ipa-fnsummary.c (estimate_node_size_and_time): Scale by two
6590 integers and not by a float value.
6592 2018-09-25 Martin Liska <mliska@suse.cz>
6595 * dbgcnt.c (dbg_cnt_process_single_pair): Return false
6597 * dumpfile.c (dump_enable_all): Remove extra parenthesis.
6598 * gcov-tool.c: Declare the function with ATTRIBUTE_NORETURN.
6599 * godump.c (go_format_type): Remove extra parenthesis.
6601 2018-09-25 Martin Liska <mliska@suse.cz>
6603 * alias.c (set_dest_equal_p): Remove unused function.
6604 * config/i386/i386.c (def_builtin_pure2): Likewise.
6605 * diagnostic-show-locus.c (class layout): Remove
6607 (layout::layout): Likewise here.
6608 * dump-context.h (class temp_dump_context): Likewise.
6609 * dwarf2out.c (add_AT_fde_ref): Remove unused function.
6610 (add_AT_loclistsptr): Likewise.
6611 (add_AT_offset): Likewise.
6612 (get_AT_hi_pc): Likewise.
6613 (is_comdat_die): Likewise.
6614 (type_is_enum): Likewise.
6615 (ceiling): Likewise.
6616 (add_AT_vms_delta): Likewise.
6617 (is_class_die): Likewise.
6618 * edit-context.c (class line_event): Remove unused field.
6619 * graphite-sese-to-poly.c (tree_int_to_gmp): Remove
6621 * ipa-cp.c (ipa_get_vr_lat): Likewise.
6622 * lra-constraints.c (ok_for_index_p_nonstrict): Likewise.
6623 (ok_for_base_p_nonstrict): Likewise.
6624 * tree-chrec.c (is_not_constant_evolution): Likewise.
6625 (chrec_fold_poly_cst): Likewise.
6626 * tree-if-conv.c (has_pred_critical_p): Likewise.
6627 * tree-ssa-coalesce.c (print_exprs): Likewise.
6628 * tree-ssa-pre.c (bitmap_set_contains_expr): Likewise.
6629 * tree-ssa-uninit.c (is_and_or_or_p): Likewise.
6630 * tree-vrp.c (value_ranges_intersect_p): Likewise.
6631 (value_range_nonnegative_p): Likewise.
6633 2018-09-25 Martin Liska <mliska@suse.cz>
6635 * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
6636 Do not handle "GNU Pascal".
6637 * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
6639 * config/sparc/sparc.c (sparc_pass_by_reference): Remove Pascal
6640 from documentation. Likewise.
6641 * dbxout.c (dbxout_range_type): Likewise.
6642 * doc/cpp.texi: Likewise.
6643 * doc/extend.texi: Likewise.
6644 * doc/frontends.texi: Likewise.
6645 * doc/invoke.texi: Remove Pascal entry.
6646 * tree.def (CLEANUP_POINT_EXPR): Likewise.
6647 * doc/rtl.texi (MODE_FUNCTION): Remove not used entry.
6649 2018-09-25 Martin Liska <mliska@suse.cz>
6652 * doc/invoke.texi: Document all parameters and remove default
6655 2018-09-25 Ilya Leoshkevich <iii@linux.ibm.com>
6658 * rtl.c (rtx_code_size): Take into account that EQ_ATTR_ALT
6659 contains HOST_WIDE_INTs when computing its size.
6661 2018-09-24 Jim Wilson <jimw@sifive.com>
6664 * config/riscv/riscv.h (STACK_BOUNDARY): Test riscv_abi == ABI_ILP32E
6666 (ABI_STACK_BOUNDARY, MAX_ARGS_IN_REGISTERS): Likewise.
6668 2018-09-24 Andrew Pinski <apinski@marvell.com>
6670 * config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Don't
6671 access prev before checking it for NULLness in the
6672 AARCH64_FUSE_CMP_BRANCH case.
6674 2018-09-24 H.J. Lu <hongjiu.lu@intel.com>
6677 * config/i386/i386.c (rest_of_insert_endbranch): Set
6678 endbr_queued_at_entrance to true and don't insert ENDBR if
6679 x86_function_profiler will be called.
6680 (x86_function_profiler): Insert ENDBR if endbr_queued_at_entrance
6682 * config/i386/i386.h (machine_function): Add
6683 endbr_queued_at_entrance.
6685 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
6687 * genattrtab.c (mk_attr_alt): Use alternative_mask.
6688 (attr_rtx_1): Adjust caching to match the new EQ_ATTR_ALT field
6690 (check_attr_test): Use alternative_mask.
6691 (get_attr_value): Likewise.
6692 (compute_alternative_mask): Use alternative_mask and XWINT.
6693 (make_alternative_compare): Use alternative_mask.
6694 (attr_alt_subset_p): Use XWINT.
6695 (attr_alt_subset_of_compl_p): Likewise.
6696 (attr_alt_intersection): Use alternative_mask and XWINT.
6697 (attr_alt_union): Likewise.
6698 (attr_alt_complement): Use HOST_WIDE_INT and XWINT.
6699 (mk_attr_alt): Use alternative_mask and HOST_WIDE_INT.
6700 (simplify_test_exp): Use alternative_mask and XWINT.
6701 (write_test_expr): Use alternative_mask and XWINT, adjust bit
6702 number calculation to support 64 bits. Generate code that
6703 checks 64-bit masks.
6704 (main): Use alternative_mask.
6705 * rtl.def (EQ_ATTR_ALT): Change field types from ii to ww.
6707 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
6710 * config/s390/s390.c (s390_emit_epilogue): Do not use PARALLEL
6711 RETURN+USE when returning via %r14.
6713 2018-09-24 Martin Liska <mliska@suse.cz>
6715 * gcov.c (output_lines): Print colorization legend
6716 for both flag_use_colors and flag_use_hotness_colors.
6719 2018-09-24 Martin Liska <mliska@suse.cz>
6721 * coverage.c (get_coverage_counts): Use warning_at
6722 with current_function_decl location. Use %qD in warning
6725 2018-09-24 Martin Liska <mliska@suse.cz>
6727 * memory-block.h (memory_block_pool::release): Annotate with
6728 valgrind that the memory is not accessible.
6730 2018-09-24 Martin Liska <mliska@suse.cz>
6733 * asan.c: Make asan_handled_variables extern.
6735 * cfgexpand.c (expand_stack_vars): Make sure
6736 a representative is unpoison if another
6737 variable in the partition is handled by
6738 use-after-scope sanitization.
6740 2018-09-24 Richard Biener <rguenther@suse.de>
6742 PR tree-optimization/63155
6743 * tree-ssa-propagate.c (add_ssa_edge): Avoid adding PHIs to
6744 the worklist when the edge of the respective argument isn't
6747 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
6749 * config/i386/i386.h (enum reg_class): Rename MASK_REGS to
6750 ALL_MASK_REGS and MASK_EVEX_REGS to MASK_REGS.
6751 (MASK_CLASS_P): Update for rename.
6752 (MAYBE_MASK_CLASS_P): Ditto.
6753 (REG_CLASS_NAMES): Update.
6754 (REG_CLASS_CONTENT): Update.
6755 * config/i386/i386.c (regclass_map): Update for MASK_REG
6756 and ALL_MASK_REGS rename.
6757 * config/i386/constraints.md (Yk): Update for rename.
6760 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
6762 * config/i386/i386.h (enum reg_class): Remove
6763 EVEX_SSE_REGS and MOD4_SSE_REGS.
6764 (REG_CLASS_NAMES): Update.
6765 (REG_CLASS_CONTENT): Update.
6766 * config/i386/i386.c (regclass_map): Declare AVX-512 SSE
6767 registers as ALL_SSE_REGS.
6768 (ix86_additional_allocno_class_p): Remove.
6769 (TARGET_ADDITIONAL_ALLOCNO_CLASS_P): Remove.
6770 (ix86_register_priority): Lower priority of EVEX SSE registers.
6771 Use IN_RANGE macro where appropriate.
6772 (ix86_hard_regno_mode_ok): Merge AVX-5124FMAPS and
6773 AVX-5124VNNIW checks.
6774 (ix86_modes_tieable_p): Tie 512-bit SSE modes.
6775 * config/i386/sse.md (avx5124fmaddps_4fmaddps)
6776 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddps_maskz)
6777 (avx5124fmaddps_4fmaddss, avx5124fmaddps_4fmaddss_mask)
6778 (avx5124fmaddps_4fmaddss_maskz, avx5124fmaddps_4fnmaddps)
6779 (avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddps_maskz)
6780 (avx5124fmaddps_4fnmaddss, avx5124fmaddps_4fnmaddss_mask)
6781 (avx5124fmaddps_4fnmaddss_maskz, avx5124vnniw_vp4dpwssd)
6782 (avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssd_maskz)
6783 (avx5124vnniw_vp4dpwssds, avx5124vnniw_vp4dpwssds_mask)
6784 (avx5124vnniw_vp4dpwssds_maskz): Use "v" instead of "Yh" constraint.
6785 * config/i386/constraints.md (Yh): Remove.
6787 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
6789 * config/i386/i386.c (regclass_map): Declare integer REX registers
6792 2018-09-23 Gerald Pfeifer <gerald@pfeifer.com>
6794 * doc/service.texi (Service): Switch the fsf.org link to https.
6796 2018-09-22 Chung-Ju Wu <jasonwucj@gmail.com>
6799 * config/nds32/nds32.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6800 Define to speculation_safe_value_not_needed.
6802 2018-09-21 Florian Weimer <fweimer@redhat.com>
6805 * doc/extend.texi (Common Function Attributes): Mention that
6806 noreturn suppresses tail call optimization.
6808 2018-09-21 Jeff Law <law@redhat.com>
6810 * gimple-ssa-evrp.c (evrp_dom_walker::cleanup): Call
6811 vr_values::cleanup_edges_and_switches.
6812 * tree-vrp.c (to_remove_edges, to_update_switch_stmts): Moved into
6814 (identify_jump_threads): Remove EDGE_IGNORE handling.
6815 (execute_vrp): Move handling of to_remove_edges and
6816 to_update_switch_stmts into vr_values class member functions.
6817 * tree-vrp.h (switch_update, to_remove_edges): Remove declarations.
6818 (to_update_switch_stmts): Likewise.
6819 * vr-values.c: Include cfghooks.h.
6820 (vr_values::vr_values): Initialize to_remove_edges and
6821 to_update_switch_stmts.
6822 (vr_values::~vr_values): Verify to_remove_edges and
6823 to_update_switch_stmts are empty.
6824 (vr_values::simplify_switch_using_ranges): Set EDGE_IGNORE as needed.
6825 (vr_values::cleanup_edges_and_switches): New member function.
6826 * vr-values.h (vr_values): Add cleanup_edges_and_switches member
6827 function. Add new data members.
6829 2018-09-21 David Malcolm <dmalcolm@redhat.com>
6831 PR tree-optimization/87309
6832 * dumpfile.c (dump_context::begin_scope): Filter the dump_loc
6833 calls with pflags and alt_flags.
6834 (selftest::test_capture_of_dump_calls): Add test of interaction of
6835 MSG_OPTIMIZED_LOCATIONS with AUTO_DUMP_SCOPE.
6837 2018-09-21 Olivier Hainque <hainque@adacore.com>
6839 * config.gcc: Factorize and comment inclusion of vxworks-dummy.h.
6841 2018-09-21 Olivier Hainque <hainque@adacore.com>
6843 * config/vxworks.h (CLEAR_INSN_CACHE): #define to 1.
6845 2018-09-21 Olivier Hainque <hainque@adacore.com>
6847 * config/vxworks.h (VXWORKS_LIBGCC_SPEC): Remove -lc_internal.
6848 Merge block comment with the one ahead of VXWORKS_LIBS_RTP. Then:
6849 (VXWORKS_LIBS_RTP): Minor reordering.
6851 2018-09-21 Olivier Hainque <hainque@adacore.com>
6853 * config/vxworks.h (STARTFILE_PREFIX_SPEC): Define.
6854 (VXWORKS_LIBS_DIR_RTP): Remove definition and use.
6856 2018-09-21 Olivier Hainque <hainque@adacore.com>
6858 * config/vxworks.h (SIZE_TYPE): Account for TARGET_VXWORKS64.
6859 (PTRDIFF_TYPE): Likewise.
6861 2018-09-21 Olivier Hainque <hainque@adacore.com>
6863 * config.gcc: Enforce def of TARGET_VXWORKS64 to 1 from
6864 triplet, similar to support for VxWorks7.
6865 * config/vxworks-dummy.h: Provide a default definition
6866 of TARGET_VXWORKS64 to 0.
6868 2018-09-21 Olivier Hainque <hainque@adacore.com>
6870 * config/vxworks.h (TARGET_VXWORKS7): Move default definition ...
6871 * config/vxworks-dummy.h: here.
6873 2018-09-21 Olivier Hainque <hainque@adacore.com>
6875 * config.gcc: Prepend vxworks-dummy.h to tm_file for powerpc*
6877 2018-09-21 Shaokun Zhang <zhangshaokun@hisilicon.com>
6878 Bo Zhou <zbo.zhou@hisilicon.com>
6880 * config/aarch64/aarch64-cores.def (tsv110): New CPU.
6881 * config/aarch64/aarch64-tune.md: Regenerated.
6882 * doc/invoke.texi (AArch64 Options/-mtune): Add "tsv110".
6883 * config/aarch64/aarch64.c (tsv110_tunings): New tuning table.
6884 * config/aarch64/aarch64-cost-tables.h: Add "tsv110" extra costs.
6886 2018-09-21 Andrew Stubbs <ams@codesourcery.com>
6887 Julian Brown <julian@codesourcery.com>
6889 * builtins.c (get_builtin_sync_mem): Handle address spaces.
6891 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
6893 * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Return false
6894 if the call takes a static chain.
6896 2018-09-21 Martin Liska <mliska@suse.cz>
6898 * auto-profile.c (autofdo_source_profile::read): Do not
6900 (read_profile): Do not add working sets.
6901 (read_autofdo_file): Remove sum_all.
6902 (afdo_callsite_hot_enough_for_early_inline): Remove const
6904 * coverage.c (struct counts_entry): Remove gcov_summary.
6905 (read_counts_file): Read new GCOV_TAG_OBJECT_SUMMARY,
6906 do not support GCOV_TAG_PROGRAM_SUMMARY.
6907 (get_coverage_counts): Remove summary and expected
6909 * coverage.h (get_coverage_counts): Likewise.
6910 * doc/gcov-dump.texi: Remove -w option.
6911 * gcov-dump.c (dump_working_sets): Remove.
6912 (main): Do not support '-w' option.
6913 (print_usage): Likewise.
6914 (tag_summary): Likewise.
6915 * gcov-io.c (gcov_write_summary): Do not dump
6917 (gcov_read_summary): Likewise.
6918 (gcov_histo_index): Remove.
6919 (gcov_histogram_merge): Likewise.
6920 (compute_working_sets): Likewise.
6921 * gcov-io.h (GCOV_TAG_OBJECT_SUMMARY): Mark
6923 (GCOV_TAG_PROGRAM_SUMMARY): Mark it obsolete.
6924 (GCOV_TAG_SUMMARY_LENGTH): Adjust.
6925 (GCOV_HISTOGRAM_SIZE): Remove.
6926 (GCOV_HISTOGRAM_BITVECTOR_SIZE): Likewise.
6927 (struct gcov_summary): Simplify rapidly just
6928 to runs and sum_max fields.
6929 (gcov_histo_index): Remove.
6930 (NUM_GCOV_WORKING_SETS): Likewise.
6931 (compute_working_sets): Likewise.
6932 * gcov-tool.c (print_overlap_usage_message): Remove
6933 trailing empty line.
6934 * gcov.c (read_count_file): Read GCOV_TAG_OBJECT_SUMMARY.
6935 (output_lines): Remove program related line.
6936 * ipa-profile.c (ipa_profile): Do not consider GCOV histogram.
6937 * lto-cgraph.c (output_profile_summary): Do not stream GCOV
6939 (input_profile_summary): Do not read it.
6940 (merge_profile_summaries): And do not merge it.
6941 (input_symtab): Do not call removed function.
6942 * modulo-sched.c (sms_schedule): Do not print sum_max.
6943 * params.def (HOT_BB_COUNT_FRACTION): Reincarnate param that was
6944 removed when histogram method was invented.
6945 (HOT_BB_COUNT_WS_PERMILLE): Mention that it's used only in LTO
6947 * postreload-gcse.c (eliminate_partially_redundant_load): Fix
6949 * predict.c (get_hot_bb_threshold): Use HOT_BB_COUNT_FRACTION
6950 and dump selected value.
6951 * profile.c (add_working_set): Remove.
6952 (get_working_sets): Likewise.
6953 (find_working_set): Likewise.
6954 (get_exec_counts): Do not work with working sets.
6955 (read_profile_edge_counts): Do not inform as sum_max is removed.
6956 (compute_branch_probabilities): Likewise.
6957 (compute_value_histograms): Remove argument for call of
6958 get_coverage_counts.
6959 * profile.h: Do not make gcov_summary const.
6961 2018-09-21 Monk Chiang <sh.chiang04@gmail.com>
6963 * config.gcc (nds32*-*-*): Set TARGET_DEFAULT_TLSDESC_TRAMPOLINE=0.
6965 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
6967 PR tree-optimization/86990
6968 * gimple-ssa-store-merging.c (imm_store_chain_info:coalesce_immediate):
6969 Check that the entire merged store group is made of constants only for
6972 2018-09-20 Allan Sandfeld Jensen <allan.jensen@qt.io>
6974 * gcc.c (LINK_COMMAND_SPEC): Handle -r like -nostdlib.
6975 (VTABLE_VERIFICATION_SPEC): Likewise.
6976 (SANITIZER_EARLY_SPEC): Likewise.
6977 (SANITIZER_SPEC): Likewise.
6978 * config/darwin.h (LINK_COMMAND_SPEC): Likewise.
6979 * doc/invoke.texi (Link Options): Document -r.
6981 2018-09-20 Richard Biener <rguenther@suse.de>
6984 * gimplify.c (gimplify_expr): Retain alignment of
6985 addressable lvalue in dereference.
6987 2018-09-20 Alexandre Oliva <aoliva@redhat.com>
6990 * configure.ac: Check for .loc is_stmt support.
6991 * configure, config.in: Rebuilt.
6992 * dwarf2out.c (dwarf2out_source_line): Skip is_stmt
6995 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
6997 * config/rs6000/rs6000.opt (misel=no, misel=yes): Delete.
6998 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -misel=yes and
7001 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
7003 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
7005 * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete
7008 2018-09-20 Marek Polacek <polacek@redhat.com>
7010 * doc/invoke.texi: Add -Wno-init-list-lifetime to C++ Language Options.
7012 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
7014 PR tree-optimization/87288
7015 * tree-vect-loop.c (vect_analyze_loop_2): Take PEELING_FOR_GAPS
7016 into account when determining PEELING_FOR_NITERS.
7018 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
7020 PR tree-optimization/86877
7021 * tree-vect-loop.c (vect_analyze_loop_2): Call
7022 vect_verify_datarefs_alignment.
7024 2018-09-19 Marek Polacek <polacek@redhat.com>
7026 * doc/invoke.texi: Document -Wclass-conversion.
7028 2018-09-19 John David Anglin <danglin@gcc.gnu.org>
7030 * config/pa/pa.c (pa_adjust_priority): Delete.
7031 (TARGET_SCHED_ADJUST_PRIORITY): Delete define.
7033 * config/pa/pa.md (atomic_storeqi): Restore deleted expander.
7034 (atomic_storehi): Likewise.
7035 (atomic_storesi): Likewise.
7036 (atomic_loaddi): Restore compare and swap exchange loop code.
7038 2018-09-19 Segher Boessenkool <segher@kernel.crashing.org>
7040 PR rtl-optimization/86902
7041 * combine.c (try_combine): When changing the CC mode used, don't change
7042 an unrelated mode in other_insn to that new CC mode.
7044 2018-09-19 David Malcolm <dmalcolm@redhat.com>
7046 * tree-data-ref.c (runtime_alias_check_p): Use formatted printing
7047 with %T in place of calls to dump_generic_expr.
7048 (prune_runtime_alias_test_list): Likewise.
7049 (create_runtime_alias_checks): Likewise.
7050 * tree-vect-data-refs.c (vect_check_nonzero_value): Likewise.
7051 (vect_analyze_data_ref_dependence): Likewise.
7052 (vect_slp_analyze_data_ref_dependence): Likewise.
7053 (vect_record_base_alignment): Likewise. Use %G in place of call
7054 to dump_gimple_stmt.
7055 (vect_compute_data_ref_alignment): Likewise.
7056 (verify_data_ref_alignment): Likewise.
7057 (vect_find_same_alignment_drs): Likewise.
7058 (vect_analyze_group_access_1): Likewise.
7059 (vect_analyze_data_ref_accesses): Likewise.
7060 (dependence_distance_ge_vf): Likewise.
7061 (dump_lower_bound): Likewise.
7062 (vect_prune_runtime_alias_test_list): Likewise.
7063 (vect_find_stmt_data_reference): Likewise.
7064 (vect_analyze_data_refs): Likewise.
7065 (vect_create_addr_base_for_vector_ref): Likewise.
7066 (vect_create_data_ref_ptr): Likewise.
7067 * tree-vect-loop-manip.c (vect_set_loop_condition): Likewise.
7068 (vect_can_advance_ivs_p): Likewise.
7069 (vect_update_ivs_after_vectorizer): Likewise.
7070 (vect_gen_prolog_loop_niters): Likewise.
7071 (vect_prepare_for_masked_peels): Likewise.
7072 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
7073 (vect_determine_vectorization_factor): Likewise.
7074 (vect_is_simple_iv_evolution): Likewise.
7075 (vect_analyze_scalar_cycles_1): Likewise.
7076 (vect_analyze_loop_operations): Likewise.
7077 (report_vect_op): Likewise.
7078 (vect_is_slp_reduction): Likewise.
7079 (check_reduction_path): Likewise.
7080 (vect_is_simple_reduction): Likewise.
7081 (vect_create_epilog_for_reduction): Likewise.
7082 (vect_finalize_reduction:): Likewise.
7083 (vectorizable_induction): Likewise.
7084 (vect_transform_loop_stmt): Likewise.
7085 (vect_transform_loop): Likewise.
7086 (optimize_mask_stores): Likewise.
7087 * tree-vect-patterns.c (vect_pattern_detected): Likewise.
7088 (vect_split_statement): Likewise.
7089 (vect_recog_over_widening_pattern): Likewise.
7090 (vect_recog_average_pattern): Likewise.
7091 (vect_determine_min_output_precision_1): Likewise.
7092 (vect_determine_precisions_from_range): Likewise.
7093 (vect_determine_precisions_from_users): Likewise.
7094 (vect_mark_pattern_stmts): Likewise.
7095 (vect_pattern_recog_1): Likewise.
7096 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
7097 (vect_record_max_nunits): Likewise.
7098 (vect_build_slp_tree_1): Likewise.
7099 (vect_build_slp_tree_2): Likewise.
7100 (vect_print_slp_tree): Likewise.
7101 (vect_analyze_slp_instance): Likewise.
7102 (vect_detect_hybrid_slp_stmts): Likewise.
7103 (vect_detect_hybrid_slp_1): Likewise.
7104 (vect_slp_analyze_operations): Likewise.
7105 (vect_slp_analyze_bb_1): Likewise.
7106 (vect_transform_slp_perm_load): Likewise.
7107 (vect_schedule_slp_instance): Likewise.
7108 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
7109 (vect_mark_stmts_to_be_vectorized): Likewise.
7110 (vect_init_vector_1): Likewise.
7111 (vect_get_vec_def_for_operand): Likewise.
7112 (vect_finish_stmt_generation_1): Likewise.
7113 (vect_check_load_store_mask): Likewise.
7114 (vectorizable_call): Likewise.
7115 (vectorizable_conversion): Likewise.
7116 (vectorizable_operation): Likewise.
7117 (vectorizable_load): Likewise.
7118 (vect_analyze_stmt): Likewise.
7119 (vect_is_simple_use): Likewise.
7120 (vect_get_vector_types_for_stmt): Likewise.
7121 (vect_get_mask_type_for_stmt): Likewise.
7122 * tree-vectorizer.c (increase_alignment): Likewise.
7124 2018-09-19 Andrew Stubbs <ams@codesourcery.com>
7126 * doc/rtl.texi: Adjust vec_select description.
7127 * simplify-rtx.c (simplify_binary_operation_1): Allow VEC_SELECT to use
7128 non-constant selectors.
7130 2018-09-19 Matthew Malcomson <matthew.malcomson@arm.com>
7132 * config/aarch64/aarch64-protos.h
7133 (aarch64_offset_9bit_signed_unscaled_p): New declaration.
7134 * config/aarch64/aarch64.md (arches): New "rcpc8_4" attribute value.
7135 (arch_enabled): Add check for "rcpc8_4" attribute value of "arch".
7136 * config/aarch64/aarch64.h (AARCH64_FL_RCPC8_4): New bitfield.
7137 (AARCH64_FL_FOR_ARCH8_4): Include AARCH64_FL_RCPC8_4.
7138 (AARCH64_FL_PROFILE): Move index so flags are ordered.
7139 (AARCH64_ISA_RCPC8_4): New flag.
7140 * config/aarch64/aarch64.c (offset_9bit_signed_unscaled_p): Renamed
7141 to aarch64_offset_9bit_signed_unscaled_p.
7142 * config/aarch64/atomics.md (atomic_store<mode>): Allow offset
7144 * config/aarch64/constraints.md (Ust): New constraint.
7145 * config/aarch64/predicates.md.
7146 (aarch64_9bit_offset_memory_operand): New predicate.
7147 (aarch64_rcpc_memory_operand): New predicate.
7149 2018-09-19 Eric Botcazou <ebotcazou@adacore.com>
7151 PR rtl-optimization/87361
7152 * rtlanal.c (nonzero_bits1): Revert accidental change.
7154 2018-09-19 Richard Biener <rguenther@suse.de>
7156 PR tree-optimization/87349
7157 PR tree-optimization/87342
7158 * tree-ssa-sccvn.c (do_rpo_vn): Iterate max_rpo computation.
7160 2018-09-18 Marek Polacek <polacek@redhat.com>
7162 P1064R0 - Allowing Virtual Function Calls in Constant Expressions
7163 * gimple-fold.c (gimple_get_virt_method_for_vtable): Adjust assert.
7165 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
7167 * config/rs6000/rs6000.md: Remove old "Cygnus sibcall" comment.
7169 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
7171 PR rtl-optimization/86882
7172 * rtlanal.c (reg_overlap_mentioned_p): Handle CLOBBER.
7174 2018-09-18 Uros Bizjak <ubizjak@gmail.com>
7176 * config/i386/i386.md (*<code>extend<mode>xf2): Macroize insn from
7177 *<code>extendsfxf2 and *<code>extenddfxf2 using MODEF mode iterator.
7179 2018-09-18 Jonathan Wakely <jwakely@redhat.com>
7182 * doc/invoke.texi (Link Options): Fix formatting and grammar.
7184 2018-09-18 Richard Biener <rguenther@suse.de>
7187 * tree-ssa-coalesce.c (tree_int_map_hasher): Remove.
7188 (compute_samebase_partition_bases): Likewise.
7189 (coalesce_ssa_name): Always use compute_optimized_partition_bases.
7190 (gimple_can_coalesce_p): Simplify.
7192 2018-09-18 Hans-Peter Nilsson <hp@bitrange.com>
7194 Handle a library implementation of ffs calling __builtin_ffs.
7195 * config/mmix/mmix.c (TARGET_INIT_LIBFUNCS): Override with...
7196 (mmix_init_libfuncs): New function: make __builtin_ffs expand
7199 2018-09-17 David Malcolm <dmalcolm@redhat.com>
7201 * diagnostic-show-locus.c (class layout_range): Add field
7203 (layout_range::layout_range): Add "original_idx" param and use it
7204 to initialize new field.
7205 (make_range): Use 0 for original_idx.
7206 (layout::layout): Pass in index to calls to
7207 maybe_add_location_range.
7208 (layout::maybe_add_location_range): Add param "original_idx" and
7209 pass it on to layout_range.
7210 (layout::print_any_labels): Pass on range->m_original_idx to
7212 (gcc_rich_location::add_location_if_nearby): Use 0 for
7214 * gcc-rich-location.h (text_range_label::get_text): Update for new
7216 (range_label_for_type_mismatch::get_text): Likewise.
7218 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
7220 * config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.
7222 2018-09-17 David Malcolm <dmalcolm@redhat.com>
7224 * gimple-ssa-sprintf.c (fmtwarn): Update for introduction of
7225 format_string_diagnostic_t.
7226 (fmtwarn_n): Likewise.
7227 * substring-locations.c
7228 (format_string_diagnostic_t::format_string_diagnostic_t) New ctor.
7229 (format_warning_n_va): Convert to...
7230 (format_string_diagnostic_t::emit_warning_n_va): ...this.
7231 (format_warning_va): Convert to...
7232 (format_string_diagnostic_t::emit_warning_va): ...this.
7233 (format_warning_at_substring): Convert to...
7234 (format_string_diagnostic_t::emit_warning): ...this.
7235 (format_warning_at_substring_n): Convert to...
7236 (format_string_diagnostic_t::emit_warning_n): ...this.
7237 * substring-locations.h (class format_string_diagnostic_t): New
7239 (format_warning_va): Convert to
7240 format_string_diagnostic_t::emit_warning_va.
7241 (format_warning_n_va): Convert to
7242 format_string_diagnostic_t::emit_warning_n_va.
7243 (format_warning_at_substring): Convert to
7244 format_string_diagnostic_t::emit_warning.
7245 (format_warning_at_substring_n): Convert to
7246 format_string_diagnostic_t::emit_warning_n.
7248 2018-09-17 Cesar Philippidis <cesar@codesourcery.com>
7249 Bernd Schmidt <bernds_cb1@t-online.de>
7251 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with
7254 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
7256 * config/i386/i386.md (truncxf<mode>2_i387_noop_unspec): Change
7257 operand 0 predicate to nonimmediate operand.
7258 (rint<mode>2_frndint): Remove insn pattern.
7259 (rint<mode>2): Change operand 1 predicate to general_operand.
7260 Extend operand 1 to XFmode and generate rintxf2 insn.
7261 (frndintxf2_<rounding>): Rename from frndint<mode>2_<rounding>.
7262 Do not use X87MODEF mode macro.
7263 (frndintxf2_<rounding>_i387): Rename from
7264 frndint<mode>2_<rounding>_i387. Do not use X87MODEF mode macro.
7265 (<rounding_insn><mode>2): For non-SSE modes, extend operand 1
7266 to XFmode and generate significandxf3 insn.
7268 2018-09-17 Richard Biener <rguenther@suse.de>
7270 PR tree-optimization/87328
7271 * tree-ssa-sccvn.c (process_bb): Remove assertion about not
7272 visiting unexecutable backedges when not iterating.
7273 (do_rpo_vn): Mark all edges not executable even when not
7276 2018-09-17 Martin Jambor <mjambor@suse.cz>
7279 * doc/invoke.texi (Warning Options): Likewise.
7281 2018-09-17 Richard Biener <rguenther@suse.de>
7283 PR tree-optimization/87301
7284 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup): Properly
7285 clean EH info from leftover copy assignments.
7287 2018-09-17 Martin Liska <mliska@suse.cz>
7289 PR gcov-profile/85871
7290 * gcov.c (output_intermediate_file): Fix out of bounds
7293 2018-09-17 Vineet Gupta <vgupta@synopsys.com>
7295 * config/arc/arc.c: Object attributes for core4 not reflected
7297 * config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
7300 2018-09-17 Alexey Brodkin <abrodkin@synopsys.com>
7302 * config/arc/linux.h (LINK_EH_SPEC): Add missing space.
7304 2018-09-17 Martin Liska <mliska@suse.cz>
7306 * doc/gcov.texi: Document new option --use-hotness-colors.
7307 * gcov.c (struct source_info): Declare new field.
7308 (source_info::source_info): Set default for maximum_count.
7309 (print_usage): Add new -q option.
7310 (process_args): Process it.
7311 (accumulate_line_info): Save src->maximum_count.
7312 (output_line_beginning): Make color line number if
7313 flag_use_hotness_colors is set.
7314 (output_line_details): Pass default argument value.
7315 (output_lines): Pass src->maximum_count.
7317 2018-09-17 Martin Liska <mliska@suse.cz>
7319 * common/config/i386/i386-common.c (ix86_get_valid_option_values):
7320 Use processor_names table.
7321 * config/i386/i386.c (ix86_default_align): Use
7322 processor_cost_table for alignment values.
7323 (ix86_option_override_internal): Use processor_names.
7324 (ix86_function_specific_print): Likewise.
7325 * config/i386/i386.h (struct processor_costs):
7326 Add alignment values.
7327 (struct ptt): Remove and replace with const char *.
7328 * config/i386/x86-tune-costs.h (struct processor_costs):
7329 Declare default alignments for all costs.
7331 2018-09-17 Aldy Hernandez <aldyh@redhat.com>
7333 * tree-vrp.c (extract_range_from_unary_expr): Do not special case
7334 symbolics or VR_VARYING ranges for ABS_EXPR.
7335 * wide-int-range.cc (wide_int_range_abs): Return positive numbers
7336 when range will wrap.
7338 2018-09-15 Eric Botcazou <ebotcazou@adacore.com>
7341 * cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
7342 before and after a JUMP_TABLE_DATA.
7344 2018-09-14 John David Anglin <danglin@gcc.gnu.org>
7347 * dojump.c (do_compare_and_jump): Canonicalize function pointers
7348 when one operand is a function pointer. Use POINTER_TYPE_P and
7349 FUNC_OR_METHOD_TYPE_P.
7350 * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
7351 * fold-const.c (build_range_check): Likewise.
7352 * match.pd (simple_comparison): Likewise.
7354 2018-09-14 David Malcolm <dmalcolm@redhat.com>
7357 * spellcheck.c (get_edit_distance_cutoff): New function.
7358 (selftest::test_edit_distance_unit_test_oneway): Rename to...
7359 (selftest::test_get_edit_distance_one_way): ...this.
7360 (selftest::test_get_edit_distance_unit): Rename to...
7361 (selftest::test_get_edit_distance_both_ways): ...this.
7362 (selftest::test_edit_distances): Move tests to this new function,
7363 and test some more pairs of strings. Update for above renaming.
7364 (selftest::get_old_cutoff): New function.
7365 (selftest::test_get_edit_distance_cutoff): New function.
7366 (selftest::assert_suggested_for): New function.
7367 (ASSERT_SUGGESTED_FOR): New macro.
7368 (selftest::assert_not_suggested_for): New function.
7369 (ASSERT_NOT_SUGGESTED_FOR): New macro.
7370 (selftest::test_suggestions): New function.
7371 (selftest::spellcheck_c_tests): Move test_get_edit_distance_unit
7372 tests to selftest::test_edit_distances and call it. Add calls to
7373 selftest::test_get_edit_distance_cutoff and
7374 selftest::test_suggestions.
7375 * spellcheck.h (get_edit_distance_cutoff): New function declaration.
7376 (best_match::consider): Replace hard-coded cutoff calculation with
7378 (best_match::get_cutoff): New declaration.
7379 (best_match::get_best_meaningful_candidate): Likewise.
7381 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
7383 * builtins.c (fold_builtin_strlen): Remove TODO comment.
7385 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
7388 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
7390 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
7391 terminated string literal.
7393 2018-09-14 Martin Sebor <msebor@redhat.com>
7395 * builtins.c (unterminated_array): Handle ARRAY_REF.
7396 (expand_builtin_stpcpy_1): Detect unterminated char arrays.
7397 * builtins.h (unterminated_array): Declare extern.
7398 * gimple-fold.c (gimple_fold_builtin_stpcpy): Detect unterminated
7400 (gimple_fold_builtin_sprintf): Propagate NO_WARNING to transformed
7403 2018-09-14 Martin Sebor <msebor@redhat.com>
7404 Jeff Law <law@redhat.com>
7406 * builtins.c (unterminated_array): New.
7407 (expand_builtin_strcpy): Adjust.
7408 (expand_builtin_strcpy_args): Detect unterminated arrays.
7409 * gimple-fold.c (get_maxval_strlen): Add argument. Detect
7410 unterminated arrays.
7411 * gimple-fold.h (get_maxval_strlen): Add argument.
7412 (gimple_fold_builtin_strcpy): Detec unterminated arrays.
7414 * gimple-fold.c (get_range_strlen): Add argument.
7415 (get_maxval_strlen): Adjust.
7416 * gimple-fold.h (get_range_strlen): Add argument.
7418 2018-09-14 Wei Xiao <wei3.xiao@intel.com>
7420 * config/i386/movdirintrin.h: Fix copyright year.
7422 2018-09-14 Uros Bizjak <ubizjak@gmail.com>
7424 * reg-stack.c: Include regs.h.
7425 (replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
7426 (emit_pop_insn): Default pop insn mode to the reg_raw_mode of
7427 FIRST_STACK_REG, not DFmode.
7428 (emit_swap_insn): Default swap insn mode to the reg_raw_mode of
7429 FIRST_STACK_REG, not XFmode. Explicitly construct swap RTX.
7430 (change stack): Default register mode to the reg_raw_mode of
7431 FIRST_STACK_REG, not DFmode.
7432 * config/i386/i386.md (*swap<mode>): Remove insn pattern.
7433 (*swapxf): Rename from swapxf.
7435 2018-09-14 Carl Love <cel@us.ibm.com>
7437 * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
7438 * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
7440 2018-09-14 Segher Boessenkool <segher@kernel.crashing.org>
7443 * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
7446 2018-09-14 Sam Tebbs <sam.tebbs@arm.com>
7449 * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Define.
7451 2018-09-14 Jason Merrill <jason@redhat.com>
7453 Fix --enable-gather-detailed-mem-stats.
7454 * hash-table.c (hash_table_usage): Change from variable to function.
7455 * hash-table.h: Adjust.
7456 * Makefile.in: Add missing dependencies on hash-table.h.
7458 2018-09-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7460 PR tree-optimization/87259
7462 (pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
7463 execute_cse_reciprocals_1 has tried transforming.
7465 2018-09-14 Aldy Hernandez <aldyh@redhat.com>
7467 * tree-vrp.c (extract_range_from_binary_expr_1): Normalize
7468 VR_VARYING for PLUS/MINUS_EXPR.
7470 2018-09-14 Ilya Leoshkevich <iii@linux.ibm.com>
7472 * config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
7475 2018-09-14 Richard Biener <rguenther@suse.de>
7478 * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
7479 bits for the merged partition.
7481 2018-09-13 Martin Sebor <msebor@redhat.com>
7482 Bernd Edlinger <bernd.edlinger@hotmail.de>
7484 * builtins.h (c_srlen): Add argument.
7485 * builtins.c (warn_string_no_nul): New function.
7486 (c_strlen): Add argument and use it. Update recursive calls.
7487 Pass DECL argument to string_constant to get info on non
7488 terminated strings. Update *NONSTR as needed.
7489 (fold_builtin_strlen): Add argument to calls to c_strlen.
7490 Warn for unterminated arrays.
7491 (warn_string_no_null): Add prototype.
7492 * expr.c (string_constant): Update arguments. Update recursive
7493 calls appropriately. Detect missing NUL terminator and outermost
7494 declaration its missing in.
7495 Improve checks for arrays with nonzero lower bound or elements
7496 that are not a single byte. Simplify offset computation.
7497 Simplify checks for non-NUL terminated strings.
7498 * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
7499 * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
7501 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
7503 * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
7505 * fold-const.c (c_getstr): Fix function comment. Remove unused third
7506 argument. Fix range checks.
7507 * fold-const.h (c_getstr): Adjust protoype.
7508 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
7509 string is constant but contains no NUL byte.
7511 * expr.c (string_constant): Adjust function comment.
7512 Remove bogus check for zero termination.
7514 * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
7516 * varasm.c (compare_constant): Compare type size of STRING_CSTs.
7517 (get_constant_size): Don't make STRING_CSTs larger than they are.
7518 (check_string_literal): New check function for STRING_CSTs.
7519 (output_constant): Use it.
7521 2018-09-13 Eric Botcazou <ebotcazou@adacore.com>
7524 * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
7526 2018-09-13 Richard Biener <rguenther@suse.de>
7528 PR tree-optimization/87263
7529 * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
7530 (struct unwind_state): Add max_rpo field.
7531 (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
7532 Compute max_rpo, the max RPO number a block can be backwards reached
7533 from. Re-write non-iterating mode to a RPO ordered worklist approach,
7534 separating it from the iterating mode.
7536 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
7538 * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
7539 (rfs_decision): New scheduling decision.
7541 2018-09-13 Richard Biener <rguenther@suse.de>
7544 * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
7545 (vn_nary_op_insert_pieces_predicated): Do not write useless
7546 valid_dominated_by_p entry outside of the allocated storage.
7548 2018-09-13 Omar Sandoval <osandov@osandov.com>
7549 Tom de Vries <tdevries@suse.de>
7552 * dwarf2out.c (is_c): New function.
7553 (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
7555 2018-09-13 Sam Tebbs <sam.tebbs@arm.com>
7558 * config/aarch64/aarch64.md (*aarch64_bfxil):
7560 * config/aarch64/constraints.md (Ulc): Define.
7561 * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
7563 * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
7566 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
7568 * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
7569 * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
7570 aarch64_layout_frame call.
7571 (aarch64_expand_epilogue): Likewise.
7572 (aarch64_initial_elimination_offset): Likewise.
7573 (aarch64_get_separate_components): Likewise.
7574 (aarch64_use_return_insn_p): Likewise.
7575 (aarch64_layout_frame): Remove unneeded check.
7577 2018-09-13 Jakub Jelinek <jakub@redhat.com>
7579 * configure.ac: Only append
7580 " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
7581 gcc_config_arguments if it was never reconfigured or last reconfigure
7582 was with different arguments.
7583 * configure: Regenerated.
7585 2018-09-13 Jakub Jelinek <jakub@redhat.com>
7586 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7589 * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
7590 (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
7592 2018-09-13 Jakub Jelinek <jakub@redhat.com>
7594 PR tree-optimization/87287
7595 * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
7596 X % C == 0 to X % (unsigned) C == 0 optimization to ...
7597 * match.pd (X % C == 0): ... here. New optimization.
7599 2018-09-12 Jakub Jelinek <jakub@redhat.com>
7602 * expr.h (maybe_optimize_mod_cmp): Declare.
7603 * expr.c (mod_inv): New function.
7604 (maybe_optimize_mod_cmp): New function.
7605 (do_store_flag): Use it.
7606 * cfgexpand.c (expand_gimple_cond): Likewise.
7608 2018-09-09 Cesar Philippidis <cesar@codesourcery.com>
7609 Julian Brown <julian@codesourcery.com>
7612 * gimplify.c (gimplify_scan_omp_clauses): Set
7613 target_firstprivatize_array_bases in OpenACC parallel and kernels
7614 region contexts. Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
7615 OpenACC data regions.
7617 2018-09-12 Uros Bizjak <ubizjak@gmail.com>
7619 * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
7620 (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
7622 2018-09-12 Richard Biener <rguenther@suse.de>
7624 PR tree-optimization/87280
7625 * tree-ssa-sccvn.c (process_bb): Handle the case of executable
7626 edge but unreachable target.
7627 (do_rpo_vn): For conservatively handling a PHI only mark
7628 the backedge executable but not the block reachable.
7630 2018-09-12 Richard Biener <rguenther@suse.de>
7632 PR tree-optimization/87266
7633 * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
7636 2018-09-12 Andreas Krebbel <krebbel@linux.ibm.com>
7638 * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
7640 ("trunc<BFP:mode><DFP_ALL:mode>2")
7641 ("trunc<DFP_ALL:mode><BFP:mode>2")
7642 ("extend<BFP:mode><DFP_ALL:mode>2")
7643 ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
7644 according to the target operand type.
7646 2018-09-12 Jakub Jelinek <jakub@redhat.com>
7647 Andreas Krebbel <krebbel@linux.ibm.com>
7649 PR tree-optimization/86844
7650 * gimple-ssa-store-merging.c
7651 (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
7652 there are any overlapping stores in between them, make sure they are
7653 also coalesced or we give up completely.
7655 2018-09-12 Jakub Jelinek <jakub@redhat.com>
7658 * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
7659 BIT_AND_EXPR's second operand is a power of two. Formatting fix.
7661 2018-09-12 Tom de Vries <tdevries@suse.de>
7663 * common.opt (gdescribe-dies): Add option.
7664 * dwarf2out.c (add_name_and_src_coords_attributes): Add description
7665 attribute for artifical and nameless decls.
7666 (dwarf2out_register_external_die): Add description attribute to
7667 external reference die.
7668 (add_desc_attribute): New functions.
7669 (gen_subprogram_die): Add description attribute to
7670 DW_TAG_call_site_parameter.
7671 * tree-pretty-print.c (print_generic_expr_to_str): New function.
7672 * tree-pretty-print.h (print_generic_expr_to_str): Declare.
7673 * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
7675 (@item -gdescribe-dies): Add.
7677 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
7679 * tree-vrp.c (vrp_shift_undefined_p): Remove.
7680 (extract_range_from_binary_expr_1: Call
7681 wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
7682 * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
7685 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
7687 * gimple-ssa-warn-alloca.c
7688 (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
7689 field for ALLOCA_BOUND_*_LARGE.
7691 2018-09-11 Nathan Sidwell <nathan@acm.org>
7693 * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
7695 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
7697 * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
7698 for clobbers. Remove obsolete comment.
7700 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
7702 * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
7703 mpxchk, mpxld and mpxst types.
7704 (define_attr length_immediate): Remove all processing of mpx types.
7705 (define_attr prefix_0f): Ditto.
7706 (define_attr memory): Ditto.
7708 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
7710 * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
7711 (log<mode>2): Change operand 1 predicate to general_operand.
7712 Extend operand 1 to XFmode and generate logxf3 insn.
7713 (log10<mode>2): Change operand 1 predicate to general_operand.
7714 Extend operand 1 to XFmode and generate log10xf3 insn.
7715 (log2<mode>2): Change operand 1 predicate to general_operand.
7716 Extend operand 1 to XFmode and generate log2xf3 insn.
7717 (fyl2xp1_extend<mode>xf3_i387): Remove.
7718 (log1p<mode>2): Change operand 1 predicate to general_operand.
7719 Extend operand 1 to XFmode and generate log1pxf3 insn.
7720 (fxtract_extend<mode>xf3_i387): Remove.
7721 (logb<mode>2): Change operand 1 predicate to general_operand.
7722 Extend operand 1 to XFmode and generate logbxf3 insn.
7723 (ilogb<mode>2): Change operand 1 predicate to general_operand.
7724 Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
7725 (significand<mode>2): Change operand 1 predicate to general_operand.
7726 Extend operand 1 to XFmode and generate significandxf3 insn.
7728 2018-09-11 Nathan Sidwell <nathan@acm.org>
7730 * gcc.c (perror_with_name, pfatal_with_name): Delete.
7731 (load_specs): Use fatal_error.
7732 (DELETE_IF_ORDINARY, process_command): Use error.
7733 (execute, run_attempt): Use fatal_error.
7735 2018-09-11 Andrew Stubbs <ams@codesourcery.com>
7737 * diagnostic-core.h (sorry_at): New prototype.
7738 * diagnostic.c (sorry_at): New function.
7740 2018-09-11 Aldy Hernandez <aldyh@redhat.com>
7742 * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
7743 by zero as VR_UNDEFINED.
7745 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
7747 * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
7748 (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
7749 (<sincos>mode2): New expander.
7750 (sincos_extend<mode>xf3_i387): Remove insn pattern.
7751 (sincos -> sin, cos splitters): Remove splitter patterns.
7752 (sincos<mode>3): Change operand 2 predicate to general_operand.
7753 Extend operand 2 to XFmode and generate sincosxf3 insn.
7754 (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
7755 Change operand 3 predicate to const1_operand.
7756 (fptan_extend<mode>xf4_i387): Remove insn pattern.
7757 (tanxf2): Update operands in the call to fptanxf4_i387.
7758 (tan<mode>2): Change operand 1 predicate to general_operand.
7759 Extend operand 1 to XFmode and generate tanxf3 insn.
7760 (atan2xf3): Rename from *fpatanxf3_i387.
7761 (fpatan_extend<mode>xf3_i387): Remove insn pattern.
7762 (atan2xf3): Remove expander.
7763 (atan2<mode<3): Change operand 1 and 2 predicates to general_operand.
7764 Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
7765 (atan<mode>2): Change operand 1 predicate to general_operand.
7766 Extend operand 1 to XFmode and generate atanxf3 insn.
7768 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
7770 * config/i386/i386.md (x87/SSE constant load splitter): Use
7771 memory_operand instead of nonimmediate_operand for input operand
7774 2018-09-09 Uros Bizjak <ubizjak@gmail.com>
7776 * config/i386/i386.md (float partial SSE register stall splitter): Move
7777 splitter near its instruction pattern.
7778 (float_extend partial SSE register stall splitter): Ditto.
7779 (float_truncate partial SSE register stall splitter): Ditto.
7781 2018-09-09 Hans-Peter Nilsson <hp@bitrange.com>
7784 * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
7785 to speculation_safe_value_not_needed.
7788 * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
7789 non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
7790 (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
7791 leaf_function_p, instead use has_hard_reg_initial_val.
7793 2018-09-09 Nathan Sidwell <nathan@acm.org>
7795 * gcc.h (pfatal_with_name): Don't declare here.
7796 * gcc.c (pfatal_with_name): Make static.
7798 2018-09-09 Xianmiao Qu <xianmiao_qu@c-sky.com>
7800 * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
7803 2018-09-08 John David Anglin <danglin@gcc.gnu.org>
7805 PR rtl-optimization/85458
7806 * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
7807 priority hook to reduce the priority of EXPR.
7809 2018-09-07 Uros Bizjak <ubizjak@gmail.com>
7811 * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
7812 DImode for x87 on 32bit targets. Conditionally disable x87 modes
7813 with X87_ENABLE_FLOAT. Remove preparation code.
7814 (*float<SWI48:mode><MODEF:mode>2): Rename from
7815 *float<SWI48:mode><MODEF:mode>2_mixed. Handle x87, SSE and mixed
7816 math using "enabled" attribute.
7817 (*floatdi<MODEF:mode>2_i387): Rename from
7818 *float<SWI48x:mode><MODEF:mode>2_i387. Handle only DImode and
7819 enable for 32bit targets only.
7820 (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
7822 (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
7823 as operand 1 predicate. Rewrite as define_insn_and_split.
7824 (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
7826 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
7828 * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
7829 to fallthru to FLOAT case.
7831 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
7834 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
7835 around folding of vec_sl to handle out of range shift values.
7837 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
7839 * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
7840 Update callers to gen_fix_trunc<mode>_i387_fisttp
7841 (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
7842 nonimmediate_operand.
7843 (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
7844 and corresponding splitters.
7845 (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
7846 (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
7847 (fix_truncdi_i387_with_temp): Remove insn pattern
7848 and corresponding splitters.
7849 (fix_trunc<mode>_i387): Change operand 0 predicate to
7850 nonimmediate_operand.
7851 (fix_trunc<mode>_i387_with_temp): Remove insn pattern
7852 and corresponding splitters.
7853 (*fistdi2_1): Remove.
7855 (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
7856 (lrintxfdi2): Remove expander. Reimplement as define_insn.
7857 (*fist<mode>2_1): Remove.
7858 (fist<mode>2): Ditto.
7859 (fist<mode>2_with_temp): Remove insn pattern and corresponding
7861 (lrintxf<mode>2): Remove expander. Reimplement as define_insn.
7862 (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
7863 (fistdi2_<rounding>): Change operand 0 predicate to
7864 nonimmediate_operand.
7865 (fistdi2_<rounding>_with_temp): Remove insn pattern
7866 and corresponding splitters.
7867 (fist<mode>2_<rounding>): Change operand 0 predicate to
7868 nonimmediate_operand.
7869 (fist<mode>2_<rounding>_with_temp): Remove insn pattern
7870 and corresponding splitters.
7872 (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
7874 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
7876 * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
7879 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
7881 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
7882 early gimple folding of vec_splat().
7883 * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
7884 * gimple-fold.h: Add an extern define for tree_vec_extract().
7886 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
7888 * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
7889 wrappers around TREE_TYPE comparisons.
7891 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
7894 * config/s390/predicates.md: Add nonsym_memory_operand.
7895 * config/s390/s390.c (s390_legitimize_cs_operand): If operand
7896 contains a SYMBOL_REF, load it into an intermediate pseudo.
7897 (s390_emit_compare_and_swap): Legitimize operand.
7898 * config/s390/s390.md: Use the new nonsym_memory_operand
7899 with UNSPECV_CAS patterns.
7901 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
7904 * config/s390/s390-passes.def: New file.
7905 * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
7907 (make_pass_s390_early_mach): Add declaration.
7908 * config/s390/s390.c (make_pass_s390_early_mach):
7909 (s390_option_override): Remove dynamic registration.
7910 * config/s390/t-s390: Add s390-passes.def.
7912 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
7914 * config/s390/s390.c (s390_decompose_constant_pool_ref):
7915 Remove UNSPEC_LTREL_BASE check.
7916 (annotate_constant_pool_refs): Likewise.
7917 (find_constant_pool_ref): Likewise.
7918 (find_ltrel_base): Removed.
7919 (replace_ltrel_base): Removed.
7920 (s390_mainpool_finish): Remove replace_ltrel_base call.
7921 (s390_chunkify_start): Remove pending LTREL_BASE logic.
7922 (s390_chunkify_finish): Remove replace_ltrel_base call.
7923 * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
7925 2018-09-06 Hans-Peter Nilsson <hp@axis.com>
7928 * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
7929 to speculation_safe_value_not_needed.
7931 2018-09-05 Cesar Philippidis <cesar@codesourcery.com>
7932 Bernd Schmidt <bernds_cb1@t-online.de>
7934 * config/nvptx/nvptx-opts.h: New file.
7935 * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
7936 * config/nvptx/nvptx.h: Include "nvptx-opts.h".
7938 (TARGET_SM35): New macro.
7939 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
7941 * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
7943 (misa=): New option.
7944 * doc/invoke.texi (Nvidia PTX Options): Document -misa.
7946 2018-09-05 Uros Bizjak <ubizjak@gmail.com>
7948 * config/i386/i386.md (truncdfsf2): Remove expander.
7949 (truncdfsf2_with_temp): Ditto.
7950 (truncxf<mode>2): Ditto.
7951 (*truncdfsf_fast_mixed): Remove insn pattern.
7952 (*truncdfsf_fast_i387): Ditto.
7953 (*truncdfsf_mixed): Ditto.
7954 (*truncdfsf_i387): Ditto.
7955 (*truncdfsf2_i387_1): Ditto.
7956 (*truncxfsf2_mixed): Ditto.
7957 (*truncxfdf2_mixed): Ditto.
7958 (*truncxf<mode>2_i387_noop): Ditto. Update callers
7959 to call gen_truncxf<mode>2 instead.
7960 (*truncxf<mode>2_i387): Remove.
7961 (reg->reg splitters): Remove splitter pattern.
7962 (reg->mem splitters): Ditto.
7964 (truncdfsf2): New insn pattern.
7965 (truncxf<mode>2): Ditto.
7967 2018-09-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7969 * tree-ssa-math-opts.c (is_mult_by): New function.
7970 (is_square_of): Use the above.
7971 (optimize_recip_sqrt): New function.
7972 (pass_cse_reciprocals::execute): Use the above.
7974 2018-09-05 Richard Biener <rguenther@suse.de>
7977 * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
7978 to zero-init the emplaced vec.
7980 2018-09-05 Martin Liska <mliska@suse.cz>
7982 PR tree-optimization/87205
7983 * tree-switch-conversion.c (pass_lower_switch::execute):
7984 Group cases for switch statements.
7986 2018-09-05 Richard Biener <rguenther@suse.de>
7988 PR tree-optimization/87217
7989 * tree-ssa-sccvn.c (vuse_valueize): New.
7990 (vn_reference_lookup_pieces): Use it.
7991 (vn_reference_lookup): Likewise.
7993 2018-09-05 Nathan Sidwell <nathan@acm.org>
7996 * stor-layout.c (place_field): Scan forwards to check last
7997 bitfield when ms_bitfield_placement is in effect.
7999 2018-09-05 Richard Biener <rguenther@suse.de>
8002 * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
8005 2018-09-05 Siddhesh Poyarekar <siddhesh@sourceware.org>
8006 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
8008 * config/aarch64/falkor-tag-collision-avoidance.c: New file.
8009 * config.gcc (extra_objs): Build it.
8010 * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
8012 * config/aarch64/aarch64-passes.def
8013 (pass_tag_collision_avoidance): New pass.
8014 * config/aarch64/aarch64.c (qdf24xx_tunings): Add
8015 AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
8016 (aarch64_classify_address): Remove static qualifier.
8017 (aarch64_address_info, aarch64_address_type): Move to...
8018 * config/aarch64/aarch64-protos.h: ... here.
8019 (make_pass_tag_collision_avoidance): New function.
8020 * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
8023 2018-09-05 Martin Liska <mliska@suse.cz>
8025 * doc/gcov.texi: Update documentation of humar
8027 * gcov.c (format_count): Print one decimal place, it provides
8028 more fine number of situations like '1G' vs. '1.4G'.
8030 2018-09-05 Martin Liska <mliska@suse.cz>
8033 * config/rs6000/rs6000.opt: Mark the option as Deprecated.
8034 * optc-gen.awk: Allow 'Var' for Deprecated options in order
8035 to generate a MASK value.
8037 2018-09-04 H.J. Lu <hongjiu.lu@intel.com>
8040 * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
8041 if frame pointer isn't used.
8042 (compute_frame_pointer_to_fb_displacement): Likewise.
8044 2018-09-04 Jakub Jelinek <jakub@redhat.com>
8047 * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
8048 OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
8049 OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
8050 (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
8051 and OPTION_MASK_ISA_XSAVEC_UNSET.
8053 2018-09-04 Max Filippov <jcmvbkbc@gmail.com>
8055 * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
8056 XOR operations in NAND case.
8058 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
8060 * wide-int-range.cc (wide_int_range_convert): New.
8061 * wide-int-range.h (wide_int_range_convert): New.
8062 * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
8063 code into wide_int_range_convert.
8064 (extract_range_into_wide_ints): Do not munge anti range constants
8065 into the entire domain. Just return the range back.
8067 2018-09-04 Martin Liska <mliska@suse.cz>
8069 * genmatch.c (output_line_directive): Add new argument
8071 (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
8073 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
8075 * doc/invoke.texi (Option Summary): Add whitespace.
8077 * doc/invoke.texi (Option Summary): Add -Waligned-new.
8079 2018-09-04 Richard Biener <rguenther@suse.de>
8081 PR tree-optimization/87211
8082 * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
8083 backedge value we're supposed to treat as VARYING also number
8084 the PHI to VARYING in case it got a different value-number already.
8086 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
8088 * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
8089 (extract_range_from_binary_expr_1): Do not call
8090 vrp_can_optimize_bit_op.
8091 * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
8093 (wide_int_range_get_mask_and_bounds): New.
8094 (wide_int_range_optimize_bit_op): New.
8095 (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
8096 (wide_int_range_bit_and): Same.
8097 * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
8098 (wide_int_range_optimize_bit_op): New.
8099 (wide_int_range_get_mask_and_bounds): New.
8101 2018-09-04 Richard Biener <rguenther@suse.de>
8103 PR tree-optimization/87176
8104 * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
8105 variable. When value-numbering a virtual PHI node make sure
8106 to not value-number to the backedge value.
8108 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
8110 * doc/extend.texi (Long Long, Hex Floats): Document support for
8111 long long and hex floats in more recent versions of ISO C++.
8113 2018-09-03 Richard Biener <rguenther@suse.de>
8115 PR tree-optimization/87177
8116 * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
8119 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
8121 * bb-reorder.c (edge_order): Convert to C-qsort-style
8122 tri-state comparator.
8123 (reorder_basic_blocks_simple): Change std::stable_sort to
8126 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
8128 * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
8129 tri-state comparator.
8130 (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
8132 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
8134 * sort.cc (struct sort_ctx): New field 'nlim'. Use it...
8135 (mergesort): ... here as maximum count for using netsort.
8136 (gcc_qsort): Set nlim to 3 if stable sort is requested.
8137 (gcc_stablesort): New.
8138 * system.h (gcc_stablesort): Declare.
8140 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
8142 * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
8143 * system.h (qsort): Always redirect to gcc_qsort. Update comment.
8144 * vec.c (qsort_chk): Do not call gcc_qsort. Update comment.
8146 2018-09-03 Segher Boessenkool <segher@kernel.crashing.org>
8148 * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
8149 lxsdx and stxsdx alternatives.
8150 (*mov<mode>_hardfloat64): Ditto.
8151 * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
8153 2018-09-03 Richard Biener <rguenther@suse.de>
8155 PR tree-optimization/87200
8156 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
8159 2018-09-03 Martin Liska <mliska@suse.cz>
8161 PR tree-optimization/87201
8162 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
8163 Fix parenthesis in an expression.
8165 2018-09-03 Richard Biener <rguenther@suse.de>
8167 PR tree-optimization/87197
8168 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
8169 visited. CSE the VN_INFO hashtable lookup.
8171 PR tree-optimization/87169
8172 * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
8173 iterating make sure there's no extra backedges from irreducible
8174 regions feeding the header. Mark the destination block
8177 2018-09-03 Martin Liska <mliska@suse.cz>
8180 * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
8181 * common/common-targhooks.c (default_get_valid_option_values):
8183 * common/common-targhooks.h (default_get_valid_option_values):
8185 * common/config/i386/i386-common.c: Move processor_target_table
8187 (ix86_get_valid_option_values): New function.
8188 (TARGET_GET_VALID_OPTION_VALUES): New macro.
8189 * config/i386/i386.c (struct ptt): Move to i386-common.c.
8190 (PTA_*): Move all defined masks into i386-common.c.
8191 (ix86_function_specific_restore): Use new processor_cost_table.
8192 * config/i386/i386.h (struct ptt): Moved from i386.c.
8193 (struct pta): Likewise.
8194 * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
8195 * doc/tm.texi.in: Likewise.
8196 * opt-suggestions.c (option_proposer::suggest_option):
8197 Pass prefix to build_option_suggestions.
8198 (option_proposer::get_completions): Likewise.
8199 (option_proposer::build_option_suggestions): Use the new target
8201 * opts.c (struct option_help_tuple): New struct.
8202 (print_filtered_help): Use the new target hook.
8204 2018-09-03 Martin Liska <mliska@suse.cz>
8207 * predict.c (set_even_probabilities): Add likely_edges
8208 argument and handle cases where we have precisely one
8210 (combine_predictions_for_bb): Catch also likely_edges.
8211 (tree_predict_by_opcode): Handle gswitch statements.
8212 * tree-cfg.h (find_case_label_for_value): New declaration.
8213 (find_taken_edge_switch_expr): Likewise.
8214 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
8215 Find pivot in decision tree based on probabily, not by number of
8218 2018-09-02 Gerald Pfeifer <gerald@pfeifer.com>
8220 * doc/standards.texi (Standards): Update Objective-C reference.
8222 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
8224 * doc/install.texi (Prerequisites): Update link for MPC.
8226 2018-09-01 Michael Matz <matz@suse.de>
8228 PR tree-optimization/87074
8229 * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
8230 PHIs for outer-loop uses.
8232 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
8234 * doc/generic.texi (OpenMP): Adjust link to openmp.org.
8235 * doc/invoke.texi (C Dialect Options): Ditto.
8237 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
8239 * doc/install.texi (Prerequisites): Adjust link mpfr.org.
8241 2018-08-31 Richard Biener <rguenther@suse.de>
8243 PR tree-optimization/87168
8244 * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
8245 (rpo_elim::eliminate_avail): When OP was not visited it must
8248 2018-08-31 David Malcolm <dmalcolm@redhat.com>
8250 * tree-vrp.c (copy_value_range): Convert param "from" from
8251 "value_range *" to "const value_range *".
8252 (range_is_null): Likewise for param "vr".
8253 (range_int_cst_p): Likewise.
8254 (range_int_cst_singleton_p): Likewise.
8255 (symbolic_range_p): Likewise.
8256 (value_ranges_intersect_p): Likewise for both params.
8257 (value_range_nonnegative_p): Likewise for param "vr".
8258 (value_range_constant_singleton): Likewise.
8259 (vrp_set_zero_nonzero_bits): Likewise for param "ar".
8260 (extract_range_into_wide_ints): Likewise for param "vr".
8261 (extract_range_from_multiplicative_op): Likewise for params "vr0"
8263 (vrp_can_optimize_bit_op): Likewise.
8264 (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
8266 (extract_range_from_unary_expr): Likewise.
8267 (debug_value_range): Likewise for param "vr".
8268 (value_range::dump): Add "const" qualifier.
8269 (vrp_prop::check_array_ref): Convert local "vr" from
8270 "value_range *" to "const value_range *".
8271 (vrp_prop::check_mem_ref): Likewise.
8272 (vrp_prop::visit_stmt): Likewise for local "old_vr".
8273 (vrp_intersect_ranges_1): Likewise for param "vr_1".
8274 (vrp_intersect_ranges): Likewise.
8275 (simplify_stmt_for_jump_threading): Likewise for local "vr".
8276 (vrp_prop::vrp_finalize): Likewise.
8277 * tree-vrp.h (value_range::dump): Add "const" qualifier.
8278 (vrp_intersect_ranges): Add "const" qualifier to params as above.
8279 (extract_range_from_unary_expr): Likewise.
8280 (value_range_constant_singleton): Likewise.
8281 (symbolic_range_p): Likewise.
8282 (copy_value_range): Likewise.
8283 (extract_range_from_binary_expr_1): Likewise.
8284 (range_int_cst_p): Likewise.
8285 (vrp_set_zero_nonzero_bits): Likewise.
8286 (range_int_cst_singleton_p): Likewise.
8288 2018-08-31 Vlad Lazar <vlad.lazar@arm.com>
8290 * config/aarch64/arm_neon.h (vabsd_s64): New.
8291 (vnegd_s64): Likewise.
8293 2018-08-31 Martin Jambor <mjambor@suse.cz>
8295 * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
8297 2018-08-31 Martin Liska <mliska@suse.cz>
8299 * ipa-icf.c (sem_item::add_type): Use
8300 sem_item::m_type_hash_cache.
8301 * ipa-icf.h: Move the cache from sem_item_optimizer
8304 2018-08-31 Nathan Sidwell <nathan@acm.org>
8306 * doc/extend.texi (Backwards Compatibility): Remove implicit
8307 extern C leeway of () being (...).
8309 2018-08-31 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8311 * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
8313 2018-08-31 Segher Boessenkool <segher@kernel.crashing.org>
8317 * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
8319 2018-08-31 Jakub Jelinek <jakub@redhat.com>
8322 * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
8323 gen_int_mode. Formatting fixes.
8325 2018-08-30 Sandra Loosemore <sandra@codesourcery.com>
8327 * target.def (custom_function_descriptors): Improve documentation.
8328 * doc/tm.texi.in (Trampolines): Expand discussion of function
8329 descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
8330 beginning of the section.
8331 * doc/tm.texi: Regenerated.
8333 2018-08-30 Jose E. Marchesi <jose.marchesi@oracle.com>
8335 * cfg.h (class auto_edge_flag): Spell out the template-id of the
8336 base class in the initializer list. This is a workaround for
8337 building with older GCC.
8338 (class auto_bb_flag): Likewise.
8340 2018-08-30 Aaron Sawdey <acsawdey@linux.ibm.com>
8342 * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
8343 (altivec_vcmpequ<VI_char>_p): Remove star.
8344 * config/rs6000/rs6000-string.c (do_load_for_compare): Support
8346 (expand_strncmp_vec_sequence): New function.
8347 (emit_final_str_compare_vec): New function.
8348 (expand_strn_compare): Add support for vector strncmp.
8349 * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
8350 length specification to bytes.
8351 * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
8352 (vcmpnezb_p): New pattern.
8353 * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
8354 for option -mstring-compare-inline-limit.
8356 2018-08-30 Thiago Macieira <thiago.macieira@intel.com>
8358 * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
8359 (PTA_SKYLAKE): Add PTA_AES.
8360 (PTA_GOLDMONT): Likewise.
8362 2018-08-29 Jan Hubicka <jh@suse.cz>
8365 * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
8366 * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
8368 2018-08-29 Jan Hubicka <jh@suse.cz>
8370 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
8372 (hash_tree): Do not visit TYPE_STUB_DECL.
8373 * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
8374 stream TYPE_STUB_DECL.
8375 * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
8376 * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
8377 after free_lang_data.
8378 (type_in_anonymous_namespace_p): Likewise.
8380 2018-08-29 Jan Hubicka <jh@suse.cz>
8382 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
8383 comment that it has to be even number.
8384 (class sreal): Change m_sig type to int32_t.
8385 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
8386 int64_t for temporary calculations.
8387 (sreal_verify_basics): Drop one bit from minimum and maximum.
8389 2018-08-30 Richard Biener <rguenther@suse.de>
8391 PR tree-optimization/87147
8392 * tree-ssa-sccvn.c (SSA_VISITED): New function.
8393 (visit_phi): When the degenerate result is from the backedge and
8394 we didn't visit its definition yet drop to VARYING.
8395 (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
8397 2018-08-29 Jan Hubicka <jh@suse.cz>
8399 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
8401 (hash_tree): Likewise.
8403 2018-08-29 Jan Hubicka <jh@suse.cz>
8405 * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
8406 and TYPE_NEXT_REF_TO.
8408 2018-08-29 Jan Hubicka <jh@suse.cz>
8410 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
8411 comment that it has to be even number.
8412 (class sreal): Change m_sig type to int32_t.
8413 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
8414 int64_t for temporary calculations.
8415 (sreal_verify_basics): Drop one bit from minimum and maximum.
8417 2018-08-30 Tamar Christina <tamar.christina@arm.com>
8419 * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
8421 2018-08-30 Vlad Lazar <vlad.lazar@arm.com>
8424 * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
8425 if to_add is negative.
8427 2018-08-29 Bernd Edlinger <bernd.edlinger@hotmail.de>
8430 * builtins.c (c_strlen): Improve range checks.
8432 2018-08-29 Martin Sebor <msebor@redhat.com>
8433 Jeff Law <law@redhat.com>
8435 PR tree-optimization/86714
8436 PR tree-optimization/86711
8437 * builtins.c (c_strlen): Add arguments to call to string_constant.
8438 * expr.c (string_constant): Add argument. Detect missing nul
8439 terminator and outermost declaration it's missing in.
8440 * expr.h (string_constant): Add argument.
8441 * fold-const.c (read_from_constant_string): Add arguments to call to
8443 (c_getstr): Likewise.
8444 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
8446 * tree-ssa-strlen.c (get_stridx): Likewise.
8448 2018-08-29 Jan Hubicka <jh@suse.cz>
8450 * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
8451 Do not stream DECL_VINDEX.
8452 * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
8453 * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
8454 (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
8456 2018-08-29 Richard Biener <rguenther@suse.de>
8458 * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
8459 virtual operands that are not default defs to honor region
8461 (rpo_vn_valueize): Remove ineffective code here.
8463 2018-08-29 Richard Biener <rguenther@suse.de>
8465 PR tree-optimization/87132
8466 * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
8467 when skipping defs reachable over backedges.
8469 2018-08-29 Richard Biener <rguenther@suse.de>
8471 * tree-core.h: Document use of deprecated_flag in SSA_NAME.
8472 * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
8473 * tree-into-ssa.c (pass_build_ssa::execute): Initialize
8474 function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
8475 * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
8476 (vn_reference_lookup_3): Remove use of const_parms.
8477 (free_rpo_vn): Do not free const_parms.
8478 (do_rpo_vn): Do not call init_const_parms.
8479 * tree-ssa-alias.c (refs_may_alias_p_1): Honor
8480 SSA_NAME_POINTS_TO_READONLY_MEMORY.
8481 (call_may_clobber_ref_p_1): Likewise.
8483 2018-08-29 Alexander Monakov <amonakov@ispras.ru>
8486 * invoke.texi (Optimization Options): List -ftree-scev-cprop.
8488 (-ftree-scev-cprop): Document.
8490 2018-08-29 Jan Hubicka <jh@suse.cz>
8492 * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
8494 (sreal constructor): Update.
8495 * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
8496 sreal:operator/): Update.
8498 2018-08-29 Martin Liska <mliska@suse.cz>
8500 * tree-switch-conversion.c (switch_conversion::expand):
8501 Strenghten assumption about gswitch statements.
8503 2018-08-29 Richard Biener <rguenther@suse.de>
8505 PR tree-optimization/87117
8506 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
8507 re-value-number released SSA VDEFs.
8509 2018-08-29 Richard Biener <rguenther@suse.de>
8511 PR tree-optimization/87126
8512 * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
8514 2018-08-28 Jim Wilson <jimw@sifive.com>
8516 * config/riscv/pic.md: Rewrite.
8517 * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
8519 * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
8520 (SOFTF, default_load, softload, softstore): New.
8522 2018-08-28 Jeff Law <law@redhat.com>
8524 * fold-const.c (fold_binary_loc): Remove recently added assert.
8526 2018-08-28 Joern Rennecke <joern.rennecke@riscy-ip.com>
8528 * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
8529 to OP parmeter of generated function.
8531 2018-08-28 MCC CS <deswurstes@users.noreply.github.com>
8533 PR tree-optimization/87009
8534 * match.pd: Add boolean optimizations.
8536 2018-08-28 Martin Sebor <msebor@redhat.com>
8539 * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
8540 * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
8541 (pass_walloca::gate): Use it.
8542 (alloca_call_type): Same.
8543 (pass_walloca::execute): Same.
8544 * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
8546 2018-08-28 David Malcolm <dmalcolm@redhat.com>
8548 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
8549 GCC_VERSION for usage of "__gcc_dump_printf__" format from
8552 2018-08-28 Richard Biener <rguenther@suse.de>
8554 PR tree-optimization/87124
8555 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
8556 constants before looking up avail.
8558 2018-08-28 Jakub Jelinek <jakub@redhat.com>
8561 * calls.c (maybe_warn_nonstring_arg): Punt early if
8562 warn_stringop_overflow is zero. Don't call get_range_strlen
8563 on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
8564 Swap comparison operands to have constants on rhs. Only use
8565 lenrng[1] if non-NULL and INTEGER_CST. Don't uselessly
8566 increment lenrng[0].
8568 2018-08-28 Richard Sandiford <richard.sandiford@arm.com>
8570 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
8571 use of tree_to_shwi. Remove duplicated test for the size being
8572 a whole number of bytes.
8574 2018-08-28 Richard Biener <rguenther@suse.de>
8576 PR tree-optimization/87117
8577 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
8578 Handle removed stmt without LHS (GIMPLE_NOP).
8580 2018-08-28 Richard Biener <rguenther@suse.de>
8582 PR tree-optimization/87117
8583 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
8584 void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
8586 2018-08-28 Richard Biener <rguenther@suse.de>
8588 PR tree-optimization/87117
8589 * tree-ssa-pre.c (compute_avail): Do not make expressions
8590 with predicated values available.
8591 (get_expr_value_id): Assert we do not run into predicated value
8594 2018-08-28 Richard Biener <rguenther@suse.de>
8596 PR tree-optimization/87117
8597 * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
8598 get virtual operands.
8599 (get_expr_operands): Handle STRING_CST like other decls.
8601 2018-08-28 Martin Liska <mliska@suse.cz>
8603 * tree.h: Update documentation of fndecl_built_in_p
8607 2018-08-27 Jeff Law <law@redhat.com>
8608 PR tree-optimization/87110
8609 * tree-ssa-dse.c (compute_trims): Handle non-constant
8612 2018-08-27 Martin Sebor <msebor@redhat.com>
8614 PR tree-optimization/86914
8615 * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
8617 2018-08-27 Martin Sebor <msebor@redhat.com>
8619 PR tree-optimization/87112
8620 * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
8621 the type of the bound argument.
8623 2018-08-27 Jeff Law <law@redhat.com>
8625 * tree-ssa-dse.c (compute_trims): Handle case where the reference's
8626 type does not have a TYPE_SIZE_UNIT.
8628 2018-08-27 Steve Ellcey <sellcey@cavium.com>
8630 * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
8631 with include of backend.h.
8633 2018-08-27 Richard Biener <rguenther@suse.de>
8635 PR tree-optimization/86927
8636 * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
8637 use const cond reduction code.
8639 2018-08-27 Alexander Monakov <amonakov@ispras.ru>
8641 PR tree-optimization/85758
8642 * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
8644 2018-08-27 David Malcolm <dmalcolm@redhat.com>
8647 * diagnostic-show-locus.c (class layout_range): Update for
8648 conversion of show_caret_p to a tri-state.
8649 (layout_range::layout_range): Likewise.
8650 (make_range): Likewise.
8651 (layout::maybe_add_location_range): Likewise.
8652 (layout::should_print_annotation_line_p): Don't show annotation
8653 lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
8654 (layout::get_state_at_point): Update for conversion of
8655 show_caret_p to a tri-state. Bail out early for
8656 SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
8657 underlining or source colorization.
8658 (gcc_rich_location::add_location_if_nearby): Update for conversion
8659 of show_caret_p to a tri-state.
8660 (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
8661 (selftest::test_one_liner_fixit_replace_equal_secondary_range):
8663 (selftest::test_one_liner_labels): Likewise.
8664 * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
8665 conversion of show_caret_p to a tri-state.
8666 * pretty-print.c (text_info::set_location): Likewise.
8667 * pretty-print.h (text_info::set_location): Likewise.
8668 * substring-locations.c (format_warning_n_va): Likewise.
8669 * tree-diagnostic.c (default_tree_printer): Likewise.
8670 * tree-pretty-print.c (newline_and_indent): Likewise.
8672 2018-08-27 David Malcolm <dmalcolm@redhat.com>
8675 * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
8676 line above for line-insertion fix-it hints.
8677 (selftest::test_fixit_insert_containing_newline): Update the
8678 expected results, and add a test with line-numbering enabled.
8680 2018-08-27 Martin Liska <mliska@suse.cz>
8683 * sanopt.c (sanitize_rewrite_addressable_params): Ignore
8684 params with DECL_HAS_VALUE_EXPR_P.
8686 2018-08-27 Martin Liska <mliska@suse.cz>
8688 * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
8689 selected expansion strategy.
8691 2018-08-27 Martin Liska <mliska@suse.cz>
8693 * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
8694 * builtins.c (is_builtin_fn): Likewise.
8695 * attribs.c (diag_attr_exclusions): Use new function
8696 fndecl_built_in_p and remove check for FUNCTION_DECL if
8698 (builtin_mathfn_code): Likewise.
8699 (fold_builtin_expect): Likewise.
8700 (fold_call_expr): Likewise.
8701 (fold_builtin_call_array): Likewise.
8702 (fold_call_stmt): Likewise.
8703 (set_builtin_user_assembler_name): Likewise.
8704 (is_simple_builtin): Likewise.
8705 * calls.c (gimple_alloca_call_p): Likewise.
8706 (maybe_warn_nonstring_arg): Likewise.
8707 * cfgexpand.c (expand_call_stmt): Likewise.
8708 * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
8709 (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
8710 (cgraph_node::verify_node): Likewise.
8711 * cgraphclones.c (build_function_decl_skip_args): Likewise.
8712 (cgraph_node::create_clone): Likewise.
8713 * config/arm/arm.c (arm_insert_attributes): Likewise.
8714 * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
8715 * dse.c (scan_insn): Likewise.
8716 * expr.c (expand_expr_real_1): Likewise.
8717 * fold-const.c (operand_equal_p): Likewise.
8718 (fold_binary_loc): Likewise.
8719 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
8720 * gimple-low.c (lower_stmt): Likewise.
8721 * gimple-pretty-print.c (dump_gimple_call): Likewise.
8722 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
8724 * gimple.c (gimple_build_call_from_tree): Likewise.
8725 (gimple_call_builtin_p): Likewise.
8726 (gimple_call_combined_fn): Likewise.
8727 * gimplify.c (gimplify_call_expr): Likewise.
8728 (gimple_boolify): Likewise.
8729 (gimplify_modify_expr): Likewise.
8730 (gimplify_addr_expr): Likewise.
8731 * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
8732 * ipa-cp.c (determine_versionability): Likewise.
8733 * ipa-fnsummary.c (compute_fn_summary): Likewise.
8734 * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
8735 * ipa-split.c (visit_bb): Likewise.
8736 (split_function): Likewise.
8737 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
8738 * lto-cgraph.c (input_node): Likewise.
8739 * lto-streamer-out.c (write_symbol): Likewise.
8740 * omp-low.c (setjmp_or_longjmp_p): Likewise.
8741 (lower_omp_1): Likewise.
8742 * predict.c (strip_predict_hints): Likewise.
8743 * print-tree.c (print_node): Likewise.
8744 * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
8745 * trans-mem.c (is_tm_irrevocable): Likewise.
8746 (is_tm_load): Likewise.
8747 (is_tm_simple_load): Likewise.
8748 (is_tm_store): Likewise.
8749 (is_tm_simple_store): Likewise.
8750 (is_tm_abort): Likewise.
8751 (tm_region_init_1): Likewise.
8752 * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
8753 * tree-cfg.c (verify_gimple_call): Likewise.
8754 (move_stmt_r): Likewise.
8755 (stmt_can_terminate_bb_p): Likewise.
8756 * tree-eh.c (lower_eh_constructs_2): Likewise.
8757 * tree-if-conv.c (if_convertible_stmt_p): Likewise.
8758 * tree-inline.c (remap_gimple_stmt): Likewise.
8759 (copy_bb): Likewise.
8760 (estimate_num_insns): Likewise.
8761 (fold_marked_statements): Likewise.
8762 * tree-sra.c (scan_function): Likewise.
8763 * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
8764 (optimize_stack_restore): Likewise.
8765 (pass_fold_builtins::execute): Likewise.
8766 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
8767 (mark_all_reaching_defs_necessary_1): Likewise.
8768 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
8769 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
8770 (pass_forwprop::execute): Likewise.
8771 * tree-ssa-loop-im.c (stmt_cost): Likewise.
8772 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
8773 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
8774 * tree-ssa-strlen.c (get_string_length): Likewise.
8775 * tree-ssa-structalias.c (handle_lhs_call): Likewise.
8776 (find_func_aliases_for_call): Likewise.
8777 * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
8778 * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
8779 * tree-tailcall.c (find_tail_calls): Likewise.
8780 * tree.c (need_assembler_name_p): Likewise.
8781 (free_lang_data_in_decl): Likewise.
8782 (get_call_combined_fn): Likewise.
8783 * ubsan.c (is_ubsan_builtin_p): Likewise.
8784 * varasm.c (incorporeal_function_p): Likewise.
8785 * tree.h (DECL_BUILT_IN): Remove and replace with
8787 (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
8788 (fndecl_built_in_p): New.
8790 2018-08-27 Martin Liska <mliska@suse.cz>
8792 PR tree-optimization/86847
8793 * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
8794 Dump also subtree probability.
8795 (switch_decision_tree::do_jump_if_equal): New function.
8796 (switch_decision_tree::emit_case_nodes): Handle special
8797 situations in balanced tree that can be emitted much simpler.
8798 Fix calculation of probabilities that happen in tree expansion.
8799 * tree-switch-conversion.h (struct cluster): Add
8801 (struct simple_cluster): Likewise.
8802 (struct case_tree_node): Add new function has_child.
8803 (do_jump_if_equal): New.
8805 2018-08-27 Martin Liska <mliska@suse.cz>
8807 * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
8808 Add new argument to bit_test_cluster constructor.
8809 (bit_test_cluster::emit): Set bits really number of values
8811 (bit_test_cluster::hoist_edge_and_branch_if_true): Add
8812 probability argument.
8813 * tree-switch-conversion.h (struct bit_test_cluster):
8814 Add m_handles_entire_switch.
8816 2018-08-27 Martin Liska <mliska@suse.cz>
8818 PR tree-optimization/86702
8819 * tree-switch-conversion.c (jump_table_cluster::emit):
8820 Make probabilities even for values in jump table
8821 according to number of cases handled.
8822 (switch_decision_tree::compute_cases_per_edge): Pass
8823 argument to reset_out_edges_aux function.
8824 (switch_decision_tree::analyze_switch_statement): Likewise.
8825 * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
8828 2018-08-27 Martin Liska <mliska@suse.cz>
8830 * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
8831 cfun argument explicitly.
8832 * gimple-pretty-print.c (dump_gimple_switch): Likewise.
8833 * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
8834 function gimple_switch_default_bb.
8835 (convert_switch_statements):
8837 * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
8838 * stmt.c (label_to_block_fn): Use label_to_block and pass
8839 cfun argument explicitly and use gimple_switch_label_bb.
8840 (expand_case): Likewise.
8841 * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
8842 cfun argument explicitly. Likewise.
8843 (make_edges_bb): Likewise.
8844 (make_cond_expr_edges): Likewise.
8845 (get_cases_for_edge): Likewise.
8846 (make_gimple_switch_edges): Likewise.
8847 (label_to_block_fn): Likewise.
8848 (label_to_block): Likewise.
8849 (make_goto_expr_edges): Likewise.
8850 (make_gimple_asm_edges): Likewise.
8851 (main_block_label): Likewise.
8852 (group_case_labels_stmt): Likewise.
8853 (find_taken_edge_computed_goto): Likewise.
8854 (find_taken_edge_switch_expr): Likewise.
8855 (gimple_verify_flow_info): Likewise.
8856 (gimple_redirect_edge_and_branch): Likewise.
8857 (gimple_switch_label_bb): New function.
8858 (gimple_switch_default_bb): Likewise.
8859 (gimple_switch_edge): Likewise.
8860 (gimple_switch_default_edge): Likewise.
8861 * tree-cfg.h (label_to_block_fn): Remove and replace ...
8862 (label_to_block): ... with this.
8863 (gimple_switch_label_bb): New.
8864 (gimple_switch_default_bb): Likewise.
8865 (gimple_switch_edge): Likewise.
8866 (gimple_switch_default_edge): Likewise.
8867 * tree-cfgcleanup.c (convert_single_case_switch): Use
8868 new gimple functions and pass new argument to label_to_block.
8869 (cleanup_control_flow_bb):
8870 * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
8871 cfun argument explicitly.
8872 (make_eh_edges): Likewise.
8873 (redirect_eh_dispatch_edge): Likewise.
8874 (lower_resx): Likewise.
8875 (lower_eh_dispatch): Likewise.
8876 (maybe_remove_unreachable_handlers): Likewise.
8877 (unsplit_eh): Likewise.
8878 (cleanup_empty_eh): Likewise.
8879 (verify_eh_edges): Likewise.
8880 (verify_eh_dispatch_edge): Likewise.
8881 * tree-ssa-dom.c (record_edge_info): Likewise.
8882 * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
8883 * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
8884 (thread_through_normal_block): Likewise.
8885 * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
8886 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
8887 * tree-switch-conversion.c (switch_conversion::collect): Use new
8889 (switch_conversion::check_final_bb): Likewise.
8890 (switch_conversion::gather_default_values): Pass new argument
8892 (switch_conversion::build_constructors): Likewise.
8893 (switch_decision_tree::compute_cases_per_edge): Use new
8894 gimple_switch_edge function.
8895 (switch_decision_tree::analyze_switch_statement): Pass new argument
8897 (switch_decision_tree::try_switch_expansion): Use
8898 gimple_switch_default_edge.
8899 * tree-vrp.c (find_switch_asserts): Pass new argument
8901 * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
8902 (vr_values::simplify_switch_using_ranges): Likewise.
8904 2018-08-27 Richard Biener <rguenther@suse.de>
8906 * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
8907 * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
8909 * tree-ssa-sccvn.h (struct vn_pval): New structure.
8910 (struct vn_nary_op_s): Add unwind_to member. Add
8911 predicated_values flag and put result into a union together
8912 with a linked list of vn_pval.
8913 (struct vn_ssa_aux): Add name member to make maintaining
8914 a map of SSA name to vn_ssa_aux possible. Remove no longer
8915 needed info, dfsnum, low, visited, on_sccstack, use_processed
8916 and range_info_anti_range_p members.
8917 (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
8918 (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
8920 (vn_valueize): New global.
8921 (vn_context_bb): Likewise.
8922 (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
8923 VN_INFO_PTR_INFO): Remove.
8924 * tree-ssa-sccvn.c: ... (rewrite)
8925 (pass_fre::execute): For -O2+ initialize loops and run
8926 RPO VN in optimistic mode (iterating). For -O1 and -Og
8927 run RPO VN in non-optimistic mode.
8928 * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
8929 (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
8930 * doc/invoke.texi (sccvn-max-scc-size): Remove.
8931 (rpo-vn-max-loop-depth): Document.
8932 * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
8933 when valuezing the VUSE signals we walked out of the region.
8934 * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
8935 (phi_translate): Set VN context block to use for availability
8937 (compute_avail): Likewise.
8938 (pre_valueize): New function.
8939 (pass_pre::execute): Adjust to the RPO VN API.
8941 * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
8942 (propagate_constants_for_unrolling): Remove.
8943 (tree_unroll_loops_completely): Perform value-numbering
8944 on the unrolled bodies loop parent.
8946 2018-08-27 Richard Biener <rguenther@suse.de>
8948 * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
8949 for partial antic compute.
8951 2018-08-27 Jakub Jelinek <jakub@redhat.com>
8953 PR rtl-optimization/87065
8954 * combine.c (simplify_if_then_else): Formatting fix.
8955 (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
8957 (known_cond): Don't return const_true_rtx for vector modes. Use
8958 CONST0_RTX instead of const0_rtx. Formatting fixes.
8960 2018-08-27 Martin Liska <mliska@suse.cz>
8962 PR gcov-profile/87069
8963 * gcov.c (process_file): Record files already processed
8964 and warn about a file being processed multiple times.
8966 2018-08-27 Martin Liska <mliska@suse.cz>
8969 * config/aarch64/aarch64.c (aarch64_override_options_internal):
8970 Set default values for x_aarch64_*_string strings.
8971 * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
8972 prefix. For -mabi do not print '=ABI' in help and use
8973 <option_value> format for -msve-vector-bits and -moverride
8976 2018-08-26 Jeff Law <law@redhat.com>
8978 * config/mips/frame-header-opt.c: Include "backend.h" rather than
8981 2018-08-26 Marek Polacek <polacek@redhat.com>
8983 PR c++/87029, Implement -Wredundant-move.
8984 * doc/invoke.texi: Document -Wredundant-move.
8986 2018-08-25 Martin Sebor <msebor@redhat.com>
8988 PR tree-optimization/87059
8989 * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
8990 to the same type as the other.
8991 * fold-const.c (fold_binary_loc): Assert expectation.
8993 2018-08-25 Iain Sandoe <iain@sandoe.co.uk>
8995 * config/darwin.c (machopic_legitimize_pic_address): Clean up
8996 extraneous parentheses, dead code section and formatting.
8998 2018-08-24 David Malcolm <dmalcolm@redhat.com>
9001 * diagnostic-show-locus.c (layout::layout): Ensure the margin is
9002 wide enough for jumps in the line-numbering to be visible.
9003 (layout::print_gap_in_line_numbering): New member function.
9004 (layout::calculate_line_spans): When using line numbering, merge
9005 line spans that are only 1 line apart.
9006 (diagnostic_show_locus): When printing line numbers, show gaps in
9007 line numbering directly, rather than printing headers.
9008 (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
9009 line-numbering with multiple line spans.
9010 (selftest::test_fixit_insert_containing_newline_2): Add test of
9011 line-numbering, in which the spans are close enough to be merged.
9013 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
9015 * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
9016 to range_includes_zero_p. Do not special case VR_ANTI_RANGE.
9017 * tree-vrp.c (range_is_nonnull): Remove.
9018 (range_includes_zero_p): Accept value_range instead of min/max.
9019 (extract_range_from_binary_expr_1): Do not early bail on
9021 Use range_includes_zero_p instead of range_is_nonnull.
9022 (extract_range_from_unary_expr): Use range_includes_zero_p instead
9023 of range_is_nonnull.
9024 (vrp_meet_1): Pass value_range to range_includes_zero_p. Do not
9025 special case VR_ANTI_RANGE.
9026 (vrp_finalize): Same.
9027 * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
9029 (range_is_nonnull): Remove.
9030 * vr-values.c (vrp_stmt_computes_nonzero): Use
9031 range_includes_zero_p instead of range_is_nonnull.
9032 (extract_range_basic): Pass value_range to range_includes_zero_p
9033 instead of range_is_nonnull.
9035 2018-08-24 Uros Bizjak <ubizjak@gmail.com>
9037 * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
9038 * emit-rtl.h (rtl_data): Remove return_bnd.
9039 * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
9040 * function.c (diddle_return_value): Do not handle crtl->return_bnd.
9041 * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
9042 (POINTER_BOUNDS_MODE): Remove definition.
9043 (make_pointer_bounds_mode): Remove.
9044 (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
9045 * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
9046 (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
9047 * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
9048 * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
9049 * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
9050 * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
9052 * config/i386/i386-modes.def (BND32, BND64): Remove.
9053 * config/i386/i386.c (dbx_register_map): Remove bound registers.
9054 (dbx64_register_map): Ditto.
9055 (svr4_dbx_register_map): Ditto.
9056 (indirect_thunk_bnd_needed): Remove.
9057 (indirect_thunks_bnd_used): Ditto.
9058 (indirect_return_bnd_needed): Ditto.
9059 (indirect_return_via_cx_bnd): Ditto.
9060 (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
9061 (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
9062 (output_indirect_thunk): Ditto. Remove need_prefix argument.
9063 (output_indirect_thunk_function): Remove handling of
9064 indirect_return_bnd_needed, indirect_return_via_cx_bnd,
9065 indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
9066 (ix86_save_reg): Remove handling of crtl->return_bnd.
9067 (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
9068 (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
9069 and UNSPEC_BNDLX_ADDR.
9070 (ix86_output_indirect_branch_via_reg): Remove handling of
9071 indirect_thunk_prefix_bnd.
9072 (ix86_output_indirect_branch_via_push): Ditto.
9073 (ix86_output_function_return): Ditto.
9074 (ix86_output_indirect_function_return): Ditto.
9075 (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
9076 * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
9077 (CALL_USED_REGISTERS): Ditto.
9078 (REG_ALLOC_ORDER): Update for removal of bound registers.
9079 (HI_REGISTER_NAMES): Ditto.
9080 * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
9081 (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
9082 (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
9083 (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
9084 (FIRST_PSEUDO_REG): Update.
9085 (BND): Remove mode iterator.
9086 * config/i386/predicates.md (bnd_mem_operator): Remove.
9088 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
9090 * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
9093 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
9095 * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
9096 the case in which the permute needs only a single element and
9097 repeats for every vector of the result. Extend that case to
9098 handle variable-length vectors.
9099 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
9101 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
9104 * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
9105 on DW_MACINFO_start_file for -gsplit-dwarf -g3.
9107 2018-08-24 Richard Biener <rguenther@suse.de>
9109 * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
9110 bb_flags_allocated members.
9111 (auto_flag): New RAII class for allocating flags.
9112 (auto_edge_flag): New RAII class for allocating edge flags.
9113 (auto_bb_flag): New RAII class for allocating bb flags.
9114 * cfgloop.c (verify_loop_structure): Allocate temporary edge
9116 * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
9117 in favor of temporarily allocated BB flag.
9118 * hsa-brig.c: Re-order includes.
9119 * hsa-dump.c: Likewise.
9120 * hsa-regalloc.c: Likewise.
9121 * print-rtl.c: Likewise.
9122 * profile-count.c: Likewise.
9124 2018-08-24 Segher Boessenkool <segher@kernel.crashing.org>
9127 * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
9130 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
9133 * wide-int-range.cc (wide_int_range_div): Do not ignore result
9134 from wide_int_range_multiplicative_op.
9136 2018-08-23 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
9138 * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
9141 2018-08-23 Giuliano Belinassi <giuliano.belinassi@usp.br>
9143 * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
9146 2018-08-23 Alexander Monakov <amonakov@ispras.ru>
9148 * tree-scalar-evolution.c (final_value_replacement_loop): Dump
9149 full GENERIC expression used for replacement.
9151 2018-08-23 Aldy Hernandez <aldyh@redhat.com>
9153 * tree-vrp.c (abs_extent_range): Remove.
9154 (extract_range_into_wide_ints): Pass wide ints by reference.
9155 (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
9156 Pass wide ints by reference in all calls to
9157 extract_range_into_wide_ints.
9158 * wide-int-range.cc (wide_int_range_div): New.
9159 * wide-int-range.h (wide_int_range_div): New.
9160 (wide_int_range_includes_zero_p): New.
9161 (wide_int_range_zero_p): New.
9163 2018-08-23 Matthew Malcomson <matthew.malcomson@arm.com>
9165 * config/aarch64/aarch64.md (arches): New enum.
9166 (arch): New enum attr.
9167 (arch_enabled): New attr.
9168 (enabled): Now uses arch_enabled only.
9169 (simd, sve, fp16): Removed attribute.
9170 (fp): Attr now defined in terms of 'arch'.
9171 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
9172 *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
9173 <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
9174 <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
9175 attributes into 'arch'.
9176 (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
9177 subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
9178 *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
9179 *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
9180 *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
9181 'simd' attribute into 'arch'.
9182 (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
9183 store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
9184 Convert use of 'fp' attribute to 'arch'.
9185 * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
9186 move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
9188 (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
9189 (different modes) Merge 'fp' and 'simd' into 'arch'.
9190 (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
9193 2018-08-23 Segher Boessenkool <segher@kernel.crashing.org>
9195 PR rtl-optimization/87026
9196 * expmed.c (canonicalize_comparison): If we can no longer create
9197 pseudoregisters, don't.
9199 2018-08-23 Richard Earnshaw <rearnsha@arm.com>
9202 * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
9204 * config/arm/arm.c (speculation_barrier_libfunc): New static
9206 (arm_init_libfuncs): Initialize it.
9207 (arm_emit_speculation_barrier): New function.
9208 * config/arm/arm.md (speculation_barrier): Call
9209 arm_emit_speculation_barrier for architectures that do not have
9211 (speculation_barrier_insn): Only match on Armv7 or later.
9213 2018-08-23 Richard Biener <rguenther@suse.de>
9216 * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
9219 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
9221 * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
9222 of single-vector TBLs.
9223 (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
9226 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
9229 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
9230 aarch64_evpc_tbl guard.
9232 2018-08-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
9234 * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
9237 2018-08-22 Martin Sebor <msebor@redhat.com>
9240 * tree-pretty-print.c (pretty_print_string): Add argument.
9241 (dump_generic_node): Call to pretty_print_string with string size.
9243 2018-08-22 Segher Boessenkool <segher@kernel.crashing.org>
9245 PR rtl-optimization/86771
9246 * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
9247 of two SETs into those two SETs, one to be placed at i2, if that SETs
9248 destination is modified between i2 and i3.
9250 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
9252 PR tree-optimization/86725
9253 * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
9255 (vect_analyze_scalar_cycles_1): Check it.
9257 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
9259 PR tree-optimization/86725
9260 * tree-vect-loop.c (vect_is_simple_reduction): When treating
9261 an outer loop phi as a double reduction, make sure that the
9262 single user of the phi result is an inner loop phi.
9264 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
9266 * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
9267 grouped stores with gaps to a strided group.
9269 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
9271 * tree-vect-stmts.c (get_group_load_store_type)
9272 (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
9273 first statement in a group.
9275 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
9277 * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
9278 the sequence used in gcc/gcc.c.
9280 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
9283 * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
9286 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
9288 * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
9289 Darwin10-specific unwinder-shim.
9290 * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
9291 * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
9292 New to cater for Darwin10 Rosetta.
9294 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
9296 * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
9297 specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
9299 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
9304 * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
9305 (dwarf2out_switch_text_section): Generate a local label for the
9306 second function sub-section and apply it as the second FDE start
9308 * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
9309 second sub-section start.
9311 2018-08-22 Richard Biener <rguenther@suse.de>
9313 PR tree-optimization/86988
9314 * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
9316 2018-08-22 Richard Biener <rguenther@suse.de>
9318 PR tree-optimization/86945
9319 * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
9321 2018-08-22 Alexandre Oliva <oliva@adacore.com>
9323 * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
9324 a comment about how uses of r2 for .sdata2 come about.
9326 2018-08-22 Alexandre Oliva <aoliva@redhat.com>
9328 * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
9330 2018-08-21 Marek Polacek <polacek@redhat.com>
9332 PR c++/86981, Implement -Wpessimizing-move.
9333 * doc/invoke.texi: Document -Wpessimizing-move.
9335 2018-08-21 Jan Hubicka <jh@suse.cz>
9337 * tree.c (find_decls_types_r): Do not check for redundant typedefs.
9338 * tree.h (is_redundant_typedef): Remove.
9339 * dwarf2out.c (is_redundant_typedef): Turn into static function.
9341 2018-08-21 Jan Hubicka <jh@suse.cz>
9343 * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
9346 2018-08-21 Tamar Christina <tamar.christina@arm.com>
9348 * expmed.c (extract_low_bits): Reject invalid subregs early.
9350 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
9353 * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
9356 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
9358 * config/vxworks.h: Guard vxworks_asm_out_constructor and
9359 vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
9360 * config/vxworks.c: Likewise.
9362 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
9364 * config/vxworks.c: Set targetm.have_ctors_dtors
9365 if HAVE_INITFINI_ARRAY_SUPPORT.
9366 * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
9367 if HAVE_INITFINI_ARRAY_SUPPORT.
9369 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
9371 * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
9372 default search path for VxWorks < 7.
9374 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
9376 * gimple-ssa-sprintf.c (decl_constant_value): Remove.
9377 (get_format_string): Refer to c_getstr.
9379 2018-08-21 Tom de Vries <tdevries@suse.de>
9381 * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
9382 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
9383 (debuginfo_early_stop): Declare.
9384 * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
9385 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
9386 (debuginfo_early_stop): New function.
9387 (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
9388 and debuginfo_early_stop.
9389 * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
9390 * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
9391 (general_init): Call debuginfo_early_init.
9392 (finalize): Call debuginfo_fini.
9393 (do_compile): Call debuginfo_init.
9394 * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
9396 (@item -fdump-debug, @item -fdump-earlydebug): Add.
9398 2018-08-21 Tom de Vries <tdevries@suse.de>
9400 * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
9401 flag_dump_noaddr and flag_dump_unnumbered.
9403 2018-08-21 Aldy Hernandez <aldyh@redhat.com>
9405 * wide-int-range.cc (wide_int_range_abs): New.
9406 (wide_int_range_order_set): Rename from wide_int_range_min_max.
9407 * wide-int-range.h (wide_int_range_abs): New.
9408 (wide_int_range_min_max): New.
9409 * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
9410 case to call wide_int_range_abs.
9411 Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
9412 (extract_range_from_abs_expr): Delete.
9414 2018-08-20 Michael Meissner <meissner@linux.ibm.com>
9417 * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
9418 from 'Y' to 'YZ' to enable the LWAX instruction to be generated
9421 2018-08-20 Nathan Sidwell <nathan@acm.org>
9422 Jeff Law <law@redhat.com>
9424 * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
9425 * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
9427 2018-08-20 David Malcolm <dmalcolm@redhat.com>
9430 * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
9431 (decl_attributes): Likewise.
9432 * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
9434 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
9435 * diagnostic-core.h (class auto_diagnostic_group): New class.
9436 * diagnostic.c (diagnostic_initialize): Initialize the new fields.
9437 (diagnostic_report_diagnostic): Handle the first diagnostics within
9439 (emit_diagnostic): Add auto_diagnostic_group instance.
9441 (inform_n): Likewise.
9442 (warning): Likewise.
9443 (warning_at): Likewise.
9444 (warning_n): Likewise.
9445 (pedwarn): Likewise.
9446 (permerror): Likewise.
9448 (error_n): Likewise.
9449 (error_at): Likewise.
9451 (fatal_error): Likewise.
9452 (internal_error): Likewise.
9453 (internal_error_no_backtrace): Likewise.
9454 (auto_diagnostic_group::auto_diagnostic_group): New ctor.
9455 (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
9456 * diagnostic.h (struct diagnostic_context): Add fields
9457 "diagnostic_group_nesting_depth",
9458 "diagnostic_group_emission_count", "begin_group_cb",
9460 * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
9461 Add auto_diagnostic_group instance(s).
9462 (find_explicit_erroneous_behavior): Likewise.
9463 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
9464 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
9465 * gimplify.c (warn_implicit_fallthrough_r): Likewise.
9466 (gimplify_va_arg_expr): Likewise.
9467 * hsa-gen.c (HSA_SORRY_ATV): Likewise.
9468 (HSA_SORRY_AT): Likewise.
9469 * ipa-devirt.c (compare_virtual_tables): Likewise.
9470 (warn_odr): Likewise.
9471 * multiple_target.c (expand_target_clones): Likewise.
9472 * opts-common.c (cmdline_handle_error): Likewise.
9473 * reginfo.c (globalize_reg): Likewise.
9474 * substring-locations.c (format_warning_n_va): Likewise.
9475 * tree-inline.c (expand_call_inline): Likewise.
9476 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
9477 * tree-ssa-loop-niter.c
9478 (do_warn_aggressive_loop_optimizations): Likewise.
9479 * tree-ssa-uninit.c (warn_uninit): Likewise.
9480 * tree.c (warn_deprecated_use): Likewise.
9482 2018-08-20 H.J. Lu <hongjiu.lu@intel.com>
9485 * config/i386/i386.md (eh_return): Always update EH return
9486 address in word_mode.
9488 2018-08-20 Chung-Lin Tang <cltang@codesourcery.com>
9490 * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
9491 TARGET_SPLIT_COMPLEX_ARG is defined.
9493 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
9495 * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
9497 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
9500 * expr.c (expand_assignment): Assert that bitpos is positive.
9501 (store_field): Likewise
9502 (expand_expr_real_1): Make sure that bitpos is positive.
9503 * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
9506 2018-08-20 Nathan Sidwell <nathan@acm.org>
9508 * Makefile.in (CPP_ID_DATA_H): Delete.
9509 (CPP_INTERNAL_H): Don't add it.
9510 (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
9511 * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
9513 2018-08-20 Richard Biener <rguenther@suse.de>
9515 PR tree-optimization/78655
9516 * tree-vrp.c (extract_range_from_binary_expr_1): Make
9517 pointer + offset nonnull if either operand is nonnull work.
9519 2018-08-20 Tom de Vries <tdevries@suse.de>
9521 * dwarf2out.c (add_scalar_info): Don't add reference to existing die
9522 unless the referenced die describes the added property using
9523 DW_AT_location or DW_AT_const_value. Fall back to exprloc case.
9524 Otherwise, add a DW_AT_location to the referenced die.
9526 2018-08-19 Uros Bizjak <ubizjak@gmail.com>
9529 * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
9530 register_operand when calling ix86_set_reg_reg_cost.
9531 [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
9532 Set *total to 0 for operands that satisfy x86_64_immediate_operand
9533 predicate and to 1 otherwise.
9535 2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
9537 * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
9538 emit a diagnostic that it is not supported and reset the option.
9539 * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
9540 supported and consume the option. (ASM_FINAL_SPEC): New.
9542 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
9544 * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
9547 2018-08-17 Sandra Loosemore <sandra@codesourcery.com>
9549 C-SKY port: Documentation
9551 * doc/extend.texi (C-SKY Function Attributes): New section.
9552 * doc/invoke.texi (Option Summary): Add C-SKY options.
9553 (C-SKY Options): New section.
9554 * doc/md.texi (Machine Constraints): Document C-SKY constraints.
9556 2018-08-17 Jojo <jijie_rong@c-sky.com>
9557 Huibin Wang <huibin_wang@c-sky.com>
9558 Sandra Loosemore <sandra@codesourcery.com>
9559 Chung-Lin Tang <cltang@codesourcery.com>
9561 C-SKY port: Backend implementation
9563 * config/csky/*: New.
9564 * common/config/csky/*: New.
9566 2018-08-17 Jojo <jijie_rong@c-sky.com>
9567 Huibin Wang <huibin_wang@c-sky.com>
9568 Sandra Loosemore <sandra@codesourcery.com>
9569 Chung-Lin Tang <cltang@codesourcery.com>
9570 Andrew Jenner <andrew@codesourcery.com>
9572 C-SKY port: Configury
9574 * config.gcc (csky-*-*): New.
9575 * configure.ac: Add csky to targets for dwarf2 debug_line support.
9576 * configure: Regenerated.
9578 2018-08-17 David Malcolm <dmalcolm@redhat.com>
9580 * dump-context.h: Include "dumpfile.h".
9581 (dump_context::dump_printf_va): Convert final param from va_list
9582 to va_list *. Convert from ATTRIBUTE_PRINTF to
9583 ATTRIBUTE_GCC_DUMP_PRINTF.
9584 (dump_context::dump_printf_loc_va): Likewise.
9585 * dumpfile.c: Include "stringpool.h".
9586 (make_item_for_dump_printf_va): Delete.
9587 (make_item_for_dump_printf): Delete.
9588 (class dump_pretty_printer): New class.
9589 (dump_pretty_printer::dump_pretty_printer): New ctor.
9590 (dump_pretty_printer::emit_items): New member function.
9591 (dump_pretty_printer::emit_any_pending_textual_chunks): New member
9593 (dump_pretty_printer::emit_item): New member function.
9594 (dump_pretty_printer::stash_item): New member function.
9595 (dump_pretty_printer::format_decoder_cb): New member function.
9596 (dump_pretty_printer::decode_format): New member function.
9597 (dump_context::dump_printf_va): Reimplement in terms of
9598 dump_pretty_printer.
9599 (dump_context::dump_printf_loc_va): Convert final param from va_list
9601 (dump_context::begin_scope): Reimplement call to
9602 make_item_for_dump_printf.
9603 (dump_printf): Update for change to dump_printf_va.
9604 (dump_printf_loc): Likewise.
9605 (selftest::test_capture_of_dump_calls): Convert "stmt" from
9606 greturn * to gimple *. Add a test_decl. Add tests of dump_printf
9607 with %T, %E, and %G.
9608 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
9609 (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
9610 ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
9611 (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
9612 ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
9613 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
9614 use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
9615 within a dump_printf_loc call to "%wu".
9616 (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
9617 converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd". Add a
9618 missing space after "=".
9619 * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
9620 call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
9621 * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
9622 convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
9623 * tree-vectorizer.c (try_vectorize_loop_1): Likewise. Remove
9624 duplicate "vectorized" from message.
9626 2018-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
9628 * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
9629 polyNxK_t element's TYPE_STRING_FLAG.
9631 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
9633 * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
9634 (they were unnamed before). Fix comments.
9636 2018-08-17 Nathan Sidwell <nathan@acm.org>
9638 * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
9640 2018-08-17 Richard Biener <rguenther@suse.de>
9642 PR tree-optimization/86841
9643 * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
9645 2018-08-17 Martin Liska <mliska@suse.cz>
9647 * common.opt: Remove Warn, Init and Report for options with
9648 Ignore/Deprecated flag. Warning is done automatically for
9650 * config/i386/i386.opt: Likewise.
9651 * config/ia64/ia64.opt: Likewise.
9652 * config/rs6000/rs6000.opt: Likewise.
9653 * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
9654 Remove usage of flag_check_pointer_bounds.
9655 * lto-wrapper.c (merge_and_complain): Do not handle
9656 OPT_fcheck_pointer_bounds.
9657 (append_compiler_options): Likewise.
9658 * opt-functions.awk: Do not handle Deprecated.
9659 * optc-gen.awk: Check that Var, Report and Init are not
9660 used for an option with Ignore/Deprecated flag.
9661 * opts-common.c (decode_cmdline_option): Do not report
9663 (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
9665 * opts.h (struct cl_option): Remove cl_deprecated flag.
9666 (CL_ERR_DEPRECATED): Remove error enum value.
9668 2018-08-17 Richard Biener <rguenther@suse.de>
9671 * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
9672 across a va-arg-pack using call adjust its return value accordingly.
9674 2018-08-16 Martin Sebor <msebor@redhat.com>
9676 PR tree-optimization/86853
9677 * gimple-ssa-sprintf.c (struct format_result): Rename member.
9678 (struct fmtresult): Add member and initialize it in ctors.
9679 (format_character): Handle %C. Extend range to NUL. Set MAYFAIL.
9680 (format_string): Handle %S the same as %ls. Set MAYFAIL.
9681 (format_directive): Set POSUNDER4K when MAYFAIL is set.
9682 (parse_directive): Handle %C same as %c.
9683 (sprintf_dom_walker::compute_format_length): Adjust.
9684 (is_call_safe): Adjust.
9686 2018-08-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
9688 * builtins.c (c_strlen): Add new parameter eltsize. Use it
9689 for determining how to count the elements.
9690 * builtins.h (c_strlen): Adjust prototype.
9691 * expr.c (string_constant): Add new parameter mem_size.
9692 Set *mem_size appropriately.
9693 * expr.h (string_constant): Adjust protoype.
9694 * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
9695 * gimple-fold.h (get_range_strlen): Adjust prototype.
9696 * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
9697 (format_string): Call get_string_length with eltsize.
9699 2018-08-16 David Malcolm <dmalcolm@redhat.com>
9701 * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
9702 to emit the span, rather than setting it as the prefix.
9704 2018-08-16 David Malcolm <dmalcolm@redhat.com>
9706 * diagnostic-show-locus.c (layout::start_annotation_line): Add
9707 "margin_char" parameter, defaulting to space. Use it in place
9708 of pp_space for the initial part of the margin.
9709 (layout::print_leading_fixits): Use '+' when filling the margin
9710 of line-insertion fix-it hints.
9712 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
9714 * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
9717 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
9719 * config/rs6000/altivec.md: Don't set length attribute to the default
9721 * config/rs6000/darwin.md: Ditto.
9722 * config/rs6000/dfp.md: Ditto.
9723 * config/rs6000/htm.md: Ditto.
9724 * config/rs6000/rs6000.md: Ditto.
9725 * config/rs6000/sync.md: Ditto.
9726 * config/rs6000/vsx.md: Ditto.
9728 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
9730 * config/rs6000/altivec.md: Don't set length attribute to the default
9731 value, for branch instructions.
9732 * config/rs6000/darwin.md: Ditto.
9733 * config/rs6000/rs6000.md: Ditto.
9735 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
9737 * config/rs6000/rs6000.md (length): Always define as const_int 4.
9738 (unnamed conditional branch define_insn): Set length to 4 or 8
9739 depending on offset.
9740 (<bd>_<mode>): Similar, for alternative 0.
9741 (<bd>tf_<mode>): Ditto.
9743 2018-08-16 Tamar Christina <tamar.christina@arm.com>
9745 * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
9747 2018-08-16 Matthew Malcomson <matthew.malcomson@arm.com>
9749 * doc/rtl.texi: Replace old RTX class names with new names.
9752 2018-08-16 Vlad Lazar <vlad.lazar@arm.com>
9754 * expmed.h (canonicalize_comparison): New declaration.
9755 * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
9756 * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
9757 * optabs.c (prepare_cmp_insn): Likewise.
9758 * rtl.h (unsigned_condition_p): New function which checks if a
9759 comparison operator is unsigned.
9761 2018-08-16 Nathan Sidwell <nathan@acm.org>
9763 * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
9764 * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
9766 2018-08-16 Tamar Christina <tamar.christina@arm.com>
9769 * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
9770 * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
9771 (mov<mov>): ..this and enable unconditionally.
9773 2018-08-16 Tamar Christina <tamar.christina@arm.com>
9775 * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
9777 2018-08-16 Sam Tebbs <sam.tebbs@arm.com>
9779 * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
9780 (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
9781 "Common" with "Target".
9783 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
9785 * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
9786 * doc/invoke.texi (mmitigate-rop): Remove.
9787 * config/i386/i386.c: Do not include "regrename.h".
9788 (ix86_rop_should_change_byte_p, reg_encoded_number)
9789 (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
9791 (ix86_reorg): Remove call to ix86_mitigate_rop.
9792 * config/i386/i386.md (attr "modrm_class"): Remove.
9793 (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
9794 (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
9795 (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
9797 2018-08-15 Will Schmidt <will_schmidt@vnet.ibm.com>
9799 * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
9800 allow folding of mergeh() and mergel() for the float and double types.
9801 (fold_mergehl_helper): Rework to handle building a permute tree
9804 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
9806 * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
9809 2018-08-15 David Malcolm <dmalcolm@redhat.com>
9811 * common.opt (fdiagnostics-show-labels): New option.
9812 * diagnostic-show-locus.c (class layout_range): Add field
9814 (class layout): Add field "m_show_labels_p".
9815 (layout_range::layout_range): Add param "label" and use it to
9817 (make_range): Pass in NULL for new "label" param of layout_range's
9819 (layout::layout): Initialize m_show_labels_p.
9820 (layout::maybe_add_location_range): Pass in loc_range->m_label
9821 when constructing layout_range instances.
9822 (struct line_label): New struct.
9823 (layout::print_any_labels): New member function.
9824 (layout::print_line): Call it if label-printing is enabled.
9825 (selftest::test_one_liner_labels): New test.
9826 (selftest::test_diagnostic_show_locus_one_liner): Call it.
9827 * diagnostic.c (diagnostic_initialize): Initialize
9828 context->show_labels_p.
9829 * diagnostic.h (struct diagnostic_context): Add field
9831 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
9832 -fno-diagnostics-show-labels.
9833 * dwarf2out.c (gen_producer_string): Add
9834 OPT_fdiagnostics_show_labels to the ignored options.
9835 * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
9837 (gcc_rich_location::maybe_add_expr): Likewise.
9838 * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
9839 label" param, defaulting to NULL.
9840 (gcc_rich_location::add_expr): Add "label" param.
9841 (gcc_rich_location::maybe_add_expr): Likewise.
9842 (class text_range_label): New class.
9843 (class range_label_for_type_mismatch): New class.
9844 * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
9845 of format_warning_va.
9846 (fmtwarn_n): Likewise for new params of format_warning_n_va.
9847 * lto-wrapper.c (merge_and_complain): Add
9848 OPT_fdiagnostics_show_labels to the "pick one setting" options.
9849 (append_compiler_options): Likewise to the dropped options.
9850 (append_diag_options): Likewise to the passed-on options.
9851 * opts.c (common_handle_option): Handle the new option.
9852 * selftest-diagnostic.c
9853 (test_diagnostic_context::test_diagnostic_context): Enable
9855 * substring-locations.c: Include "gcc-rich-location.h".
9856 (format_warning_n_va): Add "fmt_label" and "param_label" params
9857 and use them as appropriate.
9858 (format_warning_va): Add "fmt_label" and "param_label" params,
9859 passing them on to format_warning_n_va.
9860 (format_warning_at_substring): Likewise.
9861 (format_warning_at_substring_n): Likewise.
9862 * substring-locations.h (format_warning_va): Add "fmt_label" and
9863 "param_label" params.
9864 (format_warning_n_va): Likewise.
9865 (format_warning_at_substring): Likewise.
9866 (format_warning_at_substring_n): Likewise.
9867 * toplev.c (general_init): Initialize global_dc->show_labels_p.
9869 2018-08-15 Qing Zhao <qing.zhao@oracle.com>
9872 * builtins.c (expand_builtin_memcmp): Do not expand the call
9873 when overflow is detected.
9875 2018-08-15 Martin Sebor <msebor@redhat.com>
9877 PR tree-optimization/71625
9878 * config/aarch64/aarch64-builtins.c
9879 (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
9881 2018-08-15 Ilya Leoshkevich <iii@linux.ibm.com>
9883 * config/s390/s390.c (s390_reorg): Remove loop.
9885 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
9888 (darwin_function_switched_text_sections): Delete.
9889 * gcc/config/darwin.h
9890 (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
9892 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
9895 * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
9896 DEBUG_RNGLISTS_SECTION) new macros. (DEBUG_PUBNAMES_SECTION,
9897 DEBUG_PUBTYPES_SECTION) update to include GNU variant.
9899 2018-08-15 Martin Liska <mliska@suse.cz>
9901 PR tree-optimization/86925
9902 * predict.c (expr_expected_value_1): When taking
9903 later predictor, assign also probability.
9904 Use fold_build2_initializer_loc in order to fold
9905 the expression in -frounding-math.
9907 2018-08-14 Allan Sandfeld Jensen <allan.jensen@qt.io>
9909 * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
9911 (expand_vec_perm_1): Try the new method.
9913 2018-08-14 Ilya Leoshkevich <iii@linux.ibm.com>
9916 * lra-lives.c (remove_some_program_points_and_update_live_ranges):
9917 Check whether lra_live_max_point is 0 before dividing.
9919 2018-08-14 Martin Sebor <msebor@redhat.com>
9921 PR tree-optimization/86650
9922 * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
9923 (vrp_prop::check_mem_ref): Same.
9925 2018-08-13 Liu Hao <lh_mouse@126.com>
9927 * pretty-print.c (eat_esc_sequence): Swap the foreground and
9928 background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
9929 and clear it thereafter, as it only works for DBCS.
9931 2018-08-13 Liu Hao <lh_mouse@126.com>
9933 * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
9934 handle returned by _get_osf_handle().
9936 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
9938 * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
9939 for folding vec_perm.
9941 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
9943 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
9944 Add support for gimple-folding of vec_pack() and vec_unpack()
9947 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
9949 * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
9950 vec_xst variants to the list.
9951 (rs6000_gimple_fold_builtin): Add support for folding unaligned
9952 vector loads and stores.
9954 2018-08-13 David Edelsohn <dje.gcc@gmail.com>
9956 * config.gcc (rs6000-ibm-aix4.x): Delete.
9957 (rs6000-ibm-aix5.1): Delete.
9958 (rs6000-ibm-aix5.2): Delete.
9959 (rs6000-ibm-aix5.3): Delete.
9960 * config/rs6000/aix43.h: Delete.
9961 * config/rs6000/aix51.h: Delete.
9962 * config/rs6000/aix52.h: Delete.
9963 * config/rs6000/t-aix43: Delete.
9965 2018-08-13 Ilya Leoshkevich <iii@linux.ibm.com>
9967 * config/s390/s390.c (s390_decompose_constant_pool_ref):
9969 (s390_decompose_address): Factor out constant pool ref
9972 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
9974 * config/nds32/nds32-predicates.c
9975 (nds32_can_use_bclr_p): Change return type as bool.
9976 (nds32_can_use_bset_p): Ditto.
9977 (nds32_can_use_btgl_p): Ditto.
9978 (nds32_can_use_bitci_p): Ditto.
9979 * config/nds32/nds32-protos.h
9980 (nds32_can_use_bclr_p): Change declaration.
9981 (nds32_can_use_bset_p): Ditto.
9982 (nds32_can_use_btgl_p): Ditto.
9983 (nds32_can_use_bitci_p): Ditto.
9985 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
9987 * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
9988 Support -msched-prolog-epilog option.
9989 * config/nds32/nds32.opt (msched-prolog-epilog): New option.
9991 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
9993 * common/config/nds32/nds32-common.c
9994 (nds32_option_optimization_table): Enalbe -malways-align.
9996 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
9998 * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
10000 * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
10001 OPT_misr_secure_ case.
10002 * config/nds32/nds32-isr.c: Implementation of backward compatibility.
10003 * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
10004 * config/nds32/nds32.c (nds32_attribute_table): Add critical and
10006 * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
10007 (nds32_isr_info): New field security_level.
10008 (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
10009 * config/nds32/nds32.md (return_internal): Consider critical attribute.
10010 * config/nds32/nds32.opt (misr-secure): New option.
10011 * config/nds32/nds32_init.inc: New file.
10012 * config/nds32/nds32_isr.h: New file.
10014 2018-08-11 John David Anglin <danglin@gcc.gnu.org>
10016 * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
10017 Update comment for atomic instructions.
10018 (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
10019 atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
10021 (atomic_loaddi): Revise fence expansion to only emit fence prior to
10022 load for __ATOMIC_SEQ_CST model.
10023 (atomic_loaddi_1): Remove float register target.
10024 (atomic_storedi): Handle CONST_INT values.
10025 (atomic_storedi_1): Remove float register source. Add special case
10027 (memory_barrier): New expander and insn.
10029 2018-08-11 Jakub Jelinek <jakub@redhat.com>
10031 PR tree-optimization/86835
10032 * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
10033 new_stmt after def_gsi, make sure to insert new_square_stmt after
10034 that stmt, not 2 stmts before it.
10036 2018-08-10 Alexander Monakov <amonakov@ispras.ru>
10039 * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
10042 2018-08-10 Martin Liska <mliska@suse.cz>
10045 * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
10047 * builtins.c (expand_builtin_expect_with_probability):
10049 (expand_builtin_expect_with_probability): New function.
10050 (build_builtin_expect_predicate): Add new argumnet probability
10051 for BUILT_IN_EXPECT_WITH_PROBABILITY.
10052 (fold_builtin_expect):
10055 * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
10056 * builtins.h (fold_builtin_expect): Set new argument.
10057 * doc/extend.texi: Document __builtin_expect_with_probability.
10058 * doc/invoke.texi: Likewise.
10059 * gimple-fold.c (gimple_fold_call): Pass new argument.
10060 * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
10061 also BUILT_IN_EXPECT_WITH_PROBABILITY.
10062 * predict.c (get_predictor_value): New function.
10063 (expr_expected_value): Add new argument probability. Assume
10064 that predictor and probability are always non-null.
10065 (expr_expected_value_1): Likewise. For __builtin_expect and
10066 __builtin_expect_with_probability set probability. Handle
10067 combination in binary expressions.
10068 (tree_predict_by_opcode): Simplify code by simply calling
10069 get_predictor_value.
10070 (pass_strip_predict_hints::execute): Add handling of
10071 BUILT_IN_EXPECT_WITH_PROBABILITY.
10072 * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
10074 * tree.h (DECL_BUILT_IN_P): New function.
10076 2018-08-10 Martin Liska <mliska@suse.cz>
10078 PR tree-optimization/85799
10079 * passes.def: Add argument for pass_strip_predict_hints.
10080 * predict.c (class pass_strip_predict_hints): Add new argument
10082 (strip_predictor_early): New function.
10083 (pass_strip_predict_hints::execute): Call the function to
10085 (strip_predict_hints): New function.
10086 * predict.def: Fix comment.
10088 2018-08-10 Thomas Preud'homme <thomas.preudhomme@linaro.org>
10090 * Makefile.in: Clarify which tm.texi to copy over to assert the
10091 right to grant a GFDL license for all.
10093 2018-08-09 Jeff Law <law@redhat.com>
10095 * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
10098 2018-08-09 Andreas Schwab <schwab@linux-m68k.org>
10100 * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
10103 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
10105 * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
10106 reductions for variable-length vectors.
10108 2018-08-09 David Malcolm <dmalcolm@redhat.com>
10111 * common.opt (fdiagnostics-show-line-numbers): New option.
10112 * diagnostic-show-locus.c (class layout): Add fields
10113 "m_show_line_numbers_p" and "m_linenum_width";
10114 (num_digits): New function.
10115 (test_num_digits): New function.
10116 (layout::layout): Initialize new fields. Update m_x_offset
10117 logic to handle any left margin.
10118 (layout::print_source_line): Print line number when requested.
10119 (layout::start_annotation_line): New member function.
10120 (layout::print_annotation_line): Call it.
10121 (layout::print_leading_fixits): Likewise.
10122 (layout::print_trailing_fixits): Likewise. Update calls to
10123 move_to_column for new parameter.
10124 (layout::get_x_bound_for_row): Add "add_left_margin" param and use
10125 it to potentially call start_annotation_line.
10126 (layout::show_ruler): Call start_annotation_line.
10127 (selftest::test_line_numbers_multiline_range): New selftest.
10128 (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
10129 and selftest::test_line_numbers_multiline_range.
10130 * diagnostic.c (diagnostic_initialize): Initialize
10131 show_line_numbers_p.
10132 * diagnostic.h (struct diagnostic_context): Add field
10133 "show_line_numbers_p".
10134 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
10135 -fno-diagnostics-show-line-numbers.
10136 * dwarf2out.c (gen_producer_string): Add
10137 OPT_fdiagnostics_show_line_numbers to the ignored options.
10138 * lto-wrapper.c (merge_and_complain): Likewise to the "pick
10139 one setting" options.
10140 (append_compiler_options): Likewise to the dropped options.
10141 (append_diag_options): Likewise to the passed-on options.
10142 * opts.c (common_handle_option): Handle the new option.
10143 * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
10145 2018-08-09 Kelvin Nilsen <kelvin@gcc.gnu.org>
10147 * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
10148 ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub. Add
10149 third argument of type "const signed char" to descriptions of
10150 __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
10151 __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
10152 __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
10153 __builtin_bcdsub_ov functions.
10155 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
10157 PR tree-optimization/86858
10158 * tree-vect-loop.c (vect_is_simple_reduction): Restore
10159 flow_bb_inside_loop_p calls.
10161 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
10163 PR tree-optimization/86871
10164 * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
10165 instead of gimple_assign_lhs.
10167 2018-08-09 Richard Earnshaw <rearnsha@arm.com>
10170 * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
10171 register constraint to operand 0.
10172 (add<mode>3_carryinC): Likewise.
10173 (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
10175 2018-08-09 Martin Liska <mliska@suse.cz>
10178 * common.opt: Remove extra line.
10180 2018-08-09 Martin Liska <mliska@suse.cz>
10182 * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
10183 at the end of a line, make first letter capital and end up
10184 a sentence with a dot.
10185 (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
10186 (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
10187 (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
10188 (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
10189 (PARAM_MAX_ISL_OPERATIONS): Likewise.
10190 (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
10191 (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
10192 (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
10193 (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
10194 (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
10195 (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
10196 (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
10197 (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
10198 (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
10199 (PARAM_TREE_REASSOC_WIDTH): Likewise.
10200 (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
10201 (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
10202 (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
10204 2018-08-09 Andreas Krebbel <krebbel@linux.ibm.com>
10207 * config/s390/s390.c (s390_option_override_internal): Reduce the
10208 stack-clash-protection-probe-interval param if it would be too big
10211 2018-08-08 Andreas Schwab <schwab@linux-m68k.org>
10214 * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
10215 * config/m68k/m68k.c (handle_move_double): Don't call
10216 m68k_final_prescan_insn.
10217 (m68k_adjust_decorated_operand): Renamed from
10218 m68k_final_prescan_insn, remove first and third operand and
10220 (print_operand): Call it.
10221 (print_operand_address): Call it.
10223 2018-08-08 Nathan Sidwell <nathan@acm.org>
10225 * diagnostic.c (diagnostic_report_current_module): Use
10226 linemap_included_from & linemap_included_from_linemap.
10228 2018-08-08 Hongbo Zhang <hongbo.zhang@linaro.org>
10230 * config/aarch64/aarch64-cores.def: Add phecda core.
10231 * config/aarch64/aarch64-tune.md: Regenerate.
10232 * doc/invoke.texi: Add phecda core.
10234 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
10237 * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
10239 * config/s390/s390.md ("movti"): Add more alternatives for
10240 constant to GPR copies.
10242 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
10244 * config/s390/s390.c: Fix whitespace damage throughout the file.
10245 * config/s390/s390.h: Likewise.
10246 * config/s390/tpf.h: Likewise.
10248 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
10250 * config/s390/s390.c (s390_loadrelative_operand_p):
10251 Remove TARGET_CPU_ZARCH usages.
10252 (s390_rtx_costs): Likewise.
10253 (s390_legitimate_constant_p): Likewise.
10254 (s390_cannot_force_const_mem): Likewise.
10255 (legitimate_reload_constant_p): Likewise.
10256 (s390_preferred_reload_class): Likewise.
10257 (legitimize_pic_address): Likewise.
10258 (legitimize_tls_address): Likewise.
10259 (s390_split_branches): Removed.
10260 (s390_add_execute): Removed.
10261 (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
10262 (s390_mainpool_start): Likewise.
10263 (s390_mainpool_finish): Likewise.
10264 (s390_mainpool_cancel): Removed.
10265 (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
10266 (s390_chunkify_cancel): Likewise.
10267 (s390_return_addr_rtx): Likewise.
10268 (s390_register_info): Remove split_branches_pending_p uages.
10269 (s390_optimize_register_info): Likewise.
10270 (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
10271 split_branches_pending_p usages.
10272 (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
10273 (s390_load_got): Likewise.
10274 (s390_expand_split_stack_prologue): Likewise.
10275 (output_asm_nops): Likewise.
10276 (s390_function_profiler): Likewise.
10277 (s390_emit_call): Likewise.
10278 (s390_conditional_register_usage): Likewise.
10279 (s390_optimize_prologue): Likewise.
10280 (s390_reorg): Remove TARGET_CPU_ZARCH and
10281 split_branches_pending_p usages.
10282 (s390_option_override_internal): Remove TARGET_CPU_ZARCH
10284 (s390_output_indirect_thunk_function): Likewise.
10285 * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
10286 (TARGET_CPU_ZARCH_P): Removed.
10287 (struct machine_function): Remove split_branches_pending_p.
10288 * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
10290 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
10292 * common/config/s390/s390-common.c (processor_flags_table):
10294 * config.gcc: Remove with_arch/with_tune support.
10295 * config/s390/2064.md: Remove cpu attribute comparisons.
10296 * config/s390/driver-native.c (s390_host_detect_local_cpu):
10298 * config/s390/linux.h (ASM_SPEC):
10299 Remove -march support.
10300 * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
10301 Use a table to get an arch level.
10302 * config/s390/s390-opts.h (enum processor_type):
10303 Remove enum values.
10304 * config/s390/s390.c
10305 (processor_table): Remove entries, add arch_level values.
10306 (s390_issue_rate): Remove cases.
10307 (s390_option_override): Adjust
10308 s390_option_override_internal() call.
10309 (s390_option_override_internal): Remove deprecation warning.
10310 (s390_valid_target_attribute_tree): Adjust
10311 s390_option_override_internal() call.
10312 * config/s390/s390.h (struct s390_processor):
10313 Share with s390-c.c, add arch_level field.
10314 * config/s390/s390.md:
10315 Remove occurrences in cpu attribute.
10316 * config/s390/s390.opt: Remove -march/-mtune support.
10317 * config/s390/tpf.h (ASM_SPEC): Remove -march support.
10318 * doc/invoke.texi: Remove deprecation warning.
10320 2018-08-08 Luis Machado <luis.machado@linaro.org>
10322 * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
10324 (qdf24xx_tunings): Set vector cost structure to
10325 qdf24xx_vector_cost.
10327 * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
10328 <register_sextend>: Set to 3.
10330 2018-08-07 Richard Sandiford <richard.sandiford@arm.com>
10333 * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
10334 * config/aarch64/aarch64-simd.md
10335 (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
10336 (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
10337 (aarch64_frecpx<mode>): ...this new pattern.
10338 * config/aarch64/aarch64-simd-builtins.def: Remove comment
10339 about aarch64_frecp<FRECP:frecp_suffix><mode>.
10341 2018-08-07 Martin Liska <mliska@suse.cz>
10343 PR middle-end/83023
10344 * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
10345 BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
10346 * predict.def (PRED_MALLOC_NONNULL): New predictor.
10347 * doc/extend.texi: Document that malloc attribute adds
10350 2018-08-06 John David Anglin <danglin@gcc.gnu.org>
10353 * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10354 Define to speculation_safe_value_not_needed.
10356 2018-08-06 Jeff Law <law@redhat.com>
10358 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
10359 the vr_values instance to cprop_into_stmt.
10360 (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
10361 (cprop_operand): Also query EVRP to determine if OP is a constant.
10363 2018-08-06 Nathan Sidwell <nathan@acm.org>
10365 * diagnostic.c (diagnostic_report_current_module): Reroll
10366 included-at loop. Translate text.
10368 2018-08-06 David Malcolm <dmalcolm@redhat.com>
10370 * function-tests.c (selftest::test_expansion_to_rtl): Call
10371 free_after_compilation.
10373 2018-08-06 Alan Hayward <alan.hayward@arm.com>
10375 * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
10377 2018-08-06 Andreas Krebbel <krebbel@linux.ibm.com>
10379 * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
10380 loops with memory block operations from getting unrolled.
10382 2018-08-06 Ulrich Weigand <uweigand@de.ibm.com>
10385 * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10386 Define to speculation_safe_value_not_needed.
10388 2018-08-06 Jeff Law <law@redhat.com>
10390 * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
10393 2018-08-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
10396 * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
10397 with all enabled __intN types.
10399 * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
10401 2018-08-06 Alan Hayward <alan.hayward@arm.com>
10403 * alias.c (record_set): Check for clobber high.
10404 * cfgexpand.c (expand_gimple_stmt): Likewise.
10405 * combine-stack-adj.c (single_set_for_csa): Likewise.
10406 * combine.c (find_single_use_1): Likewise.
10407 (set_nonzero_bits_and_sign_copies): Likewise.
10408 (get_combine_src_dest): Likewise.
10409 (is_parallel_of_n_reg_sets): Likewise.
10410 (try_combine): Likewise.
10411 (record_dead_and_set_regs_1): Likewise.
10412 (reg_dead_at_p_1): Likewise.
10413 (reg_dead_at_p): Likewise.
10414 * dce.c (deletable_insn_p): Likewise.
10415 (mark_nonreg_stores_1): Likewise.
10416 (mark_nonreg_stores_2): Likewise.
10417 * df-scan.c (df_find_hard_reg_defs): Likewise.
10418 (df_uses_record): Likewise.
10419 (df_get_call_refs): Likewise.
10420 * dwarf2out.c (mem_loc_descriptor): Likewise.
10421 * haifa-sched.c (haifa_classify_rtx): Likewise.
10422 * ira-build.c (create_insn_allocnos): Likewise.
10423 * ira-costs.c (scan_one_insn): Likewise.
10424 * ira.c (equiv_init_movable_p): Likewise.
10425 (rtx_moveable_p): Likewise.
10426 (interesting_dest_for_shprep): Likewise.
10427 * jump.c (mark_jump_label_1): Likewise.
10428 * postreload-gcse.c (record_opr_changes): Likewise.
10429 * postreload.c (reload_cse_simplify): Likewise.
10430 (struct reg_use): Add source expr.
10431 (reload_combine): Check for clobber high.
10432 (reload_combine_note_use): Likewise.
10433 (reload_cse_move2add): Likewise.
10434 (move2add_note_store): Likewise.
10435 * print-rtl.c (print_pattern): Likewise.
10436 * recog.c (decode_asm_operands): Likewise.
10437 (store_data_bypass_p): Likewise.
10438 (if_test_bypass_p): Likewise.
10439 * regcprop.c (kill_clobbered_value): Likewise.
10440 (kill_set_value): Likewise.
10441 * reginfo.c (reg_scan_mark_refs): Likewise.
10442 * reload1.c (maybe_fix_stack_asms): Likewise.
10443 (eliminate_regs_1): Likewise.
10444 (elimination_effects): Likewise.
10445 (mark_not_eliminable): Likewise.
10446 (scan_paradoxical_subregs): Likewise.
10447 (forget_old_reloads_1): Likewise.
10448 * reorg.c (find_end_label): Likewise.
10449 (try_merge_delay_insns): Likewise.
10450 (redundant_insn): Likewise.
10451 (own_thread_p): Likewise.
10452 (fill_simple_delay_slots): Likewise.
10453 (fill_slots_from_thread): Likewise.
10454 (dbr_schedule): Likewise.
10455 * resource.c (update_live_status): Likewise.
10456 (mark_referenced_resources): Likewise.
10457 (mark_set_resources): Likewise.
10458 * rtl.c (copy_rtx): Likewise.
10459 * rtlanal.c (reg_referenced_p): Likewise.
10460 (single_set_2): Likewise.
10461 (noop_move_p): Likewise.
10462 (note_stores): Likewise.
10463 * sched-deps.c (sched_analyze_reg): Likewise.
10464 (sched_analyze_insn): Likewise.
10466 2018-08-06 Alan Hayward <alan.hayward@arm.com>
10468 * cse.c (invalidate_reg): New function extracted from...
10469 (invalidate): ...here.
10470 (canonicalize_insn): Check for clobber high.
10471 (invalidate_from_clobbers): invalidate clobber highs.
10472 (invalidate_from_sets_and_clobbers): Likewise.
10473 (count_reg_usage): Check for clobber high.
10474 (insn_live_p): Likewise.
10475 * cselib.c (cselib_expand_value_rtx_1):Likewise.
10476 (cselib_invalidate_regno): Check for clobber in setter.
10477 (cselib_invalidate_rtx): Pass through setter.
10478 (cselib_invalidate_rtx_note_stores):
10479 (cselib_process_insn): Check for clobber high.
10480 * cselib.h (cselib_invalidate_rtx): Add operand.
10482 2018-08-06 Alan Hayward <alan.hayward@arm.com>
10484 * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
10485 (mark_not_eliminable): Likewise.
10486 * lra-int.h (struct lra_insn_reg): Add clobber high marker.
10487 * lra-lives.c (process_bb_lives): Check for clobber high.
10488 * lra.c (new_insn_reg): Remember clobber highs.
10489 (collect_non_operand_hard_regs): Check for clobber high.
10490 (lra_set_insn_recog_data): Likewise.
10491 (add_regs_to_insn_regno_info): Likewise.
10492 (lra_update_insn_regno_info): Likewise.
10494 2018-08-06 Alan Hayward <alan.hayward@arm.com>
10496 * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
10497 * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
10499 2018-08-06 Alan Hayward <alan.hayward@arm.com>
10501 * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
10502 (copy_insn_1): Likewise.
10503 (gen_hard_reg_clobber_high): New gen function.
10504 * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
10505 * genemit.c (gen_exp): Likewise.
10506 (gen_emit_seq): Pass through info.
10507 (gen_insn): Check for CLOBBER_HIGH.
10508 (gen_expand): Pass through info.
10509 (gen_split): Likewise.
10510 (output_add_clobbers): Likewise.
10511 * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
10512 (remove_clobbers): Likewise.
10513 * rtl.h (gen_hard_reg_clobber_high): New declaration.
10515 2018-08-06 Alan Hayward <alan.hayward@arm.com>
10517 * doc/rtl.texi (clobber_high): Add.
10518 (parallel): Add in clobber high
10519 * rtl.c (rtl_check_failed_code3): Add function.
10520 * rtl.def (CLOBBER_HIGH): Add expression.
10521 * rtl.h (RTL_CHECKC3): Add macro.
10522 (rtl_check_failed_code3): Add declaration.
10523 (XC3EXP): Add macro.
10525 2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
10528 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
10529 cfun->machine->max_used_stack_alignment if needed.
10531 2018-08-04 Martin Sebor <msebor@redhat.com>
10533 PR tree-optimization/86571
10534 * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
10537 2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
10540 * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10543 2018-08-03 Jeff Law <law@redhat.com>
10546 * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10547 Define to speculation_safe_value_not_needed.
10549 2018-08-03 David Malcolm <dmalcolm@redhat.com>
10551 * doc/gcov.texi (-x): Remove duplicate "to".
10552 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
10553 (-Wif-not-aligned): Remove duplicate "is".
10554 (-flto): Remove duplicate "the".
10555 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
10556 duplicate "v5.00.b".
10557 (MSP430 Options): Remove duplicate "and" from the description
10558 of "-mgprel-sec=regexp".
10559 (x86 Options): Remove duplicate copies of "vmldLog102" and
10560 vmlsLog104 from description of "-mveclibabi=type".
10562 2018-08-03 Richard Sandiford <richard.sandiford@arm.com>
10564 * internal-fn.h (first_commutative_argument): Declare.
10565 * internal-fn.c (first_commutative_argument): New function.
10566 * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
10567 restrictions for pattern statements. Use first_commutative_argument
10568 to look for commutative operands in calls to internal functions.
10570 2018-08-03 Aldy Hernandez <aldyh@redhat.com>
10572 * Makefile.in (wide-int-range.o): New.
10573 * tree-vrp.c: Move all the wide_int_* functions to...
10574 * wide-int-range.cc: ...here.
10575 * tree-vrp.h: Move all the wide_int_* prototypes to...
10576 * wide-int-range.h: ...here.
10578 2018-08-03 Tom de Vries <tdevries@suse.de>
10580 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
10582 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
10583 * except.c (output_function_exception_table): Do early exit if
10584 targetm_common.except_unwind_info (&global_options) == UI_NONE.
10586 2018-08-03 Martin Liska <mliska@suse.cz>
10588 * predict.c (dump_prediction): Change to 2 digits
10591 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
10593 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
10595 (falkor_am_1_gtov_gtov): ... a new insn reservation.
10597 2018-07-19 Ilya Leoshkevich <iii@linux.ibm.com>
10599 * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
10600 * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
10601 * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
10602 * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
10603 * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
10605 2018-08-02 David Malcolm <dmalcolm@redhat.com>
10607 * diagnostic-show-locus.c (diagnostic_show_locus): Use
10608 pp_take_prefix when saving the existing prefix.
10609 * diagnostic.c (diagnostic_append_note): Likewise.
10610 * langhooks.c (lhd_print_error_function): Likewise.
10611 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
10612 param's type. Free the existing prefix.
10613 (pp_take_prefix): New function.
10614 (pretty_printer::pretty_printer): Drop the prefix parameter.
10615 Rename the length parameter to match the comment.
10616 (pretty_printer::~pretty_printer): Free the prefix.
10617 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
10619 (struct pretty_printer): Drop the "const" from "prefix" field's
10620 type and clarify memory management.
10621 (pp_set_prefix): Drop the "const" from the 2nd param.
10622 (pp_take_prefix): New decl.
10624 2018-08-02 Aaron Sawdey <acsawdey@linux.ibm.com>
10626 * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
10627 for word_mode_ok here instead of passing as argument.
10628 (expand_block_compare): Change select_block_compare_mode() call.
10629 (expand_strncmp_gpr_sequence): New function.
10630 (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
10632 2018-08-02 Jeff Law <law@redhat.com>
10635 * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10636 Define to speculation_safe_value_not_needed.
10639 * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10640 Define to speculation_safe_value_not_needed.
10642 2018-08-02 Tom de Vries <tdevries@suse.de>
10645 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
10646 function. Return UI_TARGET unconditionally.
10647 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
10648 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
10650 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
10652 * genemit.c (print_overload_test): Fix typo.
10654 2018-08-02 Richard Biener <rguenther@suse.de>
10656 PR tree-optimization/86816
10657 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
10658 which checks for value availability before querying it.
10659 (gvn_uses_equal): Use it.
10660 (same_succ_hash): Likewise.
10661 (gimple_equal_p): Likewise.
10663 2018-08-02 Nick Clifton <nickc@redhat.com>
10666 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10667 Define to speculation_safe_value_not_needed.
10670 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10671 Define to speculation_safe_value_not_needed.
10674 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10675 Define to speculation_safe_value_not_needed.
10678 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10679 Define to speculation_safe_value_not_needed.
10682 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10683 Define to speculation_safe_value_not_needed.
10686 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10687 Define to speculation_safe_value_not_needed.
10690 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10691 Define to speculation_safe_value_not_needed.
10694 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10695 Define to speculation_safe_value_not_needed.
10698 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
10699 speculation_safe_value_not_needed.
10702 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
10703 to speculation_safe_value_not_needed.
10705 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
10707 * doc/md.texi: Expand the documentation of instruction names
10708 to mention port-local uses. Document '@' in pattern names.
10709 * read-md.h (overloaded_instance, overloaded_name): New structs.
10710 (mapping): Declare.
10711 (md_reader::handle_overloaded_name): New member function.
10712 (md_reader::get_overloads): Likewise.
10713 (md_reader::m_first_overload): New member variable.
10714 (md_reader::m_next_overload_ptr): Likewise.
10715 (md_reader::m_overloads_htab): Likewise.
10716 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
10717 m_next_overload_ptr and m_overloads_htab.
10718 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
10719 (get_mode_token, get_code_token, get_int_token): New functions.
10720 (map_attr_string): Add an optional argument that passes back
10721 the associated iterator.
10722 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
10723 (md_reader::handle_overloaded_name, add_overload_instance): New
10725 (apply_iterators): Handle '@' names. Report an error if '@'
10726 is used without iterators.
10727 (initialize_iterators): Initialize the new iterator_group fields.
10728 * genopinit.c (handle_overloaded_code_for)
10729 (handle_overloaded_gen): New functions.
10730 (main): Use them to print declarations of maybe_code_for_* and
10731 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
10732 * genemit.c (print_overload_arguments, print_overload_test)
10733 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
10734 (main): Use it to print definitions of maybe_code_for_* and
10735 maybe_gen_* functions.
10736 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
10737 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
10738 instead of explicit mode checks.
10739 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
10740 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
10741 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
10742 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
10743 (aarch64_expand_compare_and_swap): Likewise
10744 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
10745 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
10746 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
10747 (aarch64_constant_pool_reload_icode): Delete.
10748 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
10749 instead of aarch64_constant_pool_reload_icode. Use
10750 code_for_aarch64_reload_mov instead of explicit mode checks.
10751 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
10752 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
10753 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
10754 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
10755 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
10756 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
10757 (aarch64_atomic_load_op_code): Delete.
10758 (aarch64_emit_atomic_load_op): Likewise.
10759 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
10760 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
10761 instead of aarch64_emit_atomic_load_op.
10762 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
10763 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
10764 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
10765 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
10766 character before the pattern name.
10767 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
10768 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
10769 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
10770 (aarch64_frecps<mode>): Likewise.
10771 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
10772 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
10773 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
10774 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
10775 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
10777 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
10779 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
10780 Allow HFmode constants if TARGET_FP_F16INST.
10782 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
10785 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
10786 No longer check last store for clobber of address register.
10788 2018-08-02 Martin Liska <mliska@suse.cz>
10790 PR gcov-profile/86817
10791 * gcov.c (process_all_functions): New function.
10793 (process_file): Move functions processing to
10794 process_all_functions.
10796 2018-08-02 David Malcolm <dmalcolm@redhat.com>
10798 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
10799 "const" to the "gimple *" and "rtx_insn *" parameters.
10800 * dumpfile.h (dump_user_location_t::dump_user_location_t):
10802 (dump_location_t::dump_location_t): Likewise.
10804 2018-08-01 Martin Sebor <msebor@redhat.com>
10806 PR tree-optimization/86650
10807 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
10808 rather than a "gcall *". Directly pass the data of interest
10809 to percent_K_format, rather than building a temporary CALL_EXPR
10811 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
10812 (gimple_fold_builtin_strncat): Adjust.
10813 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
10814 gcall* argument with gimple*.
10815 * gimple-ssa-warn-restrict.c (check_call): Same.
10816 (wrestrict_dom_walker::before_dom_children): Same.
10817 (builtin_access::builtin_access): Same.
10818 (check_bounds_or_overlap): Same
10819 (maybe_diag_overlap): Same.
10820 (maybe_diag_offset_bounds): Same.
10821 * tree-diagnostic.c (default_tree_printer): Move usage of
10822 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
10824 * tree-pretty-print.c (percent_K_format): Add argument.
10825 * tree-pretty-print.h: Add argument.
10826 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
10827 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
10828 (maybe_diag_stxncpy_trunc): Same.
10829 (handle_builtin_stxncpy): Same.
10830 (handle_builtin_strcat): Same.
10832 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
10834 * match.pd: Optimise pointer range checks.
10836 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
10838 PR tree-optimization/86758
10839 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
10840 to remove pattern statements.
10842 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
10844 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
10845 result of dfs_enumerate_from when constructing stmt_vec_infos,
10846 instead of additionally calling get_loop_body.
10848 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
10850 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
10852 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
10853 When creating an iv, assert that the step is not known to be zero.
10854 (vect_setup_realignment): Update call accordingly.
10855 * tree-vect-stmts.c (vectorizable_store): Likewise.
10856 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
10858 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
10860 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
10861 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
10862 (vectorizable_reduction): Likewise.
10863 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
10864 (vect_detect_hybrid_slp_stmts): Likewise.
10865 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
10867 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
10869 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
10870 (wide_int_set_zero_nonzero_bits): ...this.
10871 (zero_nonzero_bits_from_vr): Rename to...
10872 (vrp_set_zero_nonzero_bits): ...this.
10873 (extract_range_from_multiplicative_op_1): Abstract wide int
10875 (wide_int_range_multiplicative_op): ...here.
10876 (extract_range_from_binary_expr_1): Extract wide int binary
10877 operations into their own functions.
10878 (wide_int_range_lshift): New.
10879 (wide_int_range_can_optimize_bit_op): New.
10880 (wide_int_range_shift_undefined_p): New.
10881 (wide_int_range_bit_xor): New.
10882 (wide_int_range_bit_ior): New.
10883 (wide_int_range_bit_and): New.
10884 (wide_int_range_trunc_mod): New.
10885 (extract_range_into_wide_ints): New.
10886 (vrp_shift_undefined_p): New.
10887 (extract_range_from_multiplicative_op): New.
10888 (vrp_can_optimize_bit_op): New.
10889 * tree-vrp.h (value_range::dump): New.
10890 (wide_int_range_multiplicative_op): New.
10891 (wide_int_range_lshift):New.
10892 (wide_int_range_shift_undefined_p): New.
10893 (wide_int_range_bit_xor): New.
10894 (wide_int_range_bit_ior): New.
10895 (wide_int_range_bit_and): New.
10896 (wide_int_range_trunc_mod): New.
10897 (zero_nonzero_bits_from_bounds): Rename to...
10898 (wide_int_set_zero_nonzero_bits): ...this.
10899 (zero_nonzero_bits_from_vr): Rename to...
10900 (vrp_set_zero_nonzero_bits): ...this.
10901 (range_easy_mask_min_max): Rename to...
10902 (wide_int_range_can_optimize_bit_op): this.
10903 * vr-values.c (simplify_bit_ops_using_ranges): Rename
10904 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
10906 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
10908 * tree-vectorizer.h (vect_orig_stmt): New function.
10909 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
10910 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
10911 (vect_create_epilog_for_reduction): Likewise.
10912 (vectorizable_live_operation): Likewise.
10913 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
10914 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
10915 * tree-vect-stmts.c (vectorizable_call): Likewise.
10916 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
10918 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
10920 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
10922 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
10923 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
10924 (vect_transform_loop): Likewise.
10925 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
10927 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
10929 * tree-vectorizer.h (vect_schedule_slp): Return void.
10930 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
10931 (vect_schedule_slp): Likewise.
10933 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
10935 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
10937 (vect_transform_loop): Update calls accordingly. Schedule SLP
10938 instances before the main loop, if any exist.
10940 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
10942 PR tree-optimization/86749
10943 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
10944 If the lhs is used in a COND_EXPR, check that it is being used
10945 as the "then" or "else" value.
10947 2018-08-01 Tom de Vries <tdevries@suse.de>
10950 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
10951 speculation_safe_value_not_needed.
10953 2018-08-01 Richard Biener <rguenther@suse.de>
10955 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
10956 as base and offset.
10958 2018-08-01 Martin Liska <mliska@suse.cz>
10960 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
10961 format how successful transformation is dumped.
10962 (gimple_mod_pow2_value_transform): Likewise.
10963 (gimple_mod_subtract_transform): Likewise.
10964 (gimple_stringops_transform): Likewise.
10966 2018-08-01 Martin Liska <mliska@suse.cz>
10968 PR value-prof/35543
10969 * value-prof.c (interesting_stringop_to_profile_p):
10970 Simplify the code and add BUILT_IN_MEMMOVE.
10971 (gimple_stringops_transform): Likewise.
10973 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
10975 * config/aarch64/aarch64-simd.md
10976 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
10977 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
10978 use GPI iterator instead of SI mode.
10980 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
10982 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
10983 rs6000_speculation_barrier.
10984 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
10985 new barrier pattern name.
10987 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
10989 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
10990 (speculation_barrier): New insn.
10992 2018-08-01 Richard Biener <rguenther@suse.de>
10995 * graphite.h: Include isl/id.h and isl/space.h to allow build
10998 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
11001 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
11002 mode for COFF targets.
11003 * defaults.h (TARGET_COFF): Define.
11004 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
11005 TARGET_COFF): Define.
11006 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
11007 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
11008 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
11010 2018-07-31 Alexandre Oliva <oliva@adacore.com>
11012 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
11013 * gimple-streamer-out.c (output_bb): Save it.
11014 * lto-streamer-in.c (input_struct_function_base): Restore
11015 instance discriminator if available. Create map on demand.
11016 * lto-streamer-out.c (output_struct_function_base): Save it if
11018 * final.c (decl_to_instance_map): Document LTO strategy.
11020 2018-07-31 Alexandre Oliva <oliva@adacore.com>
11021 Olivier Hainque <hainque@adacore.com>
11023 * debug.h (decl_to_instance_map_t): New type.
11024 (decl_to_instance_map): Declare.
11025 (maybe_create_decl_to_instance_map): New inline function.
11026 * final.c (bb_discriminator, last_bb_discriminator): New statics,
11027 to track basic block discriminators.
11028 (final_start_function_1): Initialize them.
11029 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
11031 (decl_to_instance_map): New variable.
11032 (map_decl_to_instance, maybe_set_discriminator): New functions.
11033 (notice_source_line): Set discriminator.
11035 2018-07-31 Ian Lance Taylor <iant@golang.org>
11037 * targhooks.c (default_have_speculation_safe_value): Add
11040 2018-07-31 David Malcolm <dmalcolm@redhat.com>
11042 * dump-context.h: Include "pretty-print.h".
11043 (dump_context::refresh_dumps_are_enabled): New decl.
11044 (dump_context::emit_item): New decl.
11045 (class dump_context): Add fields "m_test_pp" and
11047 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
11048 (temp_dump_context::get_dumped_text): New decl.
11049 (class temp_dump_context): Add field "m_pp".
11050 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
11051 (dump_context::refresh_dumps_are_enabled): ...and add a test for
11053 (set_dump_file): Update for above change.
11054 (set_alt_dump_file): Likewise.
11055 (dump_loc): New overload, taking a pretty_printer *.
11056 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
11057 to any test pretty-printer.
11058 (make_item_for_dump_gimple_stmt): New function, adapted from
11059 optinfo::add_gimple_stmt.
11060 (dump_context::dump_gimple_stmt): Call it, and use the result,
11061 eliminating the direct usage of dump_file and alt_dump_file in
11062 favor of indirectly using them via emit_item.
11063 (make_item_for_dump_gimple_expr): New function, adapted from
11064 optinfo::add_gimple_expr.
11065 (dump_context::dump_gimple_expr): Call it, and use the result,
11066 eliminating the direct usage of dump_file and alt_dump_file in
11067 favor of indirectly using them via emit_item.
11068 (make_item_for_dump_generic_expr): New function, adapted from
11070 (dump_context::dump_generic_expr): Call it, and use the result,
11071 eliminating the direct usage of dump_file and alt_dump_file in
11072 favor of indirectly using them via emit_item.
11073 (make_item_for_dump_printf_va): New function, adapted from
11074 optinfo::add_printf_va.
11075 (make_item_for_dump_printf): New function.
11076 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
11077 and use the result, eliminating the direct usage of dump_file and
11078 alt_dump_file in favor of indirectly using them via emit_item.
11079 (make_item_for_dump_dec): New function.
11080 (dump_context::dump_dec): Call it, and use the result,
11081 eliminating the direct usage of dump_file and alt_dump_file in
11082 favor of indirectly using them via emit_item.
11083 (make_item_for_dump_symtab_node): New function, adapted from
11084 optinfo::add_symtab_node.
11085 (dump_context::dump_symtab_node): Call it, and use the result,
11086 eliminating the direct usage of dump_file and alt_dump_file in
11087 favor of indirectly using them via emit_item.
11088 (dump_context::begin_scope): Reimplement, avoiding direct usage
11089 of dump_file and alt_dump_file in favor of indirectly using them
11091 (dump_context::emit_item): New member function.
11092 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
11093 Set up test pretty-printer on the underlying context. Call
11094 refresh_dumps_are_enabled.
11095 (temp_dump_context::~temp_dump_context): Call
11096 refresh_dumps_are_enabled.
11097 (temp_dump_context::get_dumped_text): New member function.
11098 (selftest::verify_dumped_text): New function.
11099 (ASSERT_DUMPED_TEXT_EQ): New macro.
11100 (selftest::test_capture_of_dump_calls): Run all tests twice, with
11101 and then without optinfo enabled. Add uses of
11102 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
11103 * dumpfile.h: Update comment for the dump_* API.
11104 * optinfo-emit-json.cc
11105 (selftest::test_building_json_from_dump_calls): Update for new
11106 param for temp_dump_context ctor.
11107 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
11108 and "m_owned" field.
11109 (optinfo_item::~optinfo_item): Likewise.
11110 (optinfo::add_item): New member function.
11111 (optinfo::emit): Update comment.
11112 (optinfo::add_string): Delete.
11113 (optinfo::add_printf): Delete.
11114 (optinfo::add_printf_va): Delete.
11115 (optinfo::add_gimple_stmt): Delete.
11116 (optinfo::add_gimple_expr): Delete.
11117 (optinfo::add_tree): Delete.
11118 (optinfo::add_symtab_node): Delete.
11119 (optinfo::add_dec): Delete.
11120 * optinfo.h (class dump_context): New forward decl.
11121 (optinfo::add_item): New decl.
11122 (optinfo::add_string): Delete.
11123 (optinfo::add_printf): Delete.
11124 (optinfo::add_printf_va): Delete.
11125 (optinfo::add_gimple_stmt): Delete.
11126 (optinfo::add_gimple_expr): Delete.
11127 (optinfo::add_tree): Delete.
11128 (optinfo::add_symtab_node): Delete.
11129 (optinfo::add_dec): Delete.
11130 (optinfo::add_poly_int): Delete.
11131 (optinfo_item::optinfo_item): Remove "owned" param.
11132 (class optinfo_item): Remove field "m_owned".
11134 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
11136 PR middle-end/86705
11137 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
11138 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
11139 requested variable alignment.
11140 (expand_one_ssa_partition): Likewise.
11141 (expand_one_var): Likewise.
11143 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
11145 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
11146 to speculation_safe_value_not_needed.
11148 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
11150 * targhooks.h (speculation_safe_value_not_needed): New prototype.
11151 * targhooks.c (speculation_safe_value_not_needed): New function.
11152 * target.def (have_speculation_safe_value): Update documentation.
11153 * doc/tm.texi: Regenerated.
11155 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
11157 * config/aarch64/iterators.md (ALLI_TI): New iterator.
11158 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
11160 (despeculate_copy<ALLI:mode>_insn): New insn.
11161 (despeculate_copyti_insn): New insn.
11162 (despeculate_simple<ALLI:mode>): New insn
11163 (despeculate_simpleti): New insn.
11164 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
11166 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
11167 aarch64_speculation_safe_value.
11168 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
11170 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
11172 * config/aarch64/aarch64-speculation.cc: New file.
11173 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
11174 before pass_reorder_blocks.
11175 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
11177 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
11178 X14 and X15 when tracking speculation.
11179 * config/aarch64/aarch64.md (register name constants): Add
11180 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
11181 (unspec): Add UNSPEC_SPECULATION_TRACKER.
11182 (speculation_barrier): New insn attribute.
11183 (cmp<mode>): Allow SP in comparisons.
11184 (speculation_tracker): New insn.
11185 (speculation_barrier): Add speculation_barrier attribute.
11186 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
11187 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
11188 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
11190 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
11192 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
11193 aarch64_track_speculation is true.
11194 (tb<optab><mode>1): Likewise.
11195 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
11196 generate CB[N]Z when tracking speculation.
11197 (aarch64_split_compare_and_swap): Likewise.
11198 (aarch64_split_atomic_op): Likewise.
11200 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
11202 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
11204 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
11206 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
11207 (speculation_barrier): New insn.
11209 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
11211 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
11212 * config/arm/arm.md (speculation_barrier): New expand.
11213 (speculation_barrier_insn): New pattern.
11215 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
11217 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
11218 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
11219 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
11220 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
11222 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
11223 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
11224 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
11225 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
11226 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
11227 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
11228 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
11229 * builtins.c (expand_speculation_safe_value): New function.
11230 (expand_builtin): Call it.
11231 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
11232 * doc/extend.texi: Document __builtin_speculation_safe_value.
11233 * doc/md.texi: Document "speculation_barrier" pattern.
11234 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
11235 TARGET_HAVE_SPECULATION_SAFE_VALUE.
11236 * doc/tm.texi: Regenerated.
11237 * target.def (have_speculation_safe_value, speculation_safe_value): New
11239 * targhooks.c (default_have_speculation_safe_value): New function.
11240 (default_speculation_safe_value): New function.
11241 * targhooks.h (default_have_speculation_safe_value): Add prototype.
11242 (default_speculation_safe_value): Add prototype.
11244 2018-07-31 David Malcolm <dmalcolm@redhat.com>
11246 * dump-context.h (dump_context::dump_loc): New decl.
11247 * dumpfile.c (dump_context::dump_loc): New member function.
11248 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
11249 and dump_gimple_stmt.
11250 (dump_context::dump_gimple_expr_loc): Likewise, using
11252 (dump_context::dump_generic_expr_loc): Likewise, using
11254 (dump_context::dump_printf_loc_va): Likewise, using
11256 (dump_context::begin_scope): Explicitly using the global function
11257 "dump_loc", rather than the member function.
11259 2018-07-31 Martin Sebor <msebor@redhat.com>
11261 PR tree-optimization/86741
11262 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
11264 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
11266 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
11267 depend on whether prefetch instructions will be emitted or not.
11268 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
11269 will be emitted or not.
11270 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
11271 (TARGET_SETMEM_PFD): New macros.
11273 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11275 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
11276 (NULL_STMT_VEC_INFO): Delete.
11277 (stmt_vec_info::operator*): Likewise.
11278 (stmt_vec_info::operator gimple *): Likewise.
11279 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
11280 of NULL_STMT_VEC_INFO.
11281 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
11282 (vect_reassociating_reduction_p): Likewise.
11283 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
11284 (vectorizable_store): Likewise.
11285 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
11286 (vec_info::free_stmt_vec_infos): Likewise.
11288 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11290 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
11291 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
11293 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11295 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
11296 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
11297 (vec_info::free_stmt_vec_info): New private member functions.
11298 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
11299 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
11300 * tree-parloops.c (gather_scalar_reductions): Remove calls to
11301 set_stmt_vec_info_vec and free_stmt_vec_infos.
11302 * tree-vect-loop.c (_loop_vec_info): Remove call to
11303 set_stmt_vec_info_vec.
11304 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
11305 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
11306 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
11307 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
11308 (vec_info::free_stmt_vec_info): ...these new functions. Remove
11309 assignments in {vec_info::,}new_stmt_vec_info that are redundant
11310 with the clearing in the xcalloc.
11311 (stmt_vec_info_vec): Delete.
11312 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
11313 (vectorize_loops): Likewise.
11314 (vec_info::~vec_info): Remove argument from call to
11315 free_stmt_vec_infos.
11316 (vec_info::add_stmt): Remove vinfo argument from call to
11319 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11321 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
11322 rather than a gimple stmt.
11323 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
11324 information for pattern statements when passed the original
11325 statement; instead wait to be passed the pattern statement itself.
11326 Don't call set_vinfo_for_stmt here.
11327 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
11328 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
11329 stmt_vec_infos here.
11330 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
11331 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
11332 stmt_vec_infos entry.
11334 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11336 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
11337 * tree-vectorizer.c (vec_info::replace_stmt): New function.
11338 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
11339 * tree-vect-stmts.c (vectorizable_call): Likewise.
11340 (vectorizable_simd_clone_call): Likewise.
11342 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11344 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
11345 * tree-vectorizer.c (vec_info::remove_stmt): New function.
11346 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
11347 * tree-vect-loop.c (vect_transform_loop): Likewise.
11348 * tree-vect-slp.c (vect_schedule_slp): Likewise.
11349 * tree-vect-stmts.c (vect_remove_stores): Likewise.
11351 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11353 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
11354 (vect_dr_stmt): Delete.
11355 * tree-vectorizer.c (vec_info::lookup_dr): New function.
11356 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
11358 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
11359 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
11360 (vect_verify_datarefs_alignment, vect_peeling_supportable)
11361 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
11362 (vect_analyze_data_refs): Likewise.
11363 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
11365 (vect_find_same_alignment_drs): Likewise.
11366 (vect_slp_analyze_node_dependences): Update calls accordingly.
11367 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
11368 instead of DR_VECT_AUX.
11369 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
11370 of a vector data references. Use vec_info::lookup_dr instead of
11372 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
11373 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
11374 instead of DR_VECT_AUX.
11376 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11378 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
11380 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
11382 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
11383 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
11384 (vect_gen_prolog_loop_niters): Likewise.
11386 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11388 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
11389 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
11390 (vect_known_alignment_in_bytes, vect_dr_behavior)
11391 (vect_get_scalar_dr_size): Take references as dr_vec_infos
11392 instead of data_references. Update calls to other routines for
11393 which the same change has been made.
11394 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
11395 dr_vec_infos instead of stmt_vec_infos.
11396 (vect_analyze_data_ref_dependence): Update call accordingly.
11397 (vect_slp_analyze_data_ref_dependence)
11398 (vect_record_base_alignments): Use DR_VECT_AUX.
11399 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
11400 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
11401 (vector_alignment_reachable_p, vect_get_data_access_cost)
11402 (vect_peeling_supportable, vect_analyze_group_access_1)
11403 (vect_analyze_group_access, vect_analyze_data_ref_access)
11404 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
11405 (vect_compile_time_alias, vect_small_gap_p)
11406 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
11407 (vect_supportable_dr_alignment): Take references as dr_vec_infos
11408 instead of data_references. Update calls to other routines for
11409 which the same change has been made.
11410 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
11411 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
11412 (vect_slp_analyze_and_verify_node_alignment)
11413 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
11414 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
11415 (vect_setup_realignment): Use dr_vec_infos. Update calls after
11417 (_vect_peel_info::dr): Replace with...
11418 (_vect_peel_info::dr_info): ...this new field.
11419 (vect_peeling_hash_get_most_frequent)
11420 (vect_peeling_hash_choose_best_peeling): Update accordingly.
11421 (vect_peeling_hash_get_lowest_cost):
11422 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
11423 routines for which the same change has been made.
11424 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
11426 * tree-vect-loop-manip.c (get_misalign_in_elems)
11427 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
11429 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
11430 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
11431 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
11432 (get_group_load_store_type, get_negative_load_store_type)
11433 (vect_get_data_ptr_increment, vectorizable_store)
11434 (vectorizable_load): Likewise.
11435 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
11436 Update calls to other routines for which the same change has been made.
11438 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11440 * tree-vectorizer.h (vec_info::move_dr): New member function.
11441 (dataref_aux): Rename to...
11442 (dr_vec_info): ...this and add "dr" and "stmt" fields.
11443 (_stmt_vec_info::dr_aux): Update accordingly.
11444 (_stmt_vec_info::data_ref_info): Delete.
11445 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
11446 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
11447 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
11448 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
11450 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
11451 (STMT_VINFO_DR_INFO): New macro.
11452 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
11453 (set_dr_misalignment): Update after rename of dataref_aux.
11454 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
11455 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
11456 initialization of STMT_VINFO_DATA_REF.
11457 * tree-vectorizer.c (vec_info::move_dr): New function.
11458 * tree-vect-patterns.c (vect_recog_bool_pattern)
11459 (vect_recog_mask_conversion_pattern)
11460 (vect_recog_gather_scatter_pattern): Use it.
11461 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
11462 the "dr" and "stmt" fields of dr_vec_info instead of
11463 STMT_VINFO_DATA_REF.
11465 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11467 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
11468 (is_pattern_stmt_p): Use it.
11469 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
11470 on pattern statements.
11472 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11474 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
11475 original stmt as a stmt_vec_info rather than a gimple stmt.
11476 (vect_pattern_recog_1): Take the statement directly as a
11477 stmt_vec_info, rather than via a gimple_stmt_iterator.
11478 Update call to vect_mark_pattern_stmts.
11479 (vect_pattern_recog): Update calls accordingly.
11481 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11483 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
11484 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
11485 a vect_def_type for the first argument.
11486 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
11487 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
11488 operand if it isn't defined by a vectorized statement.
11489 (vect_build_gather_load_calls): Remove the mask_dt argument and
11490 update calls to vect_get_vec_def_for_stmt_copy.
11491 (vectorizable_bswap): Likewise the dt argument.
11492 (vectorizable_call): Update calls to vectorizable_bswap and
11493 vect_get_vec_def_for_stmt_copy.
11494 (vectorizable_simd_clone_call, vectorizable_assignment)
11495 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
11496 (vectorizable_comparison): Update calls to
11497 vect_get_vec_def_for_stmt_copy.
11498 (vectorizable_store): Likewise. Remove now-unnecessary calls to
11499 vect_is_simple_use.
11500 (vect_get_loop_based_defs): Remove dt argument and update call
11501 to vect_get_vec_def_for_stmt_copy.
11502 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
11503 and vect_get_vec_def_for_stmt_copy.
11504 (vectorizable_load): Update calls to vect_build_gather_load_calls
11505 and vect_get_vec_def_for_stmt_copy.
11506 * tree-vect-loop.c (vect_create_epilog_for_reduction)
11507 (vectorizable_reduction, vectorizable_live_operation): Update calls
11508 to vect_get_vec_def_for_stmt_copy.
11510 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11512 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
11513 and gimple stmt arguments with a stmt_vec_info.
11514 (vect_record_base_alignments): Update calls accordingly.
11515 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
11516 and gimple stmt arguments with a stmt_vec_info.
11517 (vect_build_slp_tree_1): Remove vinfo argument and update call
11518 to vect_record_max_nunits.
11519 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
11520 and vect_record_max_nunits.
11522 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11524 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
11525 file and take a stmt_vec_info instead of a gimple stmt.
11526 (supportable_widening_operation, vect_finish_replace_stmt)
11527 (vect_finish_stmt_generation, vect_get_store_rhs)
11528 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
11529 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
11530 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
11531 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
11532 (vect_create_data_ref_ptr, bump_vector_ptr)
11533 (vect_permute_store_chain, vect_setup_realignment)
11534 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
11535 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
11536 (vectorizable_reduction, vectorizable_induction)
11537 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
11538 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
11539 than gimple stmts as arguments.
11540 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
11541 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
11542 (can_group_stmts_p, vect_check_gather_scatter)
11543 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
11544 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
11545 (vect_permute_load_chain, vect_shift_permute_load_chain)
11546 (vect_transform_grouped_load)
11547 (vect_record_grouped_load_vectors): Likewise.
11548 * tree-vect-loop.c (vect_fixup_reduc_chain)
11549 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
11550 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
11551 (vectorizable_reduction, vectorizable_induction)
11552 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
11553 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
11554 (vect_get_load_store_mask): Likewise.
11555 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
11556 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
11557 * tree-vect-stmts.c (vect_mark_relevant)
11558 (is_simple_and_all_uses_invariant)
11559 (exist_non_indexing_operands_for_use_p, process_use)
11560 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
11561 (vect_get_vec_def_for_operand, vect_get_vec_defs)
11562 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
11563 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
11564 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
11565 (get_negative_load_store_type, get_load_store_type)
11566 (vect_check_load_store_mask, vect_check_store_rhs)
11567 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
11568 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
11569 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
11570 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
11571 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
11572 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
11573 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
11574 (supportable_widening_operation): Likewise.
11576 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11578 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
11579 a stmt_vec_info instead of a gcall.
11580 (vect_check_gather_scatter): Update call accordingly.
11581 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
11583 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
11584 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
11585 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
11586 instead of a gimple stmt.
11587 (vect_transform_loop): Update calls accordingly.
11588 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
11589 stmt_vec_infos instead of gimple stmts.
11590 (vect_analyze_slp_instance): Update use accordingly.
11591 * tree-vect-stmts.c (read_vector_array, write_vector_array)
11592 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
11593 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
11594 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
11595 (vect_gen_widened_results_half, vect_get_loop_based_defs)
11596 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
11597 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
11598 down to subroutines.
11600 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11602 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
11603 of the worklist from a vector of gimple stmts to a vector of
11605 * tree-vect-stmts.c (vect_mark_relevant, process_use)
11606 (vect_mark_stmts_to_be_vectorized): Likewise
11608 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11610 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
11611 statement before passing it to vect_analyze_stmt.
11612 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
11613 the chain of phi vector definitions. Track the exit phi via its
11615 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
11616 STMT_VINFO_REDUC_DEF.
11617 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
11618 stmt_vec_infos to handle the statement chains.
11619 (vect_get_slp_defs): Record the first statement in the node
11620 using a stmt_vec_info.
11621 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
11622 statements here and pass their stmt_vec_info down to subroutines.
11623 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
11624 down to vect_finish_stmt_generation.
11625 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
11626 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
11627 stmt_vec_infos to subroutines.
11628 (vect_remove_stores): Use stmt_vec_infos to handle the statement
11631 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11633 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
11634 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
11635 (vect_permute_store_chain, vect_setup_realignment)
11636 (vect_permute_load_chain, vect_shift_permute_load_chain)
11637 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
11638 stmts internally, and when passing values to other vectorizer routines.
11639 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
11640 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
11641 (vect_analyze_loop_operations, get_initial_def_for_reduction)
11642 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
11643 (vectorizable_reduction, vectorizable_induction)
11644 (vectorizable_live_operation, vect_transform_loop_stmt)
11645 (vect_transform_loop): Likewise.
11646 * tree-vect-patterns.c (vect_reassociating_reduction_p)
11647 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
11648 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
11649 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
11650 (vect_slp_analyze_node_operations_1): Likewise.
11651 * tree-vect-stmts.c (vect_mark_relevant, process_use)
11652 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
11653 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
11654 (vect_finish_stmt_generation_1, get_group_load_store_type)
11655 (get_load_store_type, vect_build_gather_load_calls)
11656 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
11657 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
11658 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
11659 (vectorizable_store, vectorizable_load, vectorizable_condition)
11660 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
11661 (supportable_widening_operation): Likewise.
11662 (vect_get_vector_types_for_stmt): Likewise.
11663 * tree-vectorizer.h (vect_dr_behavior): Likewise.
11665 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11667 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
11668 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
11669 (vect_permute_store_chain, vect_permute_load_chain)
11670 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
11671 repeated stmt_vec_info lookups.
11672 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
11673 (vect_update_ivs_after_vectorizer): Likewise.
11674 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
11675 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
11676 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
11677 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
11678 (vect_bb_slp_scalar_cost): Likewise.
11679 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
11681 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11683 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
11684 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
11685 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
11686 to get gassigns and gcalls, rather than operating on generc gimple
11688 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
11689 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
11690 (vectorizable_load, vect_analyze_stmt): Likewise.
11691 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
11693 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11695 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
11696 return stmt_vec_infos rather than gimple stmts. Do not accept
11698 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
11700 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
11701 Update use of get_later_stmt.
11702 (vect_get_constant_vectors): Update call accordingly.
11703 (vect_schedule_slp_instance): Likewise
11704 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
11705 (vect_slp_analyze_instance_dependence): Likewise.
11706 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
11708 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11710 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
11711 (stmt_info_for_cost::stmt_info): ...this new field.
11712 (add_stmt_costs): Update accordingly.
11713 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
11714 (vect_get_known_peeling_cost): Likewise.
11715 (vect_estimate_min_profitable_iters): Likewise.
11716 * tree-vect-stmts.c (record_stmt_cost): Likewise.
11718 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11720 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
11721 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
11722 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
11724 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
11726 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11728 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
11729 a gimple stmt to a stmt_vec_info.
11730 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
11732 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11734 * tree-vectorizer.h (vec_info::grouped_stores): Change from
11735 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
11736 (_loop_vec_info::reduction_chains): Likewise.
11737 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
11739 * tree-vect-slp.c (vect_analyze_slp): Likewise.
11741 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11743 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
11744 a gimple stmt to a stmt_vec_info.
11745 (_stmt_vec_info::next_element): Likewise.
11746 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
11747 (vect_slp_analyze_and_verify_node_alignment)
11748 (vect_analyze_group_access_1, vect_analyze_group_access)
11749 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
11750 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
11751 (vect_supportable_dr_alignment): Update accordingly.
11752 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
11753 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
11754 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
11755 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
11756 * tree-vect-slp.c (vect_build_slp_tree_1)
11757 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
11758 (vect_split_slp_store_group, vect_analyze_slp_instance)
11759 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
11760 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
11761 (get_group_load_store_type, get_load_store_type)
11762 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
11763 (vect_transform_stmt, vect_remove_stores): Likewise.
11765 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11767 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
11768 than a gimple stmt.
11769 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
11770 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
11771 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
11772 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
11773 (vector_alignment_reachable_p, vect_get_data_access_cost)
11774 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
11775 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
11776 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
11777 (vect_analyze_group_access_1, vect_analyze_group_access)
11778 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
11779 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
11780 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
11781 result of vect_dr_stmt and use the stmt_vec_info instead of
11782 the associated gimple stmt.
11783 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
11784 (vect_gen_prolog_loop_niters): Likewise.
11785 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
11787 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11789 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
11790 to a vec<stmt_vec_info>.
11791 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
11792 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
11793 vec<stmt_vec_info>.
11794 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
11795 to a vec<stmt_vec_info>.
11796 (bst_traits::value_type, bst_traits::value_type): Likewise.
11797 (bst_traits::hash): Update accordingly.
11798 (vect_get_and_check_slp_defs): Change the stmts parameter from
11799 a vec<gimple *> to a vec<stmt_vec_info>.
11800 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
11801 (vect_build_slp_tree): Likewise.
11802 (vect_build_slp_tree_2): Likewise. Update uses of
11803 SLP_TREE_SCALAR_STMTS.
11804 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
11805 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
11806 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
11807 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
11808 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
11809 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
11810 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
11811 (vect_get_constant_vectors, vect_get_slp_defs)
11812 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
11813 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
11814 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
11815 instead of gimple stmts.
11816 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
11817 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
11818 (vect_slp_analyze_instance_dependence): Update uses of
11819 SLP_TREE_SCALAR_STMTS.
11820 (vect_slp_analyze_and_verify_node_alignment): Likewise.
11821 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
11822 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
11823 (get_initial_defs_for_reduction): Likewise.
11824 (vect_create_epilog_for_reduction): Likewise.
11825 (vectorize_fold_left_reduction): Likewise.
11826 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
11827 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
11828 (can_vectorize_live_stmts): Likewise.
11830 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11832 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
11833 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
11834 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
11836 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
11838 (gather_scalar_reductions): Update after above interface changes.
11839 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
11840 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
11842 (vect_force_simple_reduction): Likewise.
11843 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
11844 LOOP_VINFO_REDUCTIONS.
11845 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
11847 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11849 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
11850 a gimple stmt to a stmt_vec_info.
11851 * tree-vect-loop.c (vect_active_double_reduction_p)
11852 (vect_force_simple_reduction, vectorizable_reduction): Update
11855 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11857 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
11858 vec<gimple *> to a vec<stmt_vec_info>.
11859 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
11860 the reduction_phis argument from a vec<gimple *> to a
11861 vec<stmt_vec_info>.
11862 (vectorizable_reduction): Likewise the phis local variable that
11863 is passed to vect_create_epilog_for_reduction. Update for new type
11864 of SLP_TREE_VEC_STMTS.
11865 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
11866 (vectorizable_live_operation): Likewise.
11867 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
11868 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
11870 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11872 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
11873 a gimple stmt to a stmt_vec_info.
11874 (vectorizable_condition, vectorizable_live_operation)
11875 (vectorizable_reduction, vectorizable_induction): Pass back the
11876 vectorized statement as a stmt_vec_info.
11877 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
11878 use of STMT_VINFO_VEC_STMT.
11879 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
11880 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
11881 as stmt_vec_infos rather than gimple stmts.
11882 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
11883 to a stmt_vec_info.
11884 (vectorizable_live_operation): Likewise.
11885 (vectorizable_reduction, vectorizable_induction): Likewise,
11886 updating use of STMT_VINFO_VEC_STMT.
11887 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
11888 of STMT_VINFO_VEC_STMT.
11889 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
11890 (vectorizable_simd_clone_call, vectorizable_conversion)
11891 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
11892 (vectorizable_store, vectorizable_load, vectorizable_condition)
11893 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
11894 from a gimple stmt to a stmt_vec_info.
11895 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
11896 pointer to a stmt_vec_info to the vectorizable_* routines.
11898 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11900 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
11901 a gimple stmt to a stmt_vec_info.
11902 (is_pattern_stmt_p): Update accordingly.
11903 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
11904 (vect_record_grouped_load_vectors): Likewise.
11905 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
11906 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
11907 (vect_model_reduction_cost): Likewise.
11908 (vect_create_epilog_for_reduction): Likewise.
11909 (vectorizable_reduction, vectorizable_induction): Likewise.
11910 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
11911 Return the stmt_vec_info for the pattern statement.
11912 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
11913 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
11914 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
11915 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
11916 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
11917 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
11918 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
11919 (free_stmt_vec_info, vect_is_simple_use): Likewise.
11921 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11923 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
11924 (vect_finish_stmt_generation): Likewise.
11925 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
11926 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
11927 (vect_build_gather_load_calls): Use the return value of the above
11928 functions instead of a separate call to vinfo_for_stmt. Use narrow
11929 scopes for the input gimple stmt and wider scopes for the associated
11930 stmt_vec_info. Use vec_info::lookup_def when setting these
11931 stmt_vec_infos from an SSA_NAME definition.
11932 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
11933 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
11934 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
11935 (vectorizable_store, vectorizable_load, vectorizable_condition)
11936 (vectorizable_comparison): Likewise.
11937 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
11938 (vectorizable_reduction): Likewise.
11940 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11942 * tree-vectorizer.h (vect_is_simple_use): Add an optional
11943 stmt_vec_info * parameter before the optional gimple **.
11944 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
11945 (process_use, vect_get_vec_def_for_operand_1): Update callers.
11946 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
11947 * tree-vect-loop.c (vectorizable_reduction): Likewise.
11948 (vectorizable_live_operation): Likewise.
11949 * tree-vect-patterns.c (type_conversion_p): Likewise.
11950 (vect_look_through_possible_promotion): Likewise.
11951 (vect_recog_rotate_pattern): Likewise.
11952 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
11954 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11956 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
11957 a typedef to a wrapper class.
11958 (NULL_STMT_VEC_INFO): New macro.
11959 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
11960 (stmt_vec_info::operator*): New function.
11961 (stmt_vec_info::operator gimple *): Likewise.
11962 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
11963 (add_stmt_costs): Likewise.
11964 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
11965 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
11966 (vect_get_known_peeling_cost): Likewise.
11967 (vect_estimate_min_profitable_iters): Likewise.
11968 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
11969 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
11970 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
11971 (vectorizable_store, free_stmt_vec_infos): Likewise.
11972 (new_stmt_vec_info): Change return type of xcalloc to
11975 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11977 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
11978 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
11979 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
11980 a single_imm_use-based sequence.
11981 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
11983 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11985 * tree-vectorizer.h (vec_info::lookup_def): Declare.
11986 * tree-vectorizer.c (vec_info::lookup_def): New function.
11987 * tree-vect-patterns.c (vect_get_internal_def): Use it.
11988 (vect_widened_op_tree): Likewise.
11989 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
11990 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
11991 (vectorizable_reduction): Likewise.
11992 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
11994 (vect_is_slp_reduction): Update calls accordingly. Use
11995 vec_info::lookup_def.
11996 (vect_is_simple_reduction): Likewise
11997 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
11999 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12001 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
12002 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
12003 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
12005 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
12006 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
12007 (vect_update_vf_for_slp, vect_analyze_loop_operations)
12008 (vect_is_slp_reduction, vectorizable_induction)
12009 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
12010 * tree-vect-patterns.c (vect_init_pattern_stmt):
12011 (vect_determine_min_output_precision_1, vect_determine_precisions)
12012 (vect_pattern_recog): Likewise.
12013 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
12014 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
12015 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
12016 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
12017 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
12018 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
12019 info field from a loop to a loop_vec_info.
12021 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12023 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
12024 (vec_info::add_stmt): Declare.
12025 * tree-vectorizer.c (vec_info::add_stmt): New function.
12026 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
12027 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
12028 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
12029 (vectorizable_induction): Likewise.
12030 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
12031 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
12032 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
12033 (vectorizable_load): Likewise.
12034 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
12035 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
12036 (vect_recog_gather_scatter_pattern): Likewise.
12037 (append_pattern_def_seq): Likewise. Remove a check that is
12038 performed by add_stmt itself.
12040 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12042 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
12043 which make_ssa_name was called with new_stmt before new_stmt
12046 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12048 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
12050 (vect_is_slp_reduction): ...here...
12051 (vect_is_simple_reduction): ...and here. Remove repetition of tests
12052 that are already known to be false.
12054 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12056 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
12057 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
12058 STMT_VINFO_NUM_SLP_USES when it's true.
12059 (vect_free_slp_instance): Add a final_p parameter and pass it to
12060 vect_free_slp_tree.
12061 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
12062 (vect_analyze_slp_instance): Likewise.
12063 (vect_slp_analyze_operations): Likewise.
12064 (vect_slp_analyze_bb_1): Likewise.
12065 * tree-vectorizer.c (vec_info): Likewise.
12066 * tree-vect-loop.c (vect_transform_loop): Likewise.
12068 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12070 * tree-vect-loop.c (vectorizable_reduction): Assert that the
12071 function is not called for second and subsequent members of
12074 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12076 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
12077 cases for nested loops from here to ...
12078 (vect_create_epilog_for_reduction): ...here. Only call
12079 vect_is_simple_use for inner-loop reductions.
12081 2018-07-31 Martin Liska <mliska@suse.cz>
12083 PR gcov-profile/85338
12084 PR gcov-profile/85350
12085 PR gcov-profile/85372
12086 * profile.c (struct location_triplet): New.
12087 (struct location_triplet_hash): Likewise.
12088 (output_location): Do not output a BB that
12089 is already recorded for a line.
12090 (branch_prob): Use streamed_locations.
12092 2018-07-31 Martin Liska <mliska@suse.cz>
12094 PR gcov-profile/85370
12095 * coverage.c (coverage_begin_function): Do not mark target
12096 clones as artificial functions.
12098 2018-07-31 Martin Liska <mliska@suse.cz>
12100 PR gcov-profile/83813
12101 PR gcov-profile/84758
12102 PR gcov-profile/85217
12103 PR gcov-profile/85332
12104 * profile.c (branch_prob): Do not record GOTO expressions
12105 for GIMPLE statements which locations are already streamed.
12107 2018-07-31 Olivier Hainque <hainque@adacore.com>
12109 * gcc.c (handle_spec_function): Accept a soft_matched_part
12110 argument, as do_spec_1. Pass it down to ...
12111 (eval_spec_function): Accept a soft_matched_part argument,
12112 and pass it down to ...
12113 (do_spec_2): Accept a soft_matched_part argument, and pass
12114 it down to do_spec_1.
12115 (do_spec_1): Pass soft_matched_part to handle_spec_function.
12116 (handle_braces): Update call to handle_spec_function.
12117 (driver::set_up_specs): Update calls to do_spec_2.
12118 (compare_debug_dump_opt_spec_function): Likewise.
12119 (compare_debug_self_opt_spec_function): Likewise.
12121 2018-07-31 Olivier Hainque <hainque@adacore.com>
12123 * common.opt (nolibc): New option.
12124 * doc/invoke.texi (Link Options): Document it.
12125 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
12126 * config/alpha/linux.h: Likewise.
12127 * config/arc/elf.h: Likewise.
12128 * config/arm/uclinux-elf.h: Likewise.
12129 * config/arm/unknown-elf.h: Likewise.
12130 * config/avr/avrlibc.h: Likewise.
12131 * config/bfin/bfin.h: Likewise.
12132 * config/bfin/linux.h: Likewise.
12133 * config/bfin/uclinux.h: Likewise.
12134 * config/darwin.h: Likewise.
12135 * config/darwin10.h: Likewise.
12136 * config/darwin12.h: Likewise.
12137 * config/gnu-user.h: Likewise.
12138 * config/lm32/uclinux-elf.h: Likewise.
12139 * config/pa/pa-hpux11.h: Likewise.
12140 * config/pa/pa64-hpux.h: Likewise.
12141 * config/sparc/sparc.h: Likewise.
12143 2018-07-31 Olivier Hainque <hainque@adacore.com>
12145 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
12146 undefined variables.
12148 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
12151 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
12152 instead of GEN_INT.
12154 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
12156 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
12157 terminated string literal.
12159 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
12161 PR rtl-optimization/85160
12162 * combine.c (is_just_move): New function.
12163 (try_combine): Allow combining two instructions into two if neither of
12164 the original instructions was a move.
12166 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
12169 * doc/extend.texi (Global Register Variables): Discourage use of type
12171 (Local Register Variables): Likewise.
12173 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
12175 PR tree-optimization/86506
12176 * hwint.h (ceil_log2): Resync with hwint.c implementation.
12178 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
12181 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
12182 hard_regno, make sure no insn between `from` and `to` clobbers it.
12184 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
12185 Tom de Vries <tdevries@suse.de>
12187 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
12188 (PTX_DEFAULT_RUNTIME_DIM): ... this.
12189 (nvptx_goacc_validate_dims): Set default worker and gang dims to
12190 PTX_DEFAULT_RUNTIME_DIM.
12191 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
12193 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
12195 * config/pa/pa.c (pa_output_addr_vec): Align address table.
12196 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
12197 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
12199 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
12201 * config/rs6000/constraints.md (wG constraint): Delete, no longer
12203 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
12204 predicate to reflect toc fusion has been deleted.
12205 (toc_fusion_mem_raw): Delete, no longer used.
12206 (toc_fusion_mem_wrapped): Likewise.
12207 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
12209 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
12210 Delete, no longer used.
12211 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
12212 meant to be used for toc fusion.
12213 (rs6000_debug_print_mode): Delete toc fusion debugging.
12214 (rs6000_debug_reg_global): Likewise.
12215 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
12216 fusion and secondary reload support that were never used.
12217 (rs6000_option_override_internal): Delete TOC fusion, that was only
12218 partially defined, and it did not work unless you also used the
12220 (rs6000_legitimate_address_p): Delete TOC fusion support.
12221 (rs6000_opt_masks): Likewise.
12222 (fusion_wrap_memory_address): Delete function, no longer used.
12223 (fusion_split_address); Delete TOC fusion support.
12224 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
12225 longer used with toc fusion being deleted.
12226 (TARGET_TOC_FUSION_FP): Likewise.
12227 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
12229 (toc fusion spliter): Delete TOC fusion support.
12230 (toc_fusionload_<mode>): Likewise.
12231 (toc_fusionload_di): Likewise.
12232 (fusion_gpr_load_<mode>): Delete generator function, this insn no
12233 longer needs to be named. Rename predicate to delete TOC fusion.
12234 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
12235 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
12236 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
12237 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
12238 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
12240 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
12242 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
12243 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
12244 __int128 in built-in function prototypes.
12245 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
12246 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
12248 2018-07-27 Martin Sebor <msebor@redhat.com>
12250 PR tree-optimization/86696
12251 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
12252 types, including enums.
12253 (handle_char_store): Be prepared for the above function to fail.
12255 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
12257 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
12258 when optimization level is lower than 2 or optimize for size.
12260 2018-07-26 Martin Sebor <msebor@redhat.com>
12262 PR tree-optimization/86043
12263 PR tree-optimization/86042
12264 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
12265 (get_string_cst_length): Rename...
12266 (get_min_string_length): ...to this. Add argument.
12267 (handle_char_store): Extend to handle multi-character stores by
12269 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
12270 * tree.h (initializer_zerop): Add argument.
12272 2018-07-26 Jakub Jelinek <jakub@redhat.com>
12274 PR middle-end/86660
12275 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
12276 declare target to variables if they have always,{to,from,tofrom} map
12279 2018-07-26 Martin Liska <mliska@suse.cz>
12282 * lto-wrapper.c: Add linker_output as prefix
12283 for ltrans_output_file.
12285 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
12287 PR rtl-optimization/85805
12288 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
12289 value for hard registers if that was written in the same mode.
12291 2018-07-26 Martin Liska <mliska@suse.cz>
12293 PR gcov-profile/86536
12294 * gcov.c (format_gcov): Use printf format %.*f directly
12295 and do not handle special values.
12297 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
12299 * common/config/arc/arc-common.c (arc_option_optimization_table):
12300 Update default optimizations for size.
12302 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
12304 * config/arc/arc.md (movsf_insn): Add short instruction selection.
12305 * config/arc/constraints.md (CfZ): New constraint.
12306 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
12307 (subsf3_fpu): Likewise.
12308 (cmpsf_fpu): Likewise.
12309 (cmpsf_fpu_uneq): Likewise.
12311 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
12313 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
12315 (arc_is_uncached_mem_p): uncached applies to both the variable and
12318 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
12320 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
12323 2018-07-25 David Malcolm <dmalcolm@redhat.com>
12325 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
12326 field "m_scopes" from vec to auto_vec.
12328 2018-07-25 Martin Liska <mliska@suse.cz>
12330 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
12333 2018-07-25 Richard Biener <rguenther@suse.de>
12336 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
12337 special wrt context_die late.
12338 (gen_subprogram_die): Re-use DIEs in local scope.
12340 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
12342 PR tree-optimization/86644
12343 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
12345 2018-07-25 Martin Liska <mliska@suse.cz>
12347 PR middle-end/86645
12348 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
12349 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
12351 2018-07-25 Martin Liska <mliska@suse.cz>
12354 * params.def: Explain ASan abbreviation and provide
12355 a documentation link.
12357 2018-07-24 Martin Sebor <msebor@redhat.com>
12359 PR tree-optimization/86622
12360 PR tree-optimization/86532
12361 * builtins.h (string_length): Declare.
12362 * builtins.c (c_strlen): Correct handling of non-constant offsets.
12363 (check_access): Be prepared for non-constant length ranges.
12364 (string_length): Make extern.
12365 * expr.c (string_constant): Only handle the minor non-constant
12366 array index. Use string_constant to compute the length of
12367 a generic string constant.
12369 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
12371 PR tree-optimization/86618
12372 * tree-vect-stmts.c (vectorizable_call): Don't take the address
12373 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
12375 2018-07-24 David Malcolm <dmalcolm@redhat.com>
12377 PR tree-optimization/86636
12378 * json.cc (json::object::set): Fix comment. Add assertions.
12379 (json::array::append): Move here from json.h. Add comment and an
12381 (json::string::string): Likewise.
12382 * json.h (json::array::append): Move to json.cc.
12383 (json::string::string): Likewise.
12384 * optinfo-emit-json.cc
12385 (optrecord_json_writer::impl_location_to_json): Assert that we
12386 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
12387 wrapper around it. Expand the location once, rather than three
12389 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
12390 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
12392 (optrecord_json_writer::optinfo_to_json): Likewise, in four
12393 places. Fix some overlong lines.
12395 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
12397 * config/aarch64/aarch64-simd.md
12398 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
12399 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
12400 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
12401 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
12402 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
12403 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
12404 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
12405 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
12406 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
12408 2018-07-24 Jakub Jelinek <jakub@redhat.com>
12410 PR middle-end/86627
12411 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
12412 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
12413 and abs_d == d, do the power of two handling if profitable.
12415 2018-07-24 Richard Biener <rguenther@suse.de>
12417 * match.pd: Add BIT_FIELD_REF canonicalizations.
12419 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
12422 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
12424 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
12426 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
12427 terminated STRING_CST object.
12429 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
12431 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
12433 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
12435 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
12436 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
12437 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
12438 the elements into a register.
12439 (rs6000_split_v4si_init_di_reg): Delete.
12440 (rs6000_split_v4si_init): Delete.
12441 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
12442 (vsx_init_v4si): Rewrite as a define_expand.
12444 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
12446 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
12447 zero_extend argument from memory): New.
12449 2018-07-22 Martin Sebor <msebor@redhat.com>
12452 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
12453 diagnosing calls with unknown arguments unless -Walloca-larger-than
12454 is restricted to less than PTRDIFF_MAX bytes.
12456 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
12458 * doc/gcov.texi (Invoking Gcov): Editorial changes.
12460 2018-07-20 David Malcolm <dmalcolm@redhat.com>
12462 * pretty-print.c (text_info::set_location): Remove redundant
12463 "line_table" parameter from call to rich_location::set_range.
12465 2018-07-20 Martin Sebor <msebor@redhat.com>
12467 PR middle-end/82063
12468 * builtins.c (expand_builtin_alloca): Adjust.
12469 * calls.c (alloc_max_size): Simplify.
12470 * cgraphunit.c (cgraph_node::expand): Adjust.
12471 * common.opt (larger_than_size, warn_frame_larger_than): Remove
12473 (frame_larger_than_size): Same.
12474 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
12475 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
12477 * doc/invoke.texi (GCC Command Options): Document option arguments.
12478 Explain byte-size arguments and suffixes.
12479 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
12480 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
12481 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
12482 * doc/options.texi (UInteger): Expand.
12483 (Host_Wide_Int, ByteSize): Document new properties.
12484 * final.c (final_start_function_1): Include sizes in an error message.
12485 * function.c (frame_offset_overflow): Same.
12486 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
12487 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
12488 Diagnose unbounded alloca calls only for limits of less than
12490 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
12491 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
12493 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
12494 only for limits of less than PTRDIFF_MAX.
12495 * langhooks-def.h (lhd_handle_option): Change function argument
12497 * langhooks.c (lhd_handle_option): Same.
12498 * langhooks.h (handle_option): Same.
12499 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
12501 (var_type, var_type_struct): Same.
12502 (var_set): Handle ByteSize flag.
12503 * optc-gen.awk: Add comments to output to ease debugging. Make
12504 use of HOST_WIDE_INT where appropriate.
12505 * opts-gen-save.awk: Use %lx to format unsigned long.
12506 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
12507 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
12508 arguments. Parse bytes-size suffixes.
12509 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
12510 (enum_value_to_arg): Same.
12511 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
12512 (handle_option): Adjust.
12513 (generate_option): Change function argument to HOST_WIDE_INT.
12514 (cmdline_handle_error): Adjust.
12515 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
12516 (set_option): Change function argument to HOST_WIDE_INT.
12517 (option_enabled): Handle cl_host_wide_int.
12518 (get_option_state): Handle CLVC_SIZE.
12519 (control_warning_option): Same.
12520 * opts.c (common_handle_option): Change function argument to
12521 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
12522 OPT_Wvla_larger_than_.
12523 * opts.h (enum cl_var_type): Add an enumerator.
12524 * stor-layout.c (layout_decl): Print a more meaningful warning.
12525 * toplev.c (output_stack_usage): Adjust.
12527 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
12529 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
12530 call to inline_expand_builtin_string_cmp.
12531 (expand_builtin_strcmp): Likewise.
12532 (expand_builtin_strncmp): Likewise.
12533 (inline_string_cmp): Delete the last parameter, change char_type_node
12534 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
12536 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
12537 the inlining expansion on target where the type of the call has same or
12538 narrower precision than unsigned char.
12540 2018-07-20 David Malcolm <dmalcolm@redhat.com>
12542 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
12543 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
12544 * common.opt (fsave-optimization-record): New option.
12545 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
12546 * doc/invoke.texi (-fsave-optimization-record): New option.
12547 * dumpfile.c: Include "optinfo-emit-json.h".
12548 (struct kv_pair): Move to coretypes.h.
12549 (optgroup_options): Make non-static.
12550 (dump_context::end_scope): Call
12551 optimization_records_maybe_pop_dump_scope.
12552 * dumpfile.h (optgroup_options): New decl.
12553 * json.cc: New file.
12554 * json.h: New file.
12555 * optinfo-emit-json.cc: New file.
12556 * optinfo-emit-json.h: New file.
12557 * optinfo.cc: Include "optinfo-emit-json.h".
12558 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
12559 (optinfo_enabled_p): Check optimization_records_enabled_p.
12560 (optinfo_wants_inlining_info_p): Likewise.
12561 * optinfo.h: Update comment.
12562 * profile-count.c (profile_quality_as_string): New function.
12563 * profile-count.h (profile_quality_as_string): New decl.
12564 (profile_count::quality): New accessor.
12565 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
12566 and optinfo_emit_json_cc_tests.
12567 * selftest.h (selftest::json_cc_tests): New decl.
12568 (selftest::optinfo_emit_json_cc_tests): New decl.
12569 * toplev.c: Include "optinfo-emit-json.h".
12570 (compile_file): Call optimization_records_finish.
12571 (do_compile): Call optimization_records_start.
12572 * tree-ssa-live.c: Include optinfo.h.
12573 (remove_unused_scope_block_p): Retain inlining information if
12574 optinfo_wants_inlining_info_p returns true.
12576 2018-07-20 Richard Biener <rguenther@suse.de>
12579 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
12580 to cover -flto-partition=none.
12582 2018-07-20 Martin Liska <mliska@suse.cz>
12584 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
12585 (get_decl_source_range): Remove unused function.
12587 2018-07-20 Richard Biener <rguenther@suse.de>
12589 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
12590 (struct vn_phi_s): Likewise.
12591 (struct vn_reference_s): Likewise.
12592 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
12593 for searching the slot of an entry known to be in the hash itself.
12594 (vn_phi_hasher::equal): Likewise.
12595 (vn_reference_hasher::equal): Likewise.
12596 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
12598 (optimistic_info, current_info): Remove, keeping only valid_info.
12599 (vn_reference_lookup_1): Remove fallback lookup.
12600 (vn_reference_lookup_2): Likewise.
12601 (vn_nary_op_lookup_1): Likewise.
12602 (vn_phi_lookup): Likewise.
12603 (vn_nary_build_or_lookup_1): Make sure to not chain the built
12605 (vn_reference_insert): Adjust, chain the inserted hash element
12606 at last_inserted_ref.
12607 (vn_reference_insert_pieces): Likewise.
12608 (visit_reference_op_call): Likewise.
12609 (vn_nary_op_insert_into): Chain the inserted hash element at
12610 last_inserted_nary.
12611 (vn_nary_op_insert_pieces): Adjust.
12612 (vn_nary_op_insert): Likewise.
12613 (vn_nary_op_insert_stmt): Likewise.
12614 (vn_phi_insert): Adjust, chain the inserted hash element at
12616 (process_scc): Remove clearing and copying the optimistic
12617 table. Instead remove elements inserted during an optimistic
12618 iteration from the single table we maintain.
12619 (init_scc_vn): Adjust.
12620 (free_scc_vn): Likewise.
12621 (sccvn_dom_walker::record_cond): Likewise.
12622 (sccvn_dom_walker::after_dom_children): Likewise.
12624 2018-07-19 Martin Sebor <msebor@redhat.com>
12626 PR tree-optimization/84047
12627 PR tree-optimization/83776
12628 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
12629 (check_array_bounds): Call it.
12631 2018-07-19 Martin Sebor <msebor@redhat.com>
12633 * align.h (align_flags): Use member initialization.
12635 2018-07-19 David Malcolm <dmalcolm@redhat.com>
12637 * Makefile.in (OBJS): Add optinfo.o.
12638 * coretypes.h (class symtab_node): New forward decl.
12639 (struct cgraph_node): New forward decl.
12640 (class varpool_node): New forward decl.
12641 * dump-context.h: New file.
12642 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
12644 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
12645 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
12646 (set_alt_dump_file): Likewise.
12647 (dump_context::~dump_context): New dtor.
12648 (dump_gimple_stmt): Move implementation to...
12649 (dump_context::dump_gimple_stmt): ...this new member function.
12650 Add the stmt to any pending optinfo, creating one if need be.
12651 (dump_gimple_stmt_loc): Move implementation to...
12652 (dump_context::dump_gimple_stmt_loc): ...this new member function.
12653 Start a new optinfo and add the stmt to it.
12654 (dump_gimple_expr): Move implementation to...
12655 (dump_context::dump_gimple_expr): ...this new member function.
12656 Add the stmt to any pending optinfo, creating one if need be.
12657 (dump_gimple_expr_loc): Move implementation to...
12658 (dump_context::dump_gimple_expr_loc): ...this new member function.
12659 Start a new optinfo and add the stmt to it.
12660 (dump_generic_expr): Move implementation to...
12661 (dump_context::dump_generic_expr): ...this new member function.
12662 Add the tree to any pending optinfo, creating one if need be.
12663 (dump_generic_expr_loc): Move implementation to...
12664 (dump_context::dump_generic_expr_loc): ...this new member
12665 function. Add the tree to any pending optinfo, creating one if
12667 (dump_printf): Move implementation to...
12668 (dump_context::dump_printf_va): ...this new member function. Add
12669 the text to any pending optinfo, creating one if need be.
12670 (dump_printf_loc): Move implementation to...
12671 (dump_context::dump_printf_loc_va): ...this new member function.
12672 Start a new optinfo and add the stmt to it.
12673 (dump_dec): Move implementation to...
12674 (dump_context::dump_dec): ...this new member function. Add the
12675 value to any pending optinfo, creating one if need be.
12676 (dump_context::dump_symtab_node): New member function.
12677 (dump_context::get_scope_depth): New member function.
12678 (dump_context::begin_scope): New member function.
12679 (dump_context::end_scope): New member function.
12680 (dump_context::ensure_pending_optinfo): New member function.
12681 (dump_context::begin_next_optinfo): New member function.
12682 (dump_context::end_any_optinfo): New member function.
12683 (dump_context::s_current): New global.
12684 (dump_context::s_default): New global.
12685 (dump_scope_depth): Delete global.
12686 (dumpfile_ensure_any_optinfo_are_flushed): New function.
12687 (dump_symtab_node): New function.
12688 (get_dump_scope_depth): Reimplement in terms of dump_context.
12689 (dump_begin_scope): Likewise.
12690 (dump_end_scope): Likewise.
12691 (selftest::temp_dump_context::temp_dump_context): New ctor.
12692 (selftest::temp_dump_context::~temp_dump_context): New dtor.
12693 (selftest::verify_item): New function.
12694 (ASSERT_IS_TEXT): New macro.
12695 (ASSERT_IS_TREE): New macro.
12696 (ASSERT_IS_GIMPLE): New macro.
12697 (selftest::test_capture_of_dump_calls): New test.
12698 (selftest::dumpfile_c_tests): Call it.
12699 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
12700 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
12701 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
12702 descriptive comment.
12703 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
12704 (dump_node, dump_bb): Move these unrelated decls.
12705 (class dump_manager): Add leading comment.
12706 * optinfo.cc: New file.
12707 * optinfo.h: New file.
12709 2018-07-19 Michael Collison <michael.collison@arm.com>
12710 Richard Henderson <rth@redhat.com>
12712 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
12713 (subti): Handle op1 zero.
12714 (subvti4, usub4ti4): New.
12715 (*sub<GPI>3_compare1_imm): New.
12716 (sub<GPI>3_carryinCV): New.
12717 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
12718 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
12720 2018-07-19 Michael Collison <michael.collison@arm.com>
12721 Richard Henderson <rth@redhat.com>
12723 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
12724 (addti3): Create simpler code if low part is already known to be 0.
12725 (addvti4, uaddvti4): New.
12726 (*add<GPI>3_compareC_cconly_imm): New.
12727 (*add<GPI>3_compareC_cconly): New.
12728 (*add<GPI>3_compareC_imm): New.
12729 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
12730 handle constants within this pattern..
12731 (*add<GPI>3_compareV_cconly_imm): New.
12732 (*add<GPI>3_compareV_cconly): New.
12733 (*add<GPI>3_compareV_imm): New.
12734 (add<GPI>3_compareV): New.
12735 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
12736 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
12737 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
12738 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
12739 with 'comparison' operator.
12740 (*add<GPI>3_compareV_cconly_imm): Ditto.
12741 (*add<GPI>3_compareV_cconly): Ditto.
12742 (*add<GPI>3_compareV_imm): Ditto.
12743 (add<GPI>3_compareV): Ditto.
12744 (add<mode>3_carryinC): Ditto.
12745 (*add<mode>3_carryinC_zero): Ditto.
12746 (*add<mode>3_carryinC): Ditto.
12747 (add<mode>3_carryinV): Ditto.
12748 (*add<mode>3_carryinV_zero): Ditto.
12749 (*add<mode>3_carryinV): Ditto.
12751 2018-07-19 Michael Collison <michael.collison@arm.com>
12752 Richard Henderson <rth@redhat.com>
12754 * config/aarch64/aarch64-modes.def (CC_V): New.
12755 * config/aarch64/aarch64-protos.h
12756 (aarch64_addti_scratch_regs): Declare
12757 (aarch64_subvti_scratch_regs): Declare.
12758 (aarch64_expand_subvti): Declare.
12759 (aarch64_gen_unlikely_cbranch): Declare
12760 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
12761 for signed overflow using CC_Vmode.
12762 (aarch64_get_condition_code_1): Handle CC_Vmode.
12763 (aarch64_gen_unlikely_cbranch): New function.
12764 (aarch64_addti_scratch_regs): New function.
12765 (aarch64_subvti_scratch_regs): New function.
12766 (aarch64_expand_subvti): New function.
12768 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
12770 * config/aarch64/aarch64-option-extensions.def: New entry for profile
12772 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
12773 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
12776 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
12779 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
12780 address check not strict.
12782 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
12784 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
12786 (store_pair_lanes<mode>): Likewise.
12787 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
12788 enum value 'ADDR_QUERY_LDP_STP_N'.
12789 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
12790 (aarch64_print_address_internal): Add declaration.
12791 (aarch64_print_ldpstp_address): Remove.
12792 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
12793 (aarch64_print_operand): Change printing of 'y'.
12794 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
12795 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
12796 'true' rather than '1'.
12797 * config/aarch64/constraints.md (Uml): Likewise.
12798 (Uml): Rename to Umn.
12801 2018-07-19 Richard Biener <rguenther@suse.de>
12803 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
12805 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
12806 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
12807 (vn_reference_hasher): Likewise.
12808 (struct vn_tables_s): Remove obstack and alloc-pool members.
12809 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
12810 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
12811 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
12812 (vn_reference_insert_pieces): Likewise.
12813 (alloc_vn_nary_op_noinit): Adjust.
12814 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
12815 (vn_phi_eq): Adjust.
12816 (shared_lookup_phiargs): Remove.
12817 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
12818 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
12819 (visit_reference_op_call): Likewise.
12820 (copy_nary, copy_phi, copy_reference): Remove.
12821 (process_scc): Rewind the obstack when iterating. Do not
12822 copy the elements to valid_info but just move them from one
12823 hashtable to the other.
12824 (allocate_vn_table): Adjust.
12825 (free_vn_table): Likewise.
12826 (init_scc_vn): Likewise.
12827 (free_scc_vn): Likewise.
12829 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
12832 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
12833 indirect_return as function type attribute.
12834 (ix86_attribute_table): Change indirect_return to function
12836 * doc/extend.texi: Update indirect_return attribute.
12838 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
12840 * wide-int.h (widest2_int): New.
12841 * gimple-fold.c (arith_overflowed_p): Use it.
12842 * tree.h (widest2_int_cst): New.
12843 * tree-vrp.c (wide_int_binop_overflow): Rename from
12844 vrp_int_const_binop.
12845 Rewrite to work on trees.
12846 (extract_range_from_multiplicative_op_1): Abstract code to...
12847 (wide_int_range_min_max): ...here.
12848 (wide_int_range_cross_product): ...and here.
12849 (extract_range_from_binary_expr_1): Abstract overflow code to...
12850 (wide_int_range_mult_wrapping): ...here.
12851 * tree-vrp.h (wide_int_range_cross_product): New.
12852 (wide_int_range_mult_wrapping): New.
12854 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
12855 Julia Koval <julia.koval@intel.com>
12857 * config/i386/x86-tune-costs.h (skylake_memcpy,
12858 skylake_memset): Replace rep_prefix with unrolling for size 512.
12860 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
12862 PR middle-end/86544
12863 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
12864 comparision with EQ_EXPR in last stmt.
12866 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
12868 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
12869 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
12870 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
12871 previously known as "PowerPC AltiVec Built-in Functions". Move
12872 some material to new subsubsections "PowerPC AltiVec Built-in
12873 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
12875 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
12876 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
12877 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
12878 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
12880 2018-07-18 Richard Biener <rguenther@suse.de>
12882 PR tree-optimization/86557
12883 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
12886 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
12888 * config/s390/s390.c (s390_function_profiler): Generate CFI.
12890 2018-07-17 Jeff Law <law@redhat.com>
12892 * config/arm/arm.c (get_label_padding): Update for recent
12893 changes to label_to_alignment.
12895 PR tree-optimization/86010
12896 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
12898 * config/mips/mips.c (vr4130_align_insns): Update for recent
12899 changes to label_to_alignment.
12901 * config/frv/frv.c (frv_label_align): Update for recent changes
12902 to label_to_alignment.
12904 * config/nios2/nios2.c (nios2_label_align): Update for recent
12905 changes which dropped ALIGN_LABELS_LOG.
12907 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
12909 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
12910 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
12912 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
12914 * config/arc/arc.c (arc_label_align): Use align_labels instead of
12915 deprecated align_labels_log.
12917 2018-07-17 Richard Biener <rguenther@suse.de>
12920 * dwarf2out.c (init_sections_and_labels): Always generate
12921 a debug_line_str_section for early LTO debug.
12922 (dwarf2out_finish): Reset debug_line_str_hash output early.
12923 Bump counter for extra dwarf5 .debug_loc labels to not conflict
12925 (dwarf2out_early_finish): Output debug_line_str.
12927 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
12929 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
12930 index register on z196 or later.
12932 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
12934 * config/s390/s390.c (s390_default_align): Set default function
12936 (s390_override_options_after_change): Call s390_default align.
12937 (s390_option_override_internal): Call s390_default_align.
12938 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
12940 2018-07-17 Jakub Jelinek <jakub@redhat.com>
12942 PR middle-end/86542
12943 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
12944 to _looptemp_ clauses, other than the first two.
12946 2018-07-17 Martin Liska <mliska@suse.cz>
12948 * opts.c: Do not enable OPT_falign_* for -Os.
12950 2018-07-17 Martin Liska <mliska@suse.cz>
12952 * align.h (MAX_CODE_ALIGN): New.
12953 (MAX_CODE_ALIGN_VALUE): New.
12954 * common/config/i386/i386-common.c (ix86_handle_option):
12955 (MAX_CODE_ALIGN): Moved to align.h.
12956 * final.c (MAX_CODE_ALIGN): Likewise.
12957 * opts.c (parse_and_check_align_values):
12958 (MAX_CODE_ALIGN): Likewise.
12959 (MAX_CODE_ALIGN_VALUE): Likewise.
12961 2018-07-17 Martin Liska <mliska@suse.cz>
12963 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
12964 in order to fulfil coding style.
12965 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
12966 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
12967 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
12968 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
12969 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
12970 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
12971 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
12972 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
12973 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
12975 2018-07-17 Martin Liska <mliska@suse.cz>
12977 * align.h: New file.
12978 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
12980 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
12981 align_flags of label_to_alignment.
12982 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
12984 * config/m68k/m68k.c: Do not use removed align_labels_value and
12986 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
12987 (LOOP_ALIGN): Likewise.
12988 (LABEL_ALIGN): Likewise.
12989 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
12990 Remove not used macro.
12991 (rs6000_loop_align): Change return type to align_flags.
12992 (rs6000_loop_align_max_skip): Remove.
12993 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
12994 Change return type to align_flags.
12995 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
12996 Remove not used macro.
12997 (rs6000_loop_align): Change return type to align_flags.
12998 (rs6000_loop_align_max_skip): Remove.
12999 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
13000 * config/rx/rx-protos.h (rx_align_for_label): Make it
13002 * config/rx/rx.c (rx_align_for_label): Change return type
13004 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
13006 into align_flags class.
13007 (LABEL_ALIGN): Likewise.
13008 (LOOP_ALIGN): Likewise.
13009 * config/s390/s390.c (s390_label_align): Use align_flags
13011 (s390_asm_output_function_label): Likewise.
13012 * config/sh/sh.c (sh_override_options_after_change):
13013 Use align_flags class directly without macros.
13014 (find_barrier): Likewise.
13015 (barrier_align): Likewise.
13016 (sh_loop_align): Likewise.
13017 * config/spu/spu.c (spu_option_override):
13018 Use align_flags_tuple::get_value instead of removed macros.
13019 (spu_sched_init): Likewise.
13020 * config/spu/spu.h (GTY): Likewise.
13021 * config/visium/visium.c (visium_option_override):
13022 Set "8" as default secondary alignment.
13023 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
13024 in order to guarantee secondary alignment of 8.
13025 * coretypes.h: Include align.h header file.
13026 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
13027 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
13028 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
13029 * doc/tm.texi.in: Likewise.
13030 * final.c (struct label_alignment): Remove not used structure.
13031 (LABEL_ALIGN): Change type to align_flags.
13032 (LOOP_ALIGN): Likewise.
13033 (JUMP_ALIGN): Likewise.
13034 (default_loop_align_max_skip): Remove.
13035 (default_label_align_max_skip): Likewise.
13036 (default_jump_align_max_skip): Likewise.
13037 (default_label_align_after_barrier_max_skip):
13038 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
13039 (LABEL_TO_MAX_SKIP): Remove.
13040 (label_to_alignment): Return align_flags type instead of integer.
13041 (label_to_max_skip): Remove.
13042 (align_fuzz): Use align_flags type.
13043 (compute_alignments): Use align_flags type and use align_flags::max
13044 to combine multiple alignments.
13045 (grow_label_align): Grow vec instead of C array.
13046 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
13047 (shorten_branches): Use align_flags type and use align_flags::max
13048 to combine multiple alignments.
13049 (final_scan_insn_1): Remove usage of secondary alignment that comes
13050 from label alignment, but instead use proper secondary alignment
13051 which is computed in grow_label_align.
13052 * flags.h (struct align_flags_tuple): Move to align.h.
13053 (struct align_flags): Likewise.
13054 (state_align_loops): Rename to align_loops.
13055 (state_align_jumps): Rename to align_jumps.
13056 (state_align_labels): Rename to align_labels.
13057 (state_align_functions): Rename to align_functions.
13058 (align_loops_log): Remove.
13059 (align_jumps_log): Remove.
13060 (align_labels_log): Remove.
13061 (align_functions_log): Remove.
13062 (align_loops_max_skip): Remove.
13063 (align_jumps_max_skip): Remove.
13064 (align_labels_max_skip): Remove.
13065 (align_functions_max_skip): Remove.
13066 (align_loops_value): Remove.
13067 (align_jumps_value): Remove.
13068 (align_labels_value): Remove.
13069 (align_functions_value): Remove.
13070 * output.h (label_to_alignment): Change return type to align_flags.
13071 (label_to_max_skip): Remove.
13072 * target.def: Remove loop_align_max_skip, label_align_max_skip,
13073 jump_align_max_skip macros.
13074 * targhooks.h (default_loop_align_max_skip): Remove.
13075 (default_label_align_max_skip): Likewise.
13076 (default_jump_align_max_skip): Likewise.
13077 (default_label_align_after_barrier_max_skip): Remove.
13078 * toplev.c (read_log_maxskip): Use ::normalize function.
13079 (parse_N_M): Remove not used argument and also call ::normalize.
13080 (parse_alignment_opts): Do not pass unused arguments.
13081 * varasm.c (assemble_start_function): Use directly align_functions
13082 instead of removed macros.
13083 * system.h: Do not poison removed macros.
13085 2018-07-17 Jakub Jelinek <jakub@redhat.com>
13087 PR middle-end/86539
13088 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
13089 and cond temporaries don't have reference type if iterator has
13090 pointer type. For init use &for_pre_body instead of pre_p if
13091 for_pre_body is non-empty.
13093 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
13095 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
13096 double-double modes to SFmode directly directly.
13097 (trunc<mode>sf2_fprs): Delete.
13099 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
13101 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
13102 for conversions between IFmode and the decimal floating point modes.
13103 (init_float128_ieee): Use the correct names for conversions between
13104 KFmode and the decimal floating point modes.
13106 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
13108 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
13109 for the conversions between TDmode and IFmode.
13110 (init_float128_ieee): Use more correct names for the conversions
13111 between TDmode and KFmode.
13113 2018-07-16 Jakub Jelinek <jakub@redhat.com>
13115 PR tree-optimization/86526
13116 * builtins.c (expand_builtin_memcmp): Formatting fixes.
13117 (inline_expand_builtin_string_cmp): Likewise.
13118 (inline_string_cmp): Likewise. Use c_readstr instead of
13119 builtin_memcpy_read_str. Add unit_mode temporary.
13121 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
13123 PR middle-end/86528
13124 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
13125 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
13127 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
13129 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
13130 Alphabetize prototypes of built-in functions, separating out
13131 built-in functions that are listed in this section but should be
13132 described elsewhere.
13134 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
13137 * expmed.c (emit_store_flag): Do not emit setcc followed by a
13138 conditional move when trapping comparison was split to a
13139 non-trapping one (and vice versa).
13141 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
13143 * config/s390/s390.c (s390_function_profiler): Generate nops
13144 instead of profiler call sequences.
13145 * config/s390/s390.opt: Add the new option.
13147 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
13149 * config/s390/s390.c (s390_function_profiler): Generate
13150 __mcount_loc section.
13151 * config/s390/s390.opt: Add the new option.
13153 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
13155 * common.opt: Add the new warning.
13156 * config/s390/s390.c (s390_function_profiler): Emit "brasl
13157 %r0,__fentry__" when -mfentry is specified.
13158 (s390_option_override_internal): Disallow -mfentry for 31-bit
13160 * config/s390/s390.opt: Add the new option.
13162 2018-07-16 Richard Biener <rguenther@suse.de>
13165 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
13166 for function-local FUNCTION_DECL and RESULT_DECL immediately.
13168 2018-07-16 Martin Liska <mliska@suse.cz>
13171 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
13174 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
13176 * config/arc/arcHS.md: Update ARCHS scheduling rules.
13178 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
13180 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
13182 * config/arc/arc-cpus.def (hs4x): New cpu.
13184 * config/arc/arc-tables.opt: Regenerate.
13185 * config/arc/arc.c (arc_sched_issue_rate): New function.
13186 (TARGET_SCHED_ISSUE_RATE): Define.
13187 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
13188 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
13190 (attr tune): Add ARCHS4x tune values.
13191 (attr tune_dspmpy): Define.
13192 (*tst): Correct instruction type.
13193 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
13194 * config/arc/arcHS4x.md: New file.
13195 * config/arc/fpu.md: Update instruction type attributes.
13196 * config/arc/t-multilib: Regenerate.
13198 2018-07-16 Tom de Vries <tdevries@suse.de>
13201 * var-tracking.c (vt_initialize): Fix pre_dec handling.
13203 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
13205 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
13208 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
13210 PR tree-optimization/86514
13211 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
13212 conversion to a boolean type from a type with greater precision.
13214 2018-07-16 Tom de Vries <tdevries@suse.de>
13216 * var-tracking.c (vt_initialize): Print adjusted insn slim if
13217 dump_flags request TDF_SLIM.
13219 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
13221 * fold-const.c (int_const_binop_1): Abstract...
13222 (wide_int_binop): ...wide int code here.
13223 (poly_int_binop): ...poly int code here.
13224 Abstract the rest of int_const_binop_1 into int_const_binop.
13225 * fold-const.h (wide_int_binop): New.
13226 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
13227 Remove useless PLUS/MINUS_EXPR case.
13228 (zero_nonzero_bits_from_vr): Move wide int code...
13229 (zero_nonzero_bits_from_bounds): ...here.
13230 (extract_range_from_binary_expr_1): Move mask optimization code...
13231 (range_easy_mask_min_max): ...here.
13232 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
13233 (range_easy_mask_min_max): New.
13235 2018-07-15 Jeff Law <law@redhat.com>
13238 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
13241 2018-07-14 Jim Wilson <jimw@sifive.com>
13243 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
13245 2018-07-14 Paul Koning <ni1d@arrl.net>
13247 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
13249 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
13251 * lto-streamer-out.c (copy_function_or_variable): Dump info about
13254 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
13255 Steve Munroe <munroesj52@gmail.com>
13257 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
13258 (_mm_andnot_si128): Likewise.
13259 (_mm_or_si128): Likewise.
13260 (_mm_xor_si128): Likewise.
13262 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
13264 PR middle-end/78809
13265 * builtins.c (expand_builtin_memcmp): Inline the calls first
13266 when result_eq is false.
13267 (expand_builtin_strcmp): Inline the calls first.
13268 (expand_builtin_strncmp): Likewise.
13269 (inline_string_cmp): New routine. Expand a string compare
13270 call by using a sequence of char comparison.
13271 (inline_expand_builtin_string_cmp): New routine. Inline expansion
13272 a call to str(n)cmp/memcmp.
13273 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
13275 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
13277 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
13279 * config/arm/driver-arm.c: Include arm-native.h.
13280 (host_detect_local_cpu): Use auto-generated data tables.
13281 (vendors, arm_cpu_table): Delete. Move part information to ...
13282 * config/arm/arm-cpus.in: ... here.
13283 * config/arm/parsecpu.awk (gen_native): New function.
13284 (vendor, part): New CPU fields.
13285 (END): Add support for building the native CPU detection tables.
13286 * config/arm/t-arm (arm-native.h): Add build rule.
13287 (driver-arm.o): Add dependency on arm-native.h.
13289 2018-07-13 Richard Biener <rguenther@suse.de>
13291 PR middle-end/85974
13292 * match.pd (addr1 - addr2): Allow either of the operand to
13295 2018-07-13 Tom de Vries <tdevries@suse.de>
13297 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
13300 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
13302 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
13303 arrays instead of numbered variables.
13305 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
13307 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
13308 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
13310 2018-07-13 Richard Biener <rguenther@suse.de>
13313 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
13314 instead of get_context_die.
13316 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
13317 Richard Biener <rguenther@suse.de>
13319 PR middle-end/86489
13320 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
13321 that the loop latch destination where phi is defined.
13323 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
13325 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
13326 (riscv_expand_epilogue): Add assertion to check interrupt mode.
13327 (riscv_set_current_function): Extract getting interrupt type to new
13329 (riscv_get_interrupt_type): New function.
13330 (riscv_merge_decl_attributes): New function, checking interrupt type is
13332 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
13334 2018-07-12 Paul Koning <ni1d@arrl.net>
13336 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
13339 2018-07-12 Paul Koning <ni1d@arrl.net>
13341 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
13342 zero reference, add doloop_end instead.
13343 * doc/md.texi (decrement_and_branch_until_zero): Remove.
13344 (Looping patterns): Remove decrement_and_branch_until_zero. Add
13345 detail for doloop_end.
13347 2018-07-12 Martin Sebor <msebor@redhat.com>
13350 * attribs.c (decl_attributes): Reject conflicting attributes before
13351 calling attribute handlers.
13353 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
13355 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
13357 (gcc::dump_manager::get_dump_file_name): likewise.
13358 (dump_begin): Likewise.
13359 * dumpfile.h (dump_begin): Update prototype.
13360 (gcc::dump_manager::get_dump_file_name,
13361 gcc::dump_manager::get_dump_file_name): Update prototype.
13363 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
13365 * internal-fn.h (vectorizable_internal_fn_p): New function.
13366 * tree-vect-slp.c (compatible_calls_p): Likewise.
13367 (vect_build_slp_tree_1): Remove nops argument. Handle calls
13368 to internal functions.
13369 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
13371 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
13373 * fold-const.h (inverse_conditions_p): Declare.
13374 * fold-const.c (inverse_conditions_p): New function.
13375 * match.pd: Use inverse_conditions_p. Add folds of view_converts
13376 that test the inverse condition of a conditional internal function.
13377 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
13378 * internal-fn.c (internal_fn_mask_index): Handle conditional
13379 internal functions.
13380 (vectorized_internal_fn_supported_p): New function.
13381 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
13382 (any_pred_load_store): Replace with...
13383 (need_to_predicate): ...this new variable.
13384 (redundant_ssa_names): New variable.
13385 (ifcvt_can_use_mask_load_store): Move initial checks to...
13386 (ifcvt_can_predicate): ...this new function. Handle tree codes
13387 for which a conditional internal function exists.
13388 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
13389 instead of ifcvt_can_use_mask_load_store. Update after variable
13391 (predicate_load_or_store): New function, split out from
13392 predicate_mem_writes.
13393 (check_redundant_cond_expr): New function.
13394 (value_available_p): Likewise.
13395 (predicate_rhs_code): Likewise.
13396 (predicate_mem_writes): Rename to...
13397 (predicate_statements): ...this. Use predicate_load_or_store
13398 and predicate_rhs_code.
13399 (combine_blocks, tree_if_conversion): Update after above name changes.
13400 (ifcvt_local_dce): Handle redundant_ssa_names.
13401 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
13402 general conditional functions.
13403 * tree-vect-stmts.c (vectorizable_call): Likewise.
13405 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
13406 Alan Hayward <alan.hayward@arm.com>
13407 David Sherwood <david.sherwood@arm.com>
13409 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
13410 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
13411 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
13412 plus and minus and convert them into IFN_COND_FMA-based sequences.
13413 (convert_mult_to_fma): Handle conditional plus and minus.
13415 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
13417 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
13418 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
13419 (cond_fnms_optab): New optabs.
13420 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
13421 internal functions.
13422 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
13423 * internal-fn.h (get_conditional_internal_fn): Declare.
13424 (get_unconditional_internal_fn): Likewise.
13425 * internal-fn.c (cond_ternary_direct): New macro.
13426 (expand_cond_ternary_optab_fn): Likewise.
13427 (direct_cond_ternary_optab_supported_p): Likewise.
13428 (FOR_EACH_COND_FN_PAIR): Likewise.
13429 (get_conditional_internal_fn): New function.
13430 (get_unconditional_internal_fn): Likewise.
13431 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
13432 (gimple_match_op::gimple_match_op): Add a new overload for 5
13434 (gimple_match_op::set_op): Likewise.
13435 (gimple_resimplify5): Declare.
13436 * genmatch.c (decision_tree::gen): Generate simplifications for
13438 * gimple-match-head.c (gimple_simplify): Define an overload for
13439 5 operands. Handle calls with 5 arguments in the top-level overload.
13440 (convert_conditional_op): Handle conversions from unconditional
13441 internal functions to conditional ones.
13442 (gimple_resimplify5): New function.
13443 (build_call_internal): Pass a fifth operand.
13444 (maybe_push_res_to_seq): Likewise.
13445 (try_conditional_simplification): Try converting conditional
13446 internal functions to unconditional internal functions.
13447 Handle 3-operand unconditional forms.
13448 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
13449 Define ternary equivalents of the current rules for binary conditional
13450 internal functions.
13451 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
13452 ternary operations.
13453 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
13454 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
13455 (optab): Handle them.
13456 (SVE_COND_FP_TERNARY): New int iterator.
13457 (sve_fmla_op, sve_fmad_op): New int attributes.
13458 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
13459 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
13460 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
13462 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
13464 * target.def (preferred_else_value): New target hook.
13465 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
13466 * doc/tm.texi: Regenerate.
13467 * targhooks.h (default_preferred_else_value): Declare.
13468 * targhooks.c (default_preferred_else_value): New function.
13469 * internal-fn.h (conditional_internal_fn_code): Declare.
13470 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
13471 (get_conditional_internal_fn): Use it.
13472 (conditional_internal_fn_code): New function.
13473 * gimple-match.h (gimple_match_cond): New struct.
13474 (gimple_match_op): Add a cond member function.
13475 (gimple_match_op::gimple_match_op): Update all forms to take a
13477 * genmatch.c (expr::gen_transform): Use the same condition as res_op
13478 for the suboperation, but don't specify a particular else_value.
13479 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
13480 (visit_nary_op, visit_reference_op_load): Pass
13481 gimple_match_cond::UNCOND to the gimple_match_op constructor.
13482 * gimple-match-head.c: Include tree-eh.h
13483 (convert_conditional_op): New function.
13484 (maybe_resimplify_conditional_op): Likewise.
13485 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
13486 (gimple_resimplify2): Likewise.
13487 (gimple_resimplify3): Likewise.
13488 (gimple_resimplify4): Likewise.
13489 (maybe_push_res_to_seq): Return null for conditional operations.
13490 (try_conditional_simplification): New function.
13491 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
13493 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
13495 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
13497 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
13499 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
13501 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
13503 (hash_tree): Do not hash DECL_FCONTEXT
13504 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
13505 Do not stream DECL_FCONTEXT.
13506 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
13507 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
13509 2018-07-12 Richard Biener <rguenther@suse.de>
13512 * dwarf2out.c (gen_block_die): Only output blocks when they have
13513 at least one !DECL_IGNORED_P variable.
13515 2018-07-12 Richard Biener <rguenther@suse.de>
13518 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
13519 Remove -mieee-fp handling.
13521 2018-07-12 Richard Biener <rguenther@suse.de>
13523 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
13524 left-over from last patch.
13526 2018-07-12 Jakub Jelinek <jakub@redhat.com>
13528 PR tree-optimization/86492
13529 * gimple-ssa-store-merging.c
13530 (imm_store_chain_info::coalesce_immediate_stores): Call
13531 check_no_overlap even for the merge_overlapping case. Formatting fix.
13533 2018-07-12 Richard Biener <rguenther@suse.de>
13535 PR middle-end/86479
13536 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
13537 move possibly trapping operations into the conditional.
13539 2018-07-12 Richard Biener <rguenther@suse.de>
13541 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
13542 (vn_lookup_simplify_result): Remove recursion limit applied
13544 (vn_nary_build_or_lookup_1): Adjust.
13545 (try_to_simplify): Likewise.
13546 * gimple-match-head.c (gimple_resimplify1): Instead apply one
13548 (gimple_resimplify2): Likewise.
13549 (gimple_resimplify3): Likewise.
13550 (gimple_resimplify4): Likewise.
13552 2018-07-11 Jakub Jelinek <jakub@redhat.com>
13554 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
13555 Use __mmask64 type instead of __mmask8 for __M argument.
13556 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
13557 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
13559 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
13560 __mmask16 for __M argument.
13561 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
13562 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
13563 to __mmask16 instead of __mmask8.
13564 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
13565 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
13566 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
13567 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
13568 instead of __mmask16 for __U argument.
13569 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
13570 __mmask16 instead of __mmask8 for __U argument.
13571 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
13573 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
13575 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
13577 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
13579 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
13581 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
13583 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
13585 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
13587 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
13589 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
13591 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
13592 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
13593 return type as well as __M argument type and all casts from __mmask8
13595 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
13596 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
13597 return type as well as __M argument type and all casts from __mmask8
13599 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
13600 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
13601 return type as well as __M argument type and all casts from __mmask8
13603 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
13604 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
13605 return type as well as __M argument type and all casts from __mmask8
13607 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
13608 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
13611 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
13613 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
13614 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
13617 2018-07-11 Paul Koning <ni1d@arrl.net>
13619 * doc/md.texi (define_subst): Document how multiple occurrences of
13620 the same argument in the replacement pattern are handled.
13622 2018-07-11 Paul Koning <ni1d@arrl.net>
13624 * doc/extend.texi (Common Variable Attributes): Move "mode" into
13625 alphabetical order.
13626 (Common Type Attributes): Add "mode" attribute.
13628 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
13630 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
13631 stream DECL_ORIGINAL_TYPE.
13632 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
13633 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
13634 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
13635 Do not walk original type.
13636 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
13638 (write_ts_decl_non_common_tree_pointers): Do not stream
13640 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
13641 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
13643 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
13645 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
13646 thread twice from the same starting edge.
13648 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
13650 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
13651 * gimple.c (gimple_call_nonnull_result_p): ...here...
13652 (gimple_call_nonnull_arg): ...and here.
13653 * gimple.h (gimple_call_nonnull_result_p): New.
13654 (gimple_call_nonnull_arg): New.
13656 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
13658 * config/arm/arm-cpus.in: Move information from fpu field of each
13659 cpu definition to the isa field.
13660 * config/arm/parsecpu.awk (fpu): Delete match rule.
13661 (gen_comm_data): Don't add bits from the CPU's FPU entry.
13663 2018-07-11 Richard Biener <rguenther@suse.de>
13666 * dwarf2out.c (init_sections_and_labels): Use
13667 output_asm_line_debug_info consistently.
13668 (dwarf2out_early_finish): Likewise.
13669 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
13672 2018-07-11 Richard Biener <rguenther@suse.de>
13674 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
13675 Rework father_bb setting in a way to avoid propagating constants
13676 multiple times on a loop body.
13678 2018-07-10 Mark Wielaard <mark@klomp.org>
13681 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
13683 2018-07-10 Richard Biener <rguenther@suse.de>
13685 * hash-map.h (hash_map::iterator::operator*): Return
13686 references to key and value.
13688 2018-07-10 Jakub Jelinek <jakub@redhat.com>
13691 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
13692 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
13693 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
13694 (gimplify_omp_for): For composite loops, move outer
13695 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
13696 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
13697 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
13698 TREE_LIST for both the original class iterator and the "last" helper
13699 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
13700 loop, remember has_decl_expr from outer composite loops for the
13701 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
13703 2018-07-09 Martin Sebor <msebor@redhat.com>
13705 PR middle-end/77357
13706 PR middle-end/86428
13707 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
13708 accessing implicitly initialized array elements.
13709 * expr.c (string_constant): Handle string initializers of
13710 character arrays within aggregates.
13711 * gimple-fold.c (fold_array_ctor_reference): Add argument.
13712 Store element offset. As a special case, handle zero size.
13713 (fold_nonarray_ctor_reference): Same.
13714 (fold_ctor_reference): Add argument. Store subobject offset.
13715 * gimple-fold.h (fold_ctor_reference): Add argument.
13717 2018-07-09 Paul Koning <ni1d@arrl.net>
13719 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
13720 (pdp11_insn_cost): New function.
13721 (pdp11_md_asm_adjust): New function.
13722 (TARGET_INVALID_WITHIN_DOLOOP): Define.
13723 (pdp11_rtx_costs): Update to match machine better.
13724 (output_addr_const_pdp11): Correct format mismatch warnings.
13725 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
13726 * config/pdp11/pdp11.md: General change to add base_cost and/or
13727 length attributes for use by new pdp11_insn_cost function.
13728 (MIN_BRANCH): Correct definition.
13730 (doloop_end): Use standard pattern name for looping pattern.
13731 (doloop_end_nocc): New.
13732 (movsf): Add another constraint alternative.
13733 (zero_extendqihi2): Add constraint alternatives for not in place
13735 (zero_extendhisi2): Remove.
13736 (shift patterns): Add CC handling variants.
13740 (define_peephole2): New peephole to recognize mov that sets CC for
13743 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13745 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
13746 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
13749 2018-07-09 Jakub Jelinek <jakub@redhat.com>
13752 * real.c (real_nextafter): Return true if result is denormal.
13754 2018-07-09 Martin Liska <mliska@suse.cz>
13756 * common.opt: Add back wrongly removed attribute.
13758 2018-07-09 Richard Biener <rguenther@suse.de>
13761 * dwarf2out.c (gen_block_die): For an early generated DIE
13762 always output high/low PC attributes.
13764 2018-07-09 Tom de Vries <tdevries@suse.de>
13766 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
13767 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
13768 onto VAR_DECL with abstract origin.
13770 2018-07-07 Jim Wilson <jimw@sifive.com>
13772 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
13774 2018-07-07 Tom de Vries <tdevries@suse.de>
13776 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
13778 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
13780 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
13782 (combine_bound): Use wide-int overflow calculation instead of
13784 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
13786 * fold-const.c (int_const_binop_2): Same.
13787 (extract_muldiv_1): Same.
13788 (fold_div_compare): Same.
13789 (fold_abs_const): Same.
13791 * poly-int.h (add): Same.
13795 * predict.c (predict_iv_comparison): Same.
13796 * profile-count.c (slow_safe_scale_64bit): Same.
13797 * simplify-rtx.c (simplify_const_binary_operation): Same.
13798 * tree-chrec.c (tree_fold_binomial): Same.
13799 * tree-data-ref.c (split_constant_offset_1): Same.
13800 * tree-if-conv.c (idx_within_array_bound): Same.
13801 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
13802 * tree-ssa-phiopt.c (minmax_replacement): Same.
13803 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
13804 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
13805 * vr-values.c (vr_values::adjust_range_with_scev): Same.
13806 * wide-int.cc (wi::add_large): Same.
13807 (wi::mul_internal): Same.
13808 (wi::sub_large): Same.
13809 (wi::divmod_internal): Same.
13810 * wide-int.h: Change overflow type to overflow_type for neg, add,
13811 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
13812 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
13813 mul_internal, divmod_internal.
13814 (overflow_type): New enum.
13815 (accumulate_overflow): New.
13817 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
13819 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
13820 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
13822 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
13824 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
13825 argument is checked for zero before entering loop, avoid checking again.
13827 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
13829 * gimplify.h (generic_expr_could_trap_p): Set as global function.
13830 * gimplify.h (generic_expr_could_trap_p): Likwise.
13831 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
13833 2018-07-06 Jakub Jelinek <jakub@redhat.com>
13835 PR tree-optimization/86401
13836 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
13837 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
13838 (fold_bit_and_mask): ... here. New helper function for match.pd.
13839 * fold-const.h (fold_bit_and_mask): Declare.
13840 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
13842 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
13845 * target.def (translate_mode_attribute): New hook.
13846 * targhooks.h (default_translate_mode_attribute): Declare.
13847 * targhooks.c (default_translate_mode_attribute): New function.
13848 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
13849 * doc/tm.texi: Regenerate.
13850 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
13851 (rs6000_translate_mode_attribute): New function.
13853 2018-07-06 Paul Koning <ni1d@arrl.net>
13855 * doc/md.texi (define_split): Document DONE and FAIL.
13856 (define_peephole2): Ditto.
13858 2018-07-05 Jeff Law <law@redhat.com>
13860 PR tree-optimization/86010
13861 * tree-ssa-dse.c (compute_trims): More aggressively trim at
13862 both the head and tail of mem* and str* calls.
13864 2018-07-05 Jim Wilson <jimw@sifive.com>
13866 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
13868 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
13870 * config/aarch64/aarch64-simd.md: correct flags text for
13871 MIN_EXPR replacement.
13873 2018-07-05 James Clarke <jrtc27@jrtc27.com>
13875 * configure: Regenerated.
13877 2018-07-05 Carl Love <cel@us.ibm.com>
13879 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
13880 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
13881 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
13882 VSX_BUILTIN_DOUBLEL_V4SF.
13884 2018-07-05 Martin Sebor <msebor@redhat.com>
13887 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
13888 than its domain to compute its the upper bound of a char array.
13890 2018-07-05 Nathan Sidwell <nathan@acm.org>
13892 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
13893 * doc/cpp.texi: Update comment.
13894 * doc/tm.texi: Rebuilt.
13895 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
13896 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
13897 * doc/extend.texi (Backwards Compatibility): Clarify it is system
13898 headers affected by extern "C".
13899 * system.h: Poison NO_IMPLICIT_EXTERN_C.
13900 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
13901 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
13902 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
13903 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
13904 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
13905 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
13906 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
13907 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
13908 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
13909 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
13910 config/sparc/sp64-elf.h, config/spu/spu.h,
13911 config/stormy16/stormy16.h, config/v850/v850.h,
13912 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
13913 define NO_IMPLICIT_EXTERN_C.
13914 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
13916 2018-07-05 Tamar Christina <tamar.christina@arm.com>
13919 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
13920 instead of GET_MODE_SIZE when comparing Units.
13922 2018-07-05 Tamar Christina <tamar.christina@arm.com>
13925 * rtlanal.c (set_noop_p): Constrain on mode change,
13926 include hard-reg-set.h
13928 2018-07-05 Tamar Christina <tamar.christina@arm.com>
13930 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
13932 2018-07-05 Jakub Jelinek <jakub@redhat.com>
13935 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
13938 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
13940 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
13942 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
13945 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
13947 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
13949 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
13951 PR middle-end/86380
13952 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
13954 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
13956 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
13957 neg_*_op* variables.
13959 2018-07-04 Martin Liska <mliska@suse.cz>
13961 * tree-switch-conversion.c: Define
13962 max_ratio_for_speed and max_ratio_for_size constants.
13964 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
13965 Martin Liska <mliska@suse.cz>
13967 PR middle-end/66240
13970 * common.opt: Rename align options with 'str_' prefix.
13971 * common/config/i386/i386-common.c (set_malign_value): New
13973 (ix86_handle_option): Use it to set -falign-* options/
13974 * config/aarch64/aarch64-protos.h (struct tune_params): Change
13975 type from int to string.
13976 * config/aarch64/aarch64.c: Update default values from int
13978 * config/alpha/alpha.c (alpha_override_options_after_change):
13980 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
13981 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
13982 max skip conditionally.
13983 * config/i386/freebsd.h (SUBALIGN_LOG): New.
13984 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
13985 max skip conditionally.
13986 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
13987 max skip conditionally.
13988 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
13989 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
13990 max skip conditionally.
13991 * config/i386/i386.c (struct ptt): Change type from int to
13993 (ix86_default_align): Set default values.
13994 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
13995 max skip conditionally.
13996 * config/i386/iamcu.h (SUBALIGN_LOG): New.
13997 (ASM_OUTPUT_MAX_SKIP_ALIGN):
13998 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
13999 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
14000 max skip conditionally.
14001 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
14002 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
14003 * config/i386/x86-64.h (SUBALIGN_LOG): New.
14004 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
14005 max skip conditionally.
14006 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
14007 * config/ia64/ia64.c (ia64_option_override): Set default values
14008 for alignment options.
14009 * config/m68k/m68k.c: Handle new str_align_* options.
14010 * config/mips/mips.c (mips_set_compression_mode): Change
14012 (mips_option_override): Set default values for options.
14013 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
14015 * config/rs6000/rs6000.c (rs6000_option_override_internal):
14017 * config/rx/rx.c (rx_option_override): Likewise.
14018 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
14019 (LABEL_ALIGN): Use align_labels_log.
14020 (LOOP_ALIGN): Use align_loops_align.
14021 * config/s390/s390.c (s390_asm_output_function_label): Use new
14023 * config/sh/sh.c (sh_override_options_after_change):
14024 Change type of constants.
14025 * config/spu/spu.c (spu_sched_init): Likewise.
14026 * config/sparc/sparc.c (sparc_option_override): Set default
14027 values for options.
14028 * config/visium/visium.c (visium_option_override): Likewise.
14029 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
14030 emit p2align format with last argument if it's not needed.
14031 * doc/invoke.texi: Document extended format of -falign-*.
14032 * final.c: Use align_labels alignment.
14033 * flags.h (struct target_flag_state): Change type to use
14035 (struct align_flags_tuple): New.
14036 (struct align_flags): Likewise.
14037 (align_loops_log): Redefine macro to use new types.
14038 (align_loops_max_skip): Redefine macro to use new types.
14039 (align_jumps_log): Redefine macro to use new types.
14040 (align_jumps_max_skip): Redefine macro to use new types.
14041 (align_labels_log): Redefine macro to use new types.
14042 (align_labels_max_skip): Redefine macro to use new types.
14043 (align_functions_log): Redefine macro to use new types.
14044 (align_loops): Redefine macro to use new types.
14045 (align_jumps): Redefine macro to use new types.
14046 (align_labels): Redefine macro to use new types.
14047 (align_functions): Redefine macro to use new types.
14048 (align_functions_max_skip): Redefine macro to use new types.
14049 (align_loops_value): New macro.
14050 (align_jumps_value): New macro.
14051 (align_labels_value): New macro.
14052 (align_functions_value): New macro.
14053 * function.c (invoke_set_current_function_hook): Propagate
14054 alignment values from flags to global variables default in
14056 * ipa-icf.c (sem_function::equals_wpa): Use
14057 cl_optimization_option_eq instead of memcmp.
14058 * lto-streamer.h (cl_optimization_stream_out): Support streaming
14060 (cl_optimization_stream_in): Likewise.
14061 * optc-save-gen.awk: Support strings in cl_optimization.
14062 * opth-gen.awk: Likewise.
14063 * opts.c (finish_options): Remove error checking of invalid
14065 (MAX_CODE_ALIGN): Remove.
14066 (MAX_CODE_ALIGN_VALUE): Likewise.
14067 (parse_and_check_align_values): New function.
14068 (check_alignment_argument): Likewise.
14069 (common_handle_option): Use check_alignment_argument.
14070 * opts.h (parse_and_check_align_values): Declare.
14071 * toplev.c (init_alignments): Remove.
14072 (read_log_maxskip): New.
14073 (parse_N_M): Likewise.
14074 (parse_alignment_opts): Likewise.
14075 (backend_init_target): Remove usage of init_alignments.
14076 * toplev.h (parse_alignment_opts): Declare.
14077 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
14079 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
14080 * tree.c (cl_option_hasher::equal): New.
14081 * varasm.c: Use new global macros.
14083 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
14085 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
14086 Use a simpler align directive also if MAXSKIP = ALIGN-1.
14087 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
14088 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
14089 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
14090 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
14091 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
14092 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
14093 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
14094 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
14095 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
14096 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
14097 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
14099 2018-07-04 Martin Liska <mliska@suse.cz>
14100 Jonathan Wakely <jwakely@redhat.com>
14102 * coverage.c: Use correct type.
14103 * doc/invoke.texi: Language correction.
14105 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
14108 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
14109 ENDBRANCH for non-tail call which may return via indirect branch.
14110 * doc/extend.texi: Document indirect_return attribute.
14112 2018-07-03 Martin Sebor <msebor@redhat.com>
14114 PR tree-optimization/86274
14115 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
14117 (format_floating): Correct handling of infinities and NaNs.
14119 2018-07-03 Martin Sebor <msebor@redhat.com>
14121 * print-tree.c (print_real_cst): New function.
14122 (print_node_brief): Call it.
14123 (print_node): Ditto.
14125 2018-07-03 Jeff Law <law@redhat.com>
14127 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
14128 into a single pattern.
14130 * config/h8300/h8300.md (ors code_iterator): New.
14131 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
14132 a single pattern and single splitter.
14133 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
14134 (iorqi3_1, xorqi3_1): Likewise.
14135 (iorqi3, xorqi3 expanders): Similarly.
14137 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
14138 (movmd_internal) into a single pattern using the P mode iterator.
14139 (movmd splitters): Similarly.
14140 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
14141 (movsd splitters): Similarly.
14143 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
14144 ADDB, ADDW and ADDL into a single ADD attribute which selects the
14145 right table based on the size of the operand.
14146 * config/h8300/h8300.md (length_table): Corresponding changes. All
14147 references to "addb", "addw" and "addl" changed to "add".
14148 (btst patterns): Merge two variants into a single pattern.
14149 (tstqi, tsthi): Likewise.
14150 (addhi3_incdec, addsi3_incdec): Likewise.
14151 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
14152 (mulhi3, mulsi3): Likewise.
14153 (udivhi3, udivsi3): Likewise.
14154 (divhi3, divsi3): Likewise.
14155 (andorqi3, andorhi3, andorsi3): Likewise.
14157 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
14160 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
14161 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
14163 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
14165 PR tree-optimization/85694
14166 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
14167 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
14169 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
14170 (<u>avg<mode>3_ceil): New patterns.
14172 2018-07-03 David Malcolm <dmalcolm@redhat.com>
14174 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
14175 scan-tree-dump directive.
14176 * gcc.dg/vect/slp-perm-2.c: Likewise.
14177 * gcc.dg/vect/slp-perm-3.c: Likewise.
14178 * gcc.dg/vect/slp-perm-5.c: Likewise.
14179 * gcc.dg/vect/slp-perm-6.c: Likewise.
14180 * gcc.dg/vect/slp-perm-7.c: Likewise.
14181 * gcc.dg/vect/slp-perm-8.c: Likewise.
14183 2018-07-03 Marek Polacek <polacek@redhat.com>
14185 PR middle-end/86202
14186 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
14188 2018-07-03 Richard Biener <rguenther@suse.de>
14191 * tree-ssa-structalias.c (find_func_clobbers): Properly
14192 handle indirect calls.
14194 2018-07-03 Jeff Law <law@redhat.com>
14196 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
14197 (shifts): New code iterator.
14198 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
14199 expander. Fix HImode handling on H8/SX.
14200 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
14201 (subqi3, subhi3, subsi3 expanders): Likewise.
14202 (andqi3, andhi3, andsi3 expanders): Likewise.
14203 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
14204 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
14205 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
14206 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
14207 (zero_extendqihi2, zero_extendqisi2): Likewise.
14208 (extendqihi2, extendqisi2): Likewise.
14209 (rotlqi3, rotlhi3, rotlsi3): Likewise.
14210 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
14211 (rotlqi3_1, rotlhi3_1): Likewise.
14212 (logicalhi3_sn, logicalsi3_sn): Likewise.
14213 (logicalhi3, logicalsi3): Likewise.
14215 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
14217 * tree-vect-patterns.c (vect_recog_rotate_pattern)
14218 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
14219 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
14220 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
14221 type to append_pattern_def_seq instead of creating a stmt_vec_info
14223 (build_mask_conversion): Likewise. Remove vinfo argument.
14224 (vect_add_conversion_to_patterm): Likewise, renaming to...
14225 (vect_add_conversion_to_pattern): ...this.
14226 (vect_recog_mask_conversion_pattern): Update call to
14227 build_mask_conversion. Pass the vector type to
14228 append_pattern_def_seq here too.
14229 (vect_recog_gather_scatter_pattern): Update call to
14230 vect_add_conversion_to_pattern.
14232 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
14234 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
14235 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
14236 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
14237 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
14238 STMT_VINFO_PATTERN_DEF_SEQ to null here.
14239 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
14240 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
14241 append_pattern_def_seq instead of new_pattern_def_seq.
14242 (vect_recog_divmod_pattern): Do both of the above.
14243 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
14246 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
14248 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
14249 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
14250 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
14251 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
14252 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
14253 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
14254 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
14255 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
14256 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
14257 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
14258 parameter with a single stmt_vec_info.
14259 (vect_recog_func_ptr): Likewise.
14260 (vect_recog_gather_scatter_pattern): Likewise, folding in...
14261 (vect_try_gather_scatter_pattern): ...this.
14262 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
14263 the stmt_vec_info of the statement to be matched. Don't clear
14264 STMT_VINFO_RELATED_STMT.
14265 (vect_pattern_recog): Update call accordingly.
14267 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
14269 PR tree-optimization/85694
14270 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
14271 (uavgM3_ceil): Document new optabs.
14272 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
14273 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
14275 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
14276 (savg_ceil_optab): New optabs.
14277 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
14278 (vect_vect_recog_func_ptrs): Add it.
14279 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
14280 constant directly from the associated lhs.
14282 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
14284 * tree-vect-patterns.c (vect_split_statement): New function.
14285 (vect_convert_input): Use it to try to split an existing cast.
14287 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
14289 * poly-int.h (print_hex): New function.
14290 * dumpfile.h (dump_dec, dump_hex): Declare.
14291 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
14292 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
14293 min_input_precision, operation_precision and operation_sign.
14294 * tree-vect-patterns.c (vect_get_range_info): New function.
14295 (vect_same_loop_or_bb_p, vect_single_imm_use)
14296 (vect_operation_fits_smaller_type): Delete.
14297 (vect_look_through_possible_promotion): Add an optional
14298 single_use_p parameter.
14299 (vect_recog_over_widening_pattern): Rewrite to use new
14300 stmt_vec_info infomration. Handle one operation at a time.
14301 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
14302 (vect_truncatable_operation_p, vect_set_operation_type)
14303 (vect_set_min_input_precision): New functions.
14304 (vect_determine_min_output_precision_1): Likewise.
14305 (vect_determine_min_output_precision): Likewise.
14306 (vect_determine_precisions_from_range): Likewise.
14307 (vect_determine_precisions_from_users): Likewise.
14308 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
14309 (vect_vect_recog_func_ptrs): Put over_widening first.
14311 (vect_pattern_recog): Call vect_determine_precisions.
14313 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
14315 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
14316 statements that have been replaced by further pattern statements.
14317 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
14319 2018-07-03 Richard Biener <rguenther@suse.de>
14321 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
14322 always set *dt. Dump vectype in vectype overload.
14323 * dumpfile.h (dump_gimple_expr): New function.
14324 (dump_gimple_expr_loc): Likewise.
14325 * dumpfile.c (dump_gimple_expr): New function.
14326 (dump_gimple_expr_loc): Likewise.
14328 2018-07-02 Jeff Law <law@redhat.com>
14330 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
14331 the H8/300, H8/300H and H8/S variants into a single pattern.
14332 (movhi_h8300, movqi_h8300hs): Similarly.
14333 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
14334 (QHI mode iterator): New.
14336 * config/h8300/h8300.md: Remove trailing whitespace.
14338 2018-07-02 Jim Wilson <jimw@sifive.com>
14340 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
14341 instead of emit_insn for interrupt returns.
14342 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
14343 (riscv_sret, riscv_uret): Likewise.
14345 2018-07-02 David Malcolm <dmalcolm@redhat.com>
14347 * pretty-print.c (selftest::test_pp_format): Move save and restore
14348 of quotes to class auto_fix_quotes, and add an instance.
14349 * selftest.c: Include "intl.h".
14350 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
14351 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
14352 * selftest.h (selftest::auto_fix_quotes): New class.
14354 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
14356 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
14357 (aarch64_sve_prepare_conditional_op): Remove.
14358 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
14359 Allow aarch64_simd_reg_or_zero as select operand; remove
14360 the aarch64_sve_prepare_conditional_op call.
14361 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
14362 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
14363 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
14364 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
14365 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
14366 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
14367 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
14368 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
14369 and a splitters to match all of the *_any patterns.
14370 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
14372 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
14373 (SVE_COND_FP_BINARY_REV): Remove.
14374 (sve_int_op_rev, sve_fp_op_rev): New.
14375 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
14376 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
14377 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
14378 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
14379 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
14380 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
14381 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
14382 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
14383 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
14385 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
14386 Remove match_dup 1 from the inner unspec.
14387 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
14389 * config/aarch64/aarch64.md (movprfx): New attr.
14390 (length): Default movprfx to 8.
14391 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
14392 (*madd<SVE_I>, *msub<SVE_I): Likewise.
14393 (*<su>mul<SVE_I>3_highpart): Likewise.
14394 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
14395 (*v<ASHIFT><SVE_I>3): Likewise.
14396 (*<su><MAXMIN><SVE_I>3): Likewise.
14397 (*<su><MAXMIN><SVE_F>3): Likewise.
14398 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
14399 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
14400 (*div<SVE_F>4): Likewise.
14402 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
14404 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
14407 2018-07-02 Richard Biener <rguenther@suse.de>
14409 PR tree-optimization/86363
14410 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
14411 memset argument refers to a non-variable address.
14413 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
14415 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
14416 {PLUS,MINUS}_EXPR code to...
14417 (adjust_symbolic_bound): ...here,
14418 (combine_bound): ...here,
14419 (set_value_range_with_overflow): ...and here.
14421 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
14423 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
14425 (extract_range_from_abs_expr): ...here.
14427 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
14429 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
14430 -fno-omit-frame-pointer when not optimizing.
14432 2018-07-02 Martin Liska <mliska@suse.cz>
14435 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
14436 (propagate_nothrow): Likewise.
14438 2018-07-02 Martin Liska <mliska@suse.cz>
14441 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
14443 2018-07-02 David Malcolm <dmalcolm@redhat.com>
14445 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
14446 function in r262149, changing "loc" param from source_location to
14447 const dump_location_t &.
14448 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
14449 declaration, as above.
14451 2018-07-01 Paul Koning <ni1d@arrl.net>
14453 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
14454 -munit-asm, -mgnu-asm, -mdec-asm.
14455 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
14456 (pdp11_output_labelref): New.
14457 (pdp11_output_def): New.
14458 (pdp11_output_addr_vec_elt): New.
14459 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
14460 %# and %@ format codes.
14461 (pdp11_option_override): New.
14462 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
14463 (pdp11_output_ident): New.
14464 (pdp11_asm_named_section): New.
14465 (pdp11_asm_init_sections): New.
14466 (pdp11_file_start): New.
14467 (pdp11_file_end): New.
14468 (output_ascii): Use .ascii/.asciz for -mdec-asm.
14469 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
14470 %o, like %c but octal.
14471 (pdp11_option_override): New.
14472 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
14474 (DATA_SECTION_ASM_OP): Ditto.
14475 (READONLY_DATA_SECTION_ASM_OP): New.
14476 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
14477 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
14478 (ASM_OUTPUT_LABELREF): Ditto.
14479 (ASM_OUTPUT_DEF): Ditto.
14480 (ASM_OUTPUT_EXTERNAL): New.
14481 (ASM_OUTPUT_SOURCE_FILENAME): New.
14482 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
14483 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
14484 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
14485 %# and %@ format codes.
14486 * config/pdp11/pdp11.opt (mgnu-asm): New.
14487 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
14488 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
14489 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
14491 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
14493 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
14494 dereferencing path[] beyond its length.
14496 (debug_all_paths): New.
14497 (rewire_first_differing_edge): New.
14498 (adjust_paths_after_duplication): New.
14499 (duplicate_thread_path): Call adjust_paths_after_duplication.
14501 (thread_through_all_blocks): Add new argument to
14502 duplicate_thread_path.
14504 2018-06-30 Jim Wilson <jimw@sifive.com>
14506 * config/riscv/predicates.md (p2m1_shift_operand): New.
14507 (high_mask_shift_operand): New.
14508 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
14509 pattern using p2m1_shift_operand.
14510 (lshsi3_zero_extend_3+2): New combiner pattern using
14511 high_mask_shift_operand.
14513 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
14515 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
14517 (vect_recog_rotate_pattern): ...here.
14518 (vect_convert_input): Try to insert casts of invariants in the
14520 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
14521 preheader to be empty.
14523 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
14525 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
14526 vector type. If given, install it in the new statement's
14527 STMT_VINFO_VECTYPE.
14528 (vect_element_precision): New function.
14529 (vect_unpromoted_value): New struct.
14530 (vect_unpromoted_value::vect_unpromoted_value): New function.
14531 (vect_unpromoted_value::set_op): Likewise.
14532 (vect_look_through_possible_promotion): Likewise.
14533 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
14534 (vect_widened_op_tree, vect_convert_input): Likewise.
14535 (vect_convert_inputs, vect_convert_output): Likewise.
14536 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
14537 to handle the optional cast of the multiplication result and
14538 vect_widened_op_tree to detect the widened multiplication itself.
14539 Do not require the input and output of promotion casts to have
14540 the same sign, but base the signedness of the operation on the
14541 input rather than the result. If the pattern includes two
14542 promotions, check that those promotions have the same sign.
14543 Do not restrict the MULT_EXPR handling to a double-width result;
14544 handle quadruple-width results and wider. Use vect_convert_inputs
14545 to convert the inputs to the common type.
14546 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
14547 to handle the optional cast of the ABS result. Also allow a sign
14548 change or a sign extension between the ABS and MINUS.
14549 Use vect_widened_op_tree to detect the widened subtraction and use
14550 vect_convert_inputs to convert the inputs to the common type.
14551 (vect_handle_widen_op_by_const): Delete.
14552 (vect_recog_widen_op_pattern): New function.
14553 (vect_recog_widen_mult_pattern): Use it.
14554 (vect_recog_widen_shift_pattern): Likewise.
14555 (vect_recog_widen_sum_pattern): Use
14556 vect_look_through_possible_promotion to handle the promoted
14559 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
14561 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
14562 the containing gimple_seq *.
14563 * gimple-iterator.h (gsi_for_stmt): Declare it.
14564 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
14565 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
14566 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
14567 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
14568 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
14570 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
14572 (vect_mark_pattern_stmts): ...here. Handle cases in which the
14573 statement being replaced is part of an existing pattern
14574 definition sequence, inserting the new pattern statements before
14576 (vect_pattern_recog_1): Don't return a bool. If the statement
14577 is already part of a pattern, instead apply pattern matching
14578 to the pattern definition statements. Don't clear the
14579 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
14580 (vect_pattern_recog): Don't break after the first match;
14581 continue processing the pattern definition statements instead.
14582 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
14584 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
14586 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
14587 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
14588 (vect_recog_widen_sum_pattern): Use it.
14590 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
14592 * tree-vect-loop.c (vectorizable_reduction): Assert that the
14593 phi is not a pattern statement and has not been replaced by
14594 a pattern statement.
14595 * tree-vect-patterns.c (type_conversion_p): Don't check
14596 STMT_VINFO_IN_PATTERN_P.
14597 (vect_recog_vector_vector_shift_pattern): Likewise.
14598 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
14599 the pattern statement rather than the original statement; check
14600 directly for a WIDEN_MULT_EXPR here.
14601 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
14602 vect_is_simple_use to return the pattern statement rather
14603 than the original statement; use is_pattern_stmt_p to check
14604 for such a pattern statement.
14605 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
14606 to return the pattern statement rather than the original statement;
14607 don't do the same transformation here.
14608 (vect_is_simple_use): If the defining statement has been replaced
14609 by a pattern statement, return the pattern statement instead.
14610 Remove the corresponding (local) transformation from the vectype
14613 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
14615 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
14616 end and default to null.
14617 * tree-vect-loop.c (vect_create_epilog_for_reduction)
14618 (vectorizable_reduction): Update calls accordingly, dropping the
14619 gimple ** argument if the passed-back statement isn't needed.
14620 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
14621 (vect_recog_rotate_pattern): Likewise.
14622 (vect_recog_mask_conversion_pattern): Likewise.
14623 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
14624 (vect_mask_constant_operand_p): Likewise.
14625 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
14626 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
14627 (get_group_load_store_type, get_load_store_type): Likewise.
14628 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
14629 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
14630 (vectorizable_conversion, vectorizable_assignment): Likewise.
14631 (vectorizable_shift, vectorizable_operation): Likewise.
14632 (vectorizable_store, vect_is_simple_cond): Likewise.
14633 (vectorizable_condition, vectorizable_comparison): Likewise.
14634 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
14635 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
14636 and move it to the end. Cope with null def_stmt_outs.
14638 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
14640 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
14642 2018-06-29 Jeff Law <law@redhat.com>
14644 * config/v850/v850.c (v850_legitimate_address_p): Handle large
14645 displacements for TARGET_V850E2V3 and newer.
14646 (TARGET_LRA_P): Remove. Defaults to LRA now.
14647 * config/v850/v850.md (sign23byte_load): Remove.
14648 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
14649 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
14651 2018-06-29 Martin Liska <mliska@suse.cz>
14654 * coverage.c (coverage_init): Mangle full path name.
14655 * doc/invoke.texi: Document the change.
14656 * gcov-io.c (mangle_path): New.
14657 * gcov-io.h (mangle_path): Likewise.
14658 * gcov.c (mangle_name): Use mangle_path for path mangling.
14660 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14662 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
14663 if starting source register is not even.
14665 2018-06-29 Martin Liska <mliska@suse.cz>
14667 PR tree-optimization/86263
14668 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
14669 Make edge redirection.
14671 2018-06-29 David Malcolm <dmalcolm@redhat.com>
14673 * dumpfile.c (dump_loc): Add indentation based on scope depth.
14674 (dump_scope_depth): New variable.
14675 (get_dump_scope_depth): New function.
14676 (dump_begin_scope): New function.
14677 (dump_end_scope): New function.
14678 * dumpfile.h (get_dump_scope_depth): New declaration.
14679 (dump_begin_scope): New declaration.
14680 (dump_end_scope): New declaration.
14681 (class auto_dump_scope): New class.
14682 (AUTO_DUMP_SCOPE): New macro.
14683 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
14686 2018-06-29 Richard Biener <rguenther@suse.de>
14688 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
14689 compute_all_dependences succeeds.
14690 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
14691 exceed --param loop-max-datarefs-for-datadeps.
14693 2018-06-29 Jakub Jelinek <jakub@redhat.com>
14695 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
14697 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
14700 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
14701 alternative 0 in preferred_for_speed attribute.
14703 2018-06-28 Paul Koning <ni1d@arrl.net>
14705 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
14706 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
14707 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
14708 * config/pdp11/pdp11.md: Correct "length" attribute calculation
14709 for shift insn patterns.
14711 2018-06-28 David Malcolm <dmalcolm@redhat.com>
14713 * cgraph.c (cgraph_node::get_body): Replace assignments to
14714 "dump_file" with calls to set_dump_file.
14715 * dumpfile.c (alt_dump_file): Make static, and group with...
14716 (alt_flags): ...this definition.
14717 (dumps_are_enabled): New variable.
14718 (refresh_dumps_are_enabled): New function.
14719 (set_dump_file): New function.
14720 (set_alt_dump_file): New function.
14721 (gcc::dump_manager::dump_start): Replace assignments to
14722 "dump_file" and "alt_dump_file" with calls to set_dump_file and
14724 (gcc::dump_manager::dump_finish): Likewise.
14725 * dumpfile.h (alt_dump_file): Delete decl.
14726 (dumps_are_enabled): New variable decl.
14727 (set_dump_file): New function decl.
14728 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
14730 * tree-nested.c (lower_nested_functions): Replace assignments to
14731 "dump_file" with calls to set_dump_file.
14733 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
14735 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
14736 goto_locus of each outgoing edge of each basic block.
14738 2018-06-28 Richard Biener <rguenther@suse.de>
14740 * dwarf2out.c (decl_scope_table): Remove.
14741 (push_decl_scope): Likewise.
14742 (pop_decl_scope): Likewise.
14743 (gen_type_die_for_member): Do not call push/pop_decl_scope.
14744 (gen_struct_or_union_type_die): Likewise.
14745 (gen_tagged_type_die): Likewise.
14746 (dwarf2out_init): Do not initialize decl_scope_table.
14747 (dwarf2out_c_finalize): Do not free it.
14749 2018-06-28 Richard Biener <rguenther@suse.de>
14751 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
14752 deciding whether to not re-use a DIE.
14754 2018-06-28 Richard Biener <rguenther@suse.de>
14756 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
14757 DW_AT_abstract_origin attribute.
14759 2018-06-28 Martin Liska <mliska@suse.cz>
14761 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
14762 Use newly introduced constants.
14763 * tree-switch-conversion.h (struct jump_table_cluster):
14764 Define max_ratio_for_size and max_ratio_for_speed.
14766 2018-06-28 Martin Liska <mliska@suse.cz>
14768 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
14769 Add new checking assert to catch invalid state.
14770 (jump_table_cluster::can_be_handled): Handle single case
14772 (jump_table_cluster::is_beneficial): Bail out for such case.
14773 (bit_test_cluster::find_bit_tests):
14774 Add new checking assert to catch invalid state.
14775 (bit_test_cluster::can_be_handled): Handle single case
14777 (bit_test_cluster::is_beneficial): Bail out for such case.
14778 (switch_decision_tree::analyze_switch_statement):
14781 2018-06-28 Martin Liska <mliska@suse.cz>
14783 * common.opt: Introduce -completion option.
14784 * gcc.c (driver_handle_option): Handle it.
14785 (driver::main): Print completions if completion
14787 * opt-suggestions.c (option_proposer::get_completions):
14789 (option_proposer::suggest_completion): Likewise.
14790 (option_proposer::find_param_completions): Likewise.
14791 (verify_autocompletions): Likewise.
14792 (test_completion_valid_options): Likewise.
14793 (test_completion_valid_params): Likewise.
14794 (in_completion_p): Likewise.
14795 (empty_completion_p): Likewise.
14796 (test_completion_partial_match): Likewise.
14797 (test_completion_garbage): Likewise.
14798 (opt_proposer_c_tests): Likewise.
14799 * opt-suggestions.h: Declare new functions.
14800 * opts.c (common_handle_option): Handle OPT__completion_.
14801 * selftest-run-tests.c (selftest::run_tests): Add
14802 opt_proposer_c_tests.
14803 * selftest.c (assert_str_startswith): New.
14804 * selftest.h (assert_str_startswith): Likewise.
14805 (opt_proposer_c_tests): New.
14806 (ASSERT_STR_STARTSWITH): Likewise.
14808 2018-06-28 Martin Liska <mliska@suse.cz>
14810 * Makefile.in: Add opt-suggestions.o.
14811 * gcc-main.c: Include opt-suggestions.h.
14812 * gcc.c (driver::driver): Likewise.
14813 (driver::~driver): Remove m_option_suggestions.
14814 (driver::build_option_suggestions): Moved to option_proposer.
14815 (driver::suggest_option): Likewise.
14816 (driver::handle_unrecognized_options): Use option_proposer.
14817 * gcc.h (class driver): Add new memver m_option_proposer.
14818 * opt-suggestions.c: New file.
14819 * opt-suggestions.h: New file.
14821 2018-06-28 Martin Liska <mliska@suse.cz>
14823 * vec.h (class auto_string_vec): New (moved from auto_argvec).
14824 (auto_string_vec::~auto_string_vec): Likewise.
14826 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
14828 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
14829 prevent_decl_creation_for_types fields up and add reset_location field.
14830 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
14831 statement if id->reset_location is true.
14832 (copy_edges_for_bb): Do not set goto_locus on the new edges if
14833 id->reset_location is true.
14834 (copy_phis_for_bb): Force input_location on the arguments if
14835 id->reset_location is true.
14836 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
14837 is set on the function to be inlined.
14839 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
14841 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
14843 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
14845 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
14846 registers for Pmode.
14847 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
14848 hard registers for the clobbered pseudo.
14850 2018-06-27 Paul Koning <ni1d@arrl.net>
14852 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
14853 mutually exclusive options.
14854 * config/pdp11/constraints.md (h): New constraint.
14855 (O): Update definition to match shift code generation.
14856 (D): New constraint.
14857 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
14859 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
14861 (output_jump): Change arguments.
14862 (pdp11_fixed_cc_regs): New function.
14863 (pdp11_cc_mode): Ditto.
14864 (pdp11_expand_shift): Ditto.
14865 (pdp11_assemble_shift): Ditto.
14866 (pdp11_small_shift): Ditto.
14867 (pdp11_branch_cost): Remove.
14868 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
14870 (pdp11_register_move_cost): Update for CC registers.
14871 (pdp11_rtx_costs): Add case for LSHIFTRT.
14872 (pdp11_output_jump): Add CCNZ mode conditional branches.
14873 (notice_update_cc_on_set): Remove.
14874 (pdp11_cc_mode): New function.
14875 (simple_memory_operand): Correct pre/post decrement case.
14876 (no_side_effect_operand): New function.
14877 (pdp11_regno_reg_class): Add CC_REGS class.
14878 (pdp11_fixed_cc_regs): New function.
14879 (pdp11_small_shift): New function.
14880 (pdp11_expand_shift): New function to expand shift insns.
14881 (pdp11_assemble_shift): New function to output shifts.
14882 (pdp11_branch_cost): Remove.
14883 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
14884 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
14885 (WCHAR_TYPE): Ditto.
14886 (PTRDIFF_TYPE): Ditto.
14887 (ADJUST_INSN_LENGTH): New macro.
14888 (FIXED_REGISTERS): Add CC registers.
14889 (CALL_USED_REGISTERS): Ditto.
14890 (reg_class): Ditto.
14891 (REG_CLASS_NAMES): Ditto.
14892 (REG_CLASS_CONTENTS): Ditto.
14893 (SELECT_CC_MODE): Use new function.
14894 (TARGET_FLAGS_REGNUM): New macro.
14895 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
14896 (cc0_reg_rtx): Remove.
14897 (CC_STATUS_MDEP): Remove.
14898 (CC_STATUS_MDEFP_INIT): Remove.
14899 (CC_IN_FPU): Remove.
14900 (NOTICE_UPDATE_CC): Remove.
14901 (REGISTER_NAMES): Add CC registers.
14902 (BRANCH_COST): Change to constant 1.
14903 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
14905 * config/pdp11/pdp11.opt (mbcopy): Remove.
14906 (mbcopy-builtin): Remove.
14907 (mbranch-cheap): Remove.
14908 (mbranch-expensive): Remove.
14909 * config/pdp11/predicates.md (expand_shift_operand): Update to
14910 match shift code generation.
14911 (ccnz_operator): New predicate.
14912 * doc/invoke.texi (PDP-11 Options): Remove deleted options
14913 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
14914 Remove non-existent option -mabshi, -mno-abshi. Document mutually
14916 * doc/md.texi (PDP-11): Document new D and h constraints. Update
14917 description of O constraint.
14919 2018-06-27 Jeff Law <law@redhat.com>
14920 Austin Law <austinklaw@gmail.com>
14922 * config/v850/v850.md (addsi3_set_flags): New pattern.
14923 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
14924 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
14925 (zero_extendhisi2_v850_set_flags): Likewise.
14926 (zero_extendqisi2_v850_set_flags): Likewise.
14927 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
14928 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
14929 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
14931 * config/v850/v850-protos.h (notice_update_cc): Remove.
14932 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
14933 (v850_print_operand): Handle 'D' and "d".
14934 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
14935 Add handling of arithmetic/logical operations compared against zero.
14936 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
14937 Do not look at v850_compare_op, instead get mode from last argument.
14938 (v850_gen_compare): Remove
14939 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
14940 after reload for prologue insns.
14941 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
14943 (construct_save_jarl): Likewise.
14944 (TARGET_FLAGS_REGNUM): Define.
14945 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
14946 (NOTICE_UPDATE_CC): Remove.
14947 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
14948 than cc0. Conditionalize on reload_completed.
14949 (cmpsi_insn, setfcc_insn): Likewise.
14950 (tst1 splitter): Turn into define_and_split which sets the flags
14952 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
14953 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
14954 (cstoresf4, cstoredf4): Clobber the flags.
14955 (cmpsi, cmpsf, cmpdf): Remove expanders.
14956 (setf_insn): Remove pattern.
14957 (addsi3): Turn into define_and_split which clobbers the flags after
14958 reload and a suitable pattern (addsi3_clobber_flags) for use after
14960 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
14961 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
14962 (ashrsi3, ashrsi3_v850e2): Likewise.
14963 (bins): Clobber the flags.
14964 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
14965 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
14966 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
14967 (call_value_internal_short, call_value_internal_long): Likewise.
14968 (callt_save_interrupt, callt_return_interrupt): Likewise.
14969 (save_interrupt, return_interrupt): Likewise.
14970 (callt_save_all_interrupt, save_all_interrupt): Likewise.
14971 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
14972 (restore_all_interrupt, _restore_all_interrupt): Likewise.
14973 (All FP comparisons): Only allow after reload has completed.
14975 (divh, divhu): Tweak output template.
14976 (branch_z_normal, branch_z_invert): Remove
14977 (branch_nz_normal, branch_nz_invert): Likewise.
14978 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
14980 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
14981 * config/v850/v850.c (notice_update_cc): Remove.
14982 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
14983 (CC_NO_CARRY): Likewise.
14984 (NOTICE_UPDATE_CC): Define to nothing.
14985 * config/v850/v850.md: Remove block comment on cc0 handling
14986 Remove "cc" attribute from all patterns. Remove cc_status handling
14987 from all patterns. Minor formatting fixes.
14989 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14991 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
14992 (cortex-a76.cortex-a55): Likewise.
14993 * config/aarch64/aarch64-tune.md: Regenerate.
14994 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
14995 cortex-a76.cortex-a55.
14997 2018-06-27 Jeff Law <law@redhat.com>
14999 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
15000 (MULTILIB_DIRNAMES): Similarly.
15002 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
15004 * gimple.h (gimple_return_retbnd): Delete.
15005 (gimple_return_set_retbnd): Likewise.
15006 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
15007 gimple_return_set_retbnd.
15008 * gimple-pretty-print.c (dump_gimple_return): Remove call to
15009 gimple_return_retbnd and adjust.
15010 * tree-inline.h (struct copy_body_data): Remove retbnd field.
15011 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
15012 Explicitly return NULL in a couple more cases. Move assertion
15013 on debug statements and remove unreachable code.
15014 (reset_debug_binding): Do not test id->retbnd.
15015 (expand_call_inline): Do not set it.
15017 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
15019 * configure.ac: Add --disable-gcov option.
15020 * configure: Regenerate.
15021 * Makefile.in: Honour @enable_gcov@.
15022 * doc/install.texi: Document --disable-gcov.
15024 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15026 * config/arm/arm-cpus.in (cortex-a76): New entry.
15027 (cortex-a76.cortex-a55): Likewise.
15028 * config/arm/arm-tables.opt: Regenerate.
15029 * config/arm/arm-tune.md: Likewise.
15030 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
15031 * doc/invoke.texi (ARM Options): Document cortex-a76 and
15032 cortex-a76.cortex-a55.
15034 2018-06-27 Tamar Christina <tamar.christina@arm.com>
15037 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
15039 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
15041 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
15043 (EPILOGUE_USES): Likewise.
15045 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
15047 * tree-inline.c (remap_location): New function extracted from...
15048 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
15049 (copy_phis_for_bb): ...here. Call remap_location.
15050 (copy_cfg_body): Adjust call to copy_edges_for_bb.
15052 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
15054 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
15055 unaligned vsx for 16B memset.
15057 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
15060 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
15061 ieee128_float_type_node to long_double_type_node unless
15062 TARGET_LONG_DOUBLE_128 is set.
15064 2018-06-26 David Malcolm <dmalcolm@redhat.com>
15066 * cfgloop.c (get_loop_location): Convert return type from
15067 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
15068 by implicit construction from rtx_insn *, and using
15069 dump_user_location_t::from_function_decl for the fallback case.
15070 * cfgloop.h (get_loop_location): Convert return type from
15071 location_t to dump_user_location_t.
15072 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
15073 dump_printf_loc to pass in a dump_location_t rather than a
15074 location_t, via the gimple stmt.
15075 * coverage.c (get_coverage_counts): Update calls to
15076 dump_printf_loc to pass in dump_location_t rather than a
15078 * doc/optinfo.texi (Dump types): Convert example of
15079 dump_printf_loc from taking "locus" to taking "insn". Update
15080 description of the "_loc" calls to cover dump_location_t.
15081 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
15083 (dump_user_location_t::dump_user_location_t): New constructors,
15084 from gimple *stmt and rtx_insn *.
15085 (dump_user_location_t::from_function_decl): New function.
15086 (dump_loc): Make static.
15087 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
15088 const dump_location_t &.
15089 (dump_generic_expr_loc): Delete.
15090 (dump_printf_loc): Convert param "loc" from location_t to
15091 const dump_location_t &.
15092 (selftest::test_impl_location): New function.
15093 (selftest::dumpfile_c_tests): New function.
15094 * dumpfile.h: Include "profile-count.h".
15095 (class dump_user_location_t): New class.
15096 (struct dump_impl_location_t): New struct.
15097 (class dump_location_t): New class.
15098 (dump_printf_loc): Convert 2nd param from source_location to
15099 const dump_location_t &.
15100 (dump_generic_expr_loc): Delete.
15101 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
15102 const dump_location_t &.
15103 * gimple-fold.c (fold_gimple_assign): Update call to
15104 dump_printf_loc to pass in a dump_location_t rather than a
15105 location_t, via the gimple stmt.
15106 (gimple_fold_call): Likewise.
15107 * gimple-loop-interchange.cc
15108 (loop_cand::analyze_iloop_reduction_var): Update for change to
15109 check_reduction_path.
15110 (tree_loop_interchange::interchange): Update for change to
15111 find_loop_location.
15112 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
15113 change in return-type of find_loop_location.
15114 (graphite_regenerate_ast_isl): Likewise.
15115 * graphite-optimize-isl.c (optimize_isl): Likewise.
15116 * graphite.c (graphite_transform_loops): Likewise.
15117 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
15118 pass in a dump_location_t rather than a location_t, via the
15120 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
15121 * ipa.c (walk_polymorphic_call_targets): Likewise.
15122 * loop-unroll.c (report_unroll): Convert "locus" param from
15123 location_t to dump_location_t.
15124 (decide_unrolling): Update for change to get_loop_location's
15126 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
15127 location_t to dump_user_location_t.
15128 (grid_find_single_omp_among_assignments_1): Updates calls to
15129 dump_printf_loc to pass in a dump_location_t rather than a
15130 location_t, via the gimple stmt.
15131 (grid_parallel_clauses_gridifiable): Convert "tloc" from
15132 location_t to dump_location_t. Updates calls to dump_printf_loc
15133 to pass in a dump_location_t rather than a location_t, via the
15135 (grid_inner_loop_gridifiable_p): Likewise.
15136 (grid_dist_follows_simple_pattern): Likewise.
15137 (grid_gfor_follows_tiling_pattern): Likewise.
15138 (grid_target_follows_gridifiable_pattern): Likewise.
15139 (grid_attempt_target_gridification): Convert initialization
15140 of local "grid" from memset to zero-initialization; FIXME: does
15141 this require C++11? Update call to dump_printf_loc to pass in a
15142 optinfo_location rather than a location_t, via the gimple stmt.
15143 * profile.c (read_profile_edge_counts): Updates call to
15144 dump_printf_loc to pass in a dump_location_t rather than a
15146 (compute_branch_probabilities): Likewise.
15147 * selftest-run-tests.c (selftest::run_tests): Call
15149 * selftest.h (dumpfile_c_tests): New decl.
15150 * tree-loop-distribution.c (pass_loop_distribution::execute):
15151 Update for change in return type of find_loop_location.
15152 * tree-parloops.c (parallelize_loops): Likewise.
15153 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
15154 "locus" from location_t to dump_user_location_t.
15155 (canonicalize_loop_induction_variables): Likewise.
15156 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
15157 for change in return type of find_loop_location.
15158 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
15159 to dump_printf_loc to pass in a dump_location_t rather than a
15160 location_t, via the stmt.
15161 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
15163 * tree-vect-loop-manip.c (find_loop_location): Convert return
15164 type from source_location to dump_user_location_t.
15165 (vect_do_peeling): Update for above change.
15166 (vect_loop_versioning): Update for change in type of
15168 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
15169 from location_t to dump_user_location_t.
15170 (vect_estimate_min_profitable_iters): Update for change in type
15172 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
15173 location_t to dump_location_t.
15174 (vect_slp_bb): Update for change in type of vect_location.
15175 * tree-vectorizer.c (vect_location): Convert from source_location
15176 to dump_user_location_t.
15177 (try_vectorize_loop_1): Update for change in vect_location's type.
15178 (vectorize_loops): Likewise.
15179 (increase_alignment): Likewise.
15180 * tree-vectorizer.h (vect_location): Convert from source_location
15181 to dump_user_location_t.
15182 (find_loop_location): Convert return type from source_location to
15183 dump_user_location_t.
15184 (check_reduction_path): Convert 1st param from location_t to
15185 dump_user_location_t.
15186 * value-prof.c (check_counter): Update call to dump_printf_loc to
15187 pass in a dump_user_location_t rather than a location_t; update
15188 call to error_at for change in type of "locus".
15189 (check_ic_target): Update call to dump_printf_loc to
15190 pass in a dump_user_location_t rather than a location_t, via the
15193 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
15195 * config/s390/s390.h (enum processor_flags): Do not use
15196 default tune parameter when -march was specified.
15198 2018-06-26 Jakub Jelinek <jakub@redhat.com>
15201 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
15202 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
15205 2018-06-26 Richard Biener <rguenther@suse.de>
15207 PR tree-optimization/86287
15209 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
15210 (vect_analyze_loop): Initialize n_stmts.
15212 2018-06-26 Richard Biener <rguenther@suse.de>
15214 PR middle-end/86271
15215 * fold-const.c (fold_convertible_p): Pointer extension
15218 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
15221 * dwarf2out.c (loc_list_has_views): Adjust comments.
15222 (dw_loc_list): Split single cross-partition range with
15225 2018-06-25 Jeff Law <law@redhat.com>
15227 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
15228 on -mbig-switch by default.
15230 * config/v850/predicates.md (const_float_1_operand): Fix match_code
15232 (const_float_0_operand): Remove unused predicate.
15233 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
15234 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
15235 (recipsf2): New expander. Original pattern now called
15237 (recipdf2, recipdf2_insn): Similarly.
15238 (rsqrtsf2, rsqrtsf2_insn): Similarly
15239 (rsqrtdf2, rsqrtdf2_insn): Similarly
15241 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
15243 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
15244 Simplify logic for FreeBSD (twice).
15246 2018-06-25 Martin Sebor <msebor@redhat.com>
15248 PR tree-optimization/86204
15249 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
15250 a strnlen result if it's less than the length of the string.
15252 2018-06-25 Martin Sebor <msebor@redhat.com>
15254 PR tree-optimization/85700
15255 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
15256 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
15257 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
15259 2018-06-25 Martin Sebor <msebor@redhat.com>
15261 * doc/extend.texi (Zero-length arrays): Update and clarify.
15263 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
15265 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
15266 added IEEE/IBM long double multilib support on PowerPC little
15267 endian Linux systems.
15268 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
15269 (MULTILIB_DEFAULTS): Likewise.
15270 * config/rs6000/rs6000.c (rs6000_option_override_internal):
15272 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
15273 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
15274 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
15276 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
15278 PR middle-end/86311
15279 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
15280 (REORDER_45): Likewise.
15282 2018-06-25 Jeff Law <law@redhat.com>
15284 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
15285 dividend to 32 bits. Adjust length.
15286 (udivmodhi4): Cleanup output template. Fix length.
15288 2018-06-25 Carl Love <cel@us.ibm.com>
15290 * config/rs6000/vsx.md: Change word selector to prefered location.
15292 2018-06-25 Richard Biener <rguenther@suse.de>
15294 PR tree-optimization/86304
15295 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
15296 epilogue-if-converted loops as well.
15298 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
15300 * lto-section-out.c (lto_begin_section): Do not print section
15301 name for noaddr and unnumbered dumps.
15303 2018-06-25 Richard Biener <rguenther@suse.de>
15305 * tree-vectorizer.h (struct vec_info_shared): New structure
15306 with parts split out from struct vec_info and loop_nest from
15307 struct _loop_vec_info.
15308 (struct vec_info): Adjust accordingly.
15309 (struct _loop_vec_info): Likewise.
15310 (LOOP_VINFO_LOOP_NEST): Adjust.
15311 (LOOP_VINFO_DATAREFS): Likewise.
15312 (LOOP_VINFO_DDRS): Likewise.
15313 (struct _bb_vec_info): Likewise.
15314 (BB_VINFO_DATAREFS): Likewise.
15315 (BB_VINFO_DDRS): Likewise.
15316 (struct _stmt_vec_info): Add dr_aux member.
15317 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
15318 (DR_MISALIGNMENT_UNINITIALIZED): New.
15319 (set_dr_misalignment): Adjust.
15320 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
15321 (vect_analyze_loop): Adjust prototype.
15322 (vect_analyze_loop_form): Likewise.
15323 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
15324 Compute dependences lazily.
15325 (vect_record_base_alignments): Use shared datarefs/ddrs.
15326 (vect_verify_datarefs_alignment): Likewise.
15327 (vect_analyze_data_refs_alignment): Likewise.
15328 (vect_analyze_data_ref_accesses): Likewise.
15329 (vect_analyze_data_refs): Likewise.
15330 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
15331 constructor parameter for shared part.
15332 (vect_analyze_loop_form): Pass in shared part and adjust.
15333 (vect_analyze_loop_2): Pass in storage for the number of
15334 stmts. Move loop nest finding to the caller. Compute
15336 (vect_analyze_loop): Pass in shared part.
15337 (vect_transform_loop): Verify shared datarefs are unchanged.
15338 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
15339 constructor parameter for shared part.
15340 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
15341 (vect_slp_bb): Verify shared datarefs are unchanged before
15343 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
15345 (new_stmt_vec_info): Initialize DR_AUX misalignment to
15346 DR_MISALIGNMENT_UNINITIALIZED.
15347 * tree-vectorizer.c (vec_info::vec_info): Add constructor
15348 parameter for shared part.
15349 (vec_info::~vec_info): Adjust.
15350 (vec_info_shared::vec_info_shared): New.
15351 (vec_info_shared::~vec_info_shared): Likewise.
15352 (vec_info_shared::save_datarefs): Likewise.
15353 (vec_info_shared::check_datarefs): Likewise.
15354 (try_vectorize_loop_1): Construct shared part live for analyses
15355 of a single loop for multiple vector sizes.
15356 * tree-parloops.c (gather_scalar_reductions): Adjust.
15358 2018-06-25 Richard Biener <rguenther@suse.de>
15360 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
15361 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
15362 (vect_analyze_data_refs): Remove similar code from here and
15363 simplify accordingly.
15365 2018-06-25 Richard Biener <rguenther@suse.de>
15367 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
15368 for reverse storage order accesses rather than asserting
15369 they cannot happen here.
15371 2018-06-25 Tom de Vries <tdevries@suse.de>
15374 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
15375 Use data16 instead of .byte for insn prefix.
15377 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
15380 * parser.c (make_char_string_pack): Pass this literal chars
15381 through cpp_interpret_string.
15382 (cp_parser_userdef_numeric_literal): Check the result of
15383 make_char_string_pack.
15385 2018-06-24 Maya Rashish <coypu@sdf.org>
15387 * ginclude/stddef.h: Simplify conditions around avoiding
15388 re-definition of __size_t.
15390 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
15392 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
15393 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
15395 2018-06-22 Maya Rashish <coypu@sdf.org>
15397 * doc/invoke.texi (mno-fancy-math-387): Update for changes
15398 made to OpenBSD and NetBSD through the years.
15400 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
15402 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
15403 behavior of vec_pack (vector double, vector double) to match
15404 behavior of vec_float2 (vector double, vector double).
15406 2018-06-22 Olivier Hainque <hainque@adacore.com>
15408 * gimplify.c (gimplify_function_tree): Prevent creation
15409 of a trampoline for the address of the current function
15410 passed to entry/exit instrumentation hooks.
15412 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
15415 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
15418 2018-06-22 Martin Liska <mliska@suse.cz>
15420 PR tree-optimization/86263
15421 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
15422 Bail out if is_enabled is false.
15423 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
15425 (jump_table_cluster::is_enabled): New function.
15427 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
15429 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
15430 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
15431 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
15432 (lto_input_ts_binfo_tree_pointers): Likewise.
15433 * tree-streamer-out.c (streamer_write_tree_bitfields,
15434 write_ts_binfo_tree_pointers): Likewise.
15435 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
15437 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
15439 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
15441 2018-06-22 Martin Liska <mliska@suse.cz>
15443 * symbol-summary.h (get): Make it pure and inline move
15444 functionality from ::get function.
15445 (get): Remove and inline into ::get and ::get_create.
15446 (get_create): Move code from ::get function.
15448 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15451 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
15452 -x assembler-with-cpp.
15454 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15456 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
15457 _FILE_OFFSET_BITS=64 for C++.
15459 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
15461 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
15462 conversion insn that shows up when pr85657-3.c is compiled using
15463 IEEE 128-bit long double.
15464 (neg<mode>2_internal): Use the correct mode to check whether the
15465 mode is IBM extended.
15466 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
15467 multiply and divide external functions from being created more
15470 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
15472 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
15474 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
15475 the edge can be forwarded.
15476 (cfg_layout_merge_blocks): Likewise.
15478 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
15480 * except.c (finish_eh_generation): Commit edge insertions only after
15481 the EH edges have been redirected from post-landing to landing pads.
15483 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
15485 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
15486 create_tmp_var_for to create the FRAME decl.
15487 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
15489 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
15491 * tree-inline.c (copy_edges_for_bb): Minor tweak.
15492 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
15493 debug statement when resetting its value.
15494 (expand_call_inline): Copy the locus of the call onto the assignment
15495 of the return value, if any. Use local variable in more cases.
15497 2018-06-21 Martin Liska <mliska@suse.cz>
15499 * ipa-pure-const.c (propagate_nothrow): Use
15500 funct_state_summaries->get.
15501 (dump_malloc_lattice): Likewise.
15502 (propagate_malloc): Likewise.
15504 2018-06-21 Richard Biener <rguenther@suse.de>
15506 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
15507 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
15508 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
15510 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
15511 BLOCK_ABSTRACT_ORIGIN unconditionally.
15513 2018-06-21 David Malcolm <dmalcolm@redhat.com>
15515 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
15517 * ipa-reference.c (ipa_reference_c_finalize): Delete
15518 ipa_ref_opt_sum_summaries and set it to NULL.
15520 2018-06-21 Tom de Vries <tdevries@suse.de>
15522 PR tree-optimization/85859
15523 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
15524 test with comment from bb_no_side_effects_p.
15526 2018-06-21 Richard Biener <rguenther@suse.de>
15528 PR tree-optimization/86232
15529 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
15530 max for constant niter.
15532 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
15534 * config/aarch64/aarch64-simd.md
15535 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
15537 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
15539 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
15540 Make opernads of the unspec commutative.
15542 2018-06-21 Richard Biener <rguenther@suse.de>
15544 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
15545 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
15546 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
15547 (vect_analyze_data_ref_dependence): Re-order checks to deal with
15549 (vect_record_base_alignments): Do not record base alignment
15550 for gathers or scatters.
15551 (vect_compute_data_ref_alignment): Drop return value that is always
15552 true. Bail out early for gathers or scatters.
15553 (vect_enhance_data_refs_alignment): Bail out early for gathers
15555 (vect_find_same_alignment_drs): Likewise.
15556 (vect_analyze_data_refs_alignment): Remove dead code.
15557 (vect_slp_analyze_and_verify_node_alignment): Likewise.
15558 (vect_analyze_data_refs): For possible gathers or scatters do
15559 not create an alternate DR, just check their possible validity
15560 and mark them. Adjust DECL_NONALIASED handling to not rely
15561 on DR_BASE_ADDRESS.
15562 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
15563 update inits of gathers or scatters.
15564 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
15565 Also copy gather/scatter flag to pattern vinfo.
15567 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
15569 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
15570 behavior of vec_packsu (vector unsigned long long, vector unsigned
15571 long long) to match behavior of vec_packs with same signature.
15573 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
15574 Thomas Schwinge <thomas@codesourcery.com>
15575 Cesar Philippidis <cesar@codesourcery.com>
15577 * gimplify.c (gimplify_scan_omp_clauses): Add support for
15578 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
15579 (gimplify_adjust_omp_clauses): Likewise.
15580 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
15581 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
15582 (gimplify_omp_target_update): Update handling of acc update and
15584 * omp-low.c (install_var_field): Remove unused parameter
15585 base_pointers_restrict.
15586 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
15587 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
15589 (omp_target_base_pointers_restrict_p): Delete.
15590 (scan_omp_target): Update call to scan_sharing_clauses.
15591 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
15593 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
15594 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
15595 (convert_local_omp_clauses): Likewise.
15596 * tree-pretty-print.c (dump_omp_clause): Likewise.
15597 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
15599 (omp_clause_code_name): Likewise.
15601 2018-06-20 Jakub Jelinek <jakub@redhat.com>
15604 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
15607 PR tree-optimization/86231
15608 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
15609 anti-range don't overwrite *vr0min before using it to compute *vr0max.
15611 2018-06-20 Tom de Vries <tdevries@suse.de>
15613 PR tree-optimization/86097
15614 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
15615 iv type if signedness of iv type is not the same as that of *nit.
15617 2018-06-20 Jakub Jelinek <jakub@redhat.com>
15619 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
15620 EDGE_EH edges, verify they are all EDGE_EH.
15622 2018-06-20 Maya Rashish <coypu@sdf.org>
15624 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
15626 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15628 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
15629 * config/aarch64/aarch64.c (xgene1_tunings): Add
15630 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
15631 (aarch64_mode_valid_for_sched_fusion_p):
15632 Allow 16-byte modes.
15633 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
15634 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
15636 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
15638 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
15639 * config/aarch64/iterators.md (VQ2): New mode iterator.
15641 2018-06-20 Martin Liska <mliska@suse.cz>
15643 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
15644 Change default ratio from 10 to 8.
15646 2018-06-20 Martin Liska <mliska@suse.cz>
15648 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
15650 (bit_test_cluster::find_bit_tests): Likewise.
15651 (switch_decision_tree::analyze_switch_statement): Find clusters.
15652 * tree-switch-conversion.h (struct jump_table_cluster): Document
15655 2018-06-20 Martin Liska <mliska@suse.cz>
15657 * tree-switch-conversion.c (switch_conversion::collect):
15658 Record m_uniq property.
15659 (switch_conversion::expand): Bail out for special conditions.
15660 (group_cluster::~group_cluster): New.
15661 (group_cluster::group_cluster): Likewise.
15662 (group_cluster::dump): Likewise.
15663 (jump_table_cluster::emit): New.
15664 (switch_decision_tree::fix_phi_operands_for_edges): New.
15665 (struct case_node): Remove struct.
15666 (jump_table_cluster::can_be_handled): New.
15667 (case_values_threshold): Moved to header.
15668 (reset_out_edges_aux): Likewise.
15669 (jump_table_cluster::is_beneficial): New.
15670 (bit_test_cluster::can_be_handled): Likewise.
15671 (add_case_node): Remove.
15672 (bit_test_cluster::is_beneficial): New.
15673 (case_bit_test::cmp): New.
15674 (bit_test_cluster::emit): New.
15675 (expand_switch_as_decision_tree_p): Remove.
15676 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
15677 (fix_phi_operands_for_edge): Likewise.
15678 (switch_decision_tree::analyze_switch_statement): New.
15679 (compute_cases_per_edge): Move ...
15680 (switch_decision_tree::compute_cases_per_edge): ... here.
15681 (try_switch_expansion): Likewise.
15682 (switch_decision_tree::try_switch_expansion): Likewise.
15683 (record_phi_operand_mapping): Likewise.
15684 (switch_decision_tree::record_phi_operand_mapping): Likewise.
15685 (emit_case_decision_tree): Likewise.
15686 (switch_decision_tree::emit): Likewise.
15687 (balance_case_nodes): Likewise.
15688 (switch_decision_tree::balance_case_nodes): Likewise.
15689 (dump_case_nodes): Likewise.
15690 (switch_decision_tree::dump_case_nodes): Likewise.
15691 (emit_jump): Likewise.
15692 (switch_decision_tree::emit_jump): Likewise.
15693 (emit_cmp_and_jump_insns): Likewise.
15694 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
15695 (emit_case_nodes): Likewise.
15696 (switch_decision_tree::emit_case_nodes): Likewise.
15697 (conditional_probability): Remove.
15698 * tree-switch-conversion.h (enum cluster_type): New.
15700 (struct cluster): Likewise.
15701 (cluster::cluster): Likewise.
15702 (struct simple_cluster): Likewise.
15703 (simple_cluster::simple_cluster): Likewise.
15704 (struct group_cluster): Likewise.
15705 (struct jump_table_cluster): Likewise.
15706 (struct bit_test_cluster): Likewise.
15707 (struct min_cluster_item): Likewise.
15708 (struct case_tree_node): Likewise.
15709 (case_tree_node::case_tree_node): Likewise.
15710 (jump_table_cluster::case_values_threshold): Likewise.
15711 (struct case_bit_test): Likewise.
15712 (struct switch_decision_tree): Likewise.
15713 (struct switch_conversion): Likewise.
15714 (switch_decision_tree::reset_out_edges_aux): Likewise.
15716 2018-06-20 Martin Liska <mliska@suse.cz>
15718 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
15719 (hoist_edge_and_branch_if_true): Likewise.
15720 (expand_switch_using_bit_tests_p): Likewise.
15721 (struct case_bit_test): Likewise.
15722 (case_bit_test_cmp): Likewise.
15723 (emit_case_bit_tests): Likewise.
15724 (switch_conversion::switch_conversion): New class.
15725 (struct switch_conv_info): Remove old struct.
15726 (collect_switch_conv_info): More to ...
15727 (switch_conversion::collect): ... this.
15728 (check_range): Likewise.
15729 (switch_conversion::check_range): Likewise.
15730 (check_all_empty_except_final): Likewise.
15731 (switch_conversion::check_all_empty_except_final): Likewise.
15732 (check_final_bb): Likewise.
15733 (switch_conversion::check_final_bb): Likewise.
15734 (create_temp_arrays): Likewise.
15735 (switch_conversion::create_temp_arrays): Likewise.
15736 (free_temp_arrays): Likewise.
15737 (gather_default_values): Likewise.
15738 (switch_conversion::gather_default_values): Likewise.
15739 (build_constructors): Likewise.
15740 (switch_conversion::build_constructors): Likewise.
15741 (constructor_contains_same_values_p): Likewise.
15742 (switch_conversion::contains_same_values_p): Likewise.
15743 (array_value_type): Likewise.
15744 (switch_conversion::array_value_type): Likewise.
15745 (build_one_array): Likewise.
15746 (switch_conversion::build_one_array): Likewise.
15747 (build_arrays): Likewise.
15748 (switch_conversion::build_arrays): Likewise.
15749 (gen_def_assigns): Likewise.
15750 (switch_conversion::gen_def_assigns): Likewise.
15751 (prune_bbs): Likewise.
15752 (switch_conversion::prune_bbs): Likewise.
15753 (fix_phi_nodes): Likewise.
15754 (switch_conversion::fix_phi_nodes): Likewise.
15755 (gen_inbound_check): Likewise.
15756 (switch_conversion::gen_inbound_check): Likewise.
15757 (process_switch): Use the newly created class.
15758 (switch_conversion::expand): New.
15759 (switch_conversion::~switch_conversion): New.
15760 * tree-switch-conversion.h: New file.
15762 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
15764 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
15765 tree-vect-patterns.c.
15766 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
15767 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
15768 (vect_recog_sad_pattern): Likewise.
15769 (vect_recog_widen_sum_pattern): Likewise.
15770 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
15771 (vect_recog_widen_shift_pattern): Remove the type_in argument.
15772 (vect_recog_rotate_pattern): Likewise.
15773 (vect_recog_mult_pattern): Likewise.
15774 (vect_recog_vector_vector_shift_pattern): Likewise.
15775 (vect_recog_divmod_pattern): Likewise.
15776 (vect_recog_mixed_size_cond_pattern): Likewise.
15777 (vect_recog_bool_pattern): Likewise.
15778 (vect_recog_mask_conversion_pattern): Likewise.
15779 (vect_try_gather_scatter_pattern): Likewise.
15780 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
15781 (vect_recog_over_widening_pattern): Likewise.
15782 (vect_recog_gather_scatter_pattern): Likewise.
15783 (vect_recog_func_ptr): Move from tree-vectorizer.h
15784 (vect_vect_recog_func_ptrs): Move further down the file.
15785 (vect_recog_func): Likewise. Remove the third argument.
15786 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
15787 (vect_pattern_recog_1): Expect the pattern function to do any
15788 necessary target tests. Also expect it to provide a vector type.
15789 Remove the type_in handling.
15791 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
15793 * tree-vect-patterns.c (vect_pattern_detected): New function.
15794 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
15795 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
15796 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
15797 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
15798 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
15799 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
15800 (vect_recog_mask_conversion_pattern)
15801 (vect_try_gather_scatter_pattern): Likewise.
15803 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
15805 * tree-vect-patterns.c (vect_get_internal_def): New function.
15806 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
15807 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
15808 (search_type_for_mask_1): Use it.
15810 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
15812 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
15813 redundant WIDEN_SUM_EXPR handling.
15814 (vect_recog_sad_pattern): Likewise.
15816 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
15818 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
15819 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
15820 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
15821 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
15822 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
15824 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
15826 * tree-vect-stmts.c (vectorizable_call): Make sure that we
15827 use the stmt_vec_info of the original bb statement for the
15828 new zero assignment, even if the call is part of a pattern.
15830 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
15832 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
15833 that the sequence is attached to the original statement rather
15834 than the pattern statement.
15835 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
15836 PATTERN_DEF_SEQ from the original statement rather than
15837 the main pattern statement.
15838 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
15839 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
15840 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
15842 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
15844 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
15845 definition statements before the early exit for statements that aren't
15847 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
15849 (vect_transform_loop): ...here. Process pattern definition
15850 statements without first checking whether the main pattern
15851 statement is live or relevant.
15853 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
15855 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
15856 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
15858 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
15860 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
15861 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
15862 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
15863 (expand_block_compare): Change select_block_compare_mode call.
15864 (expand_strncmp_align_check): Use new functions, fix comment.
15865 (emit_final_str_compare_gpr): New function.
15866 (expand_strn_compare): Refactor and clean up code.
15867 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
15869 2018-06-19 Tony Reix <tony.reix@atos.com>
15870 Damien Bergamini <damien.bergamini@atos.com>
15871 David Edelsohn <dje.gcc@gmail.com>
15873 * collect2.c (static_obj): New variable.
15874 (static_libs): New variable.
15875 (is_in_list): Uncomment declaration.
15876 (main): Track AIX libraries linked statically.
15877 (is_in_list): Uncomment definition.
15878 (scan_prog_file): Don't add AIX shared libraries initializer
15879 to constructor list if linking statically.
15881 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
15883 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
15885 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
15887 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
15889 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
15892 2018-06-19 Martin Liska <mliska@suse.cz>
15894 * config/i386/i386.c (ix86_can_inline_p): Do not use
15895 ipa_fn_summaries::get_create.
15896 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
15898 (devirtualization_time_bonus): Likewise.
15899 (ipcp_propagate_stage): Likewise.
15900 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
15901 (edge_set_predicate): Likewise.
15902 (evaluate_conditions_for_known_args): Likewise.
15903 (evaluate_properties_for_edge): Likewise.
15904 (ipa_call_summary::reset): Tranform to ...
15905 (ipa_call_summary::~ipa_call_summary): ... this.
15906 (ipa_fn_summary::reset): Transform to ...
15907 (ipa_fn_summary::~ipa_fn_summary): ... this.
15908 (ipa_fn_summary_t::remove): Rename to ...
15909 (ipa_fn_summary_t::remove_callees): ... this.
15910 (ipa_fn_summary_t::duplicate): Use placement new
15911 instead of memory copy.
15912 (ipa_call_summary_t::duplicate): Likewise.
15913 (ipa_call_summary_t::remove): Remove.
15914 (dump_ipa_call_summary): Change get_create to get.
15915 (ipa_dump_fn_summary): Dump only when summary exists.
15916 (analyze_function_body): Use symbol_summary::get instead
15918 (compute_fn_summary): Likewise.
15919 (estimate_edge_devirt_benefit): Likewise.
15920 (estimate_edge_size_and_time): Likewise.
15921 (inline_update_callee_summaries): Likewise.
15922 (remap_edge_change_prob): Likewise.
15923 (remap_edge_summaries): Likewise.
15924 (ipa_merge_fn_summary_after_inlining): Likewise.
15925 (write_ipa_call_summary): Likewise.
15926 (ipa_fn_summary_write): Likewise.
15927 (ipa_free_fn_summary): Likewise.
15928 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
15929 (struct ipa_call_summary): Likewise.
15930 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
15932 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
15933 (estimate_size_after_inlining): Likewise.
15934 (estimate_growth): Likewise.
15935 (growth_likely_positive): Likewise.
15936 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
15937 (inline_call): Likewise.
15938 * ipa-inline.c (caller_growth_limits): Likewise.
15939 (can_inline_edge_p): Likewise.
15940 (can_inline_edge_by_limits_p): Likewise.
15941 (compute_uninlined_call_time): Likewise.
15942 (compute_inlined_call_time): Likewise.
15943 (want_inline_small_function_p): Likewise.
15944 (edge_badness): Likewise.
15945 (update_caller_keys): Likewise.
15946 (update_callee_keys): Likewise.
15947 (inline_small_functions): Likewise.
15948 (inline_to_all_callers_1): Likewise.
15949 (dump_overall_stats): Likewise.
15950 (early_inline_small_functions): Likewise.
15951 (early_inliner): Likewise.
15952 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
15953 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
15954 * ipa-pure-const.c (malloc_candidate_p): Likewise.
15955 * ipa-split.c (execute_split_functions): Likewise.
15956 * symbol-summary.h: Likewise.
15957 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
15959 2018-06-19 Richard Biener <rguenther@suse.de>
15961 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
15962 (vectorize_loops): ... here. Fix dbgcnt handling.
15963 (try_vectorize_loop): Wrap try_vectorize_loop_1.
15965 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
15968 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
15969 ieee128 argument takes up only one (vector) register, not two (floating
15972 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
15974 * gimplify.c (gimplify_init_constructor): Really never clear for an
15975 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
15977 2018-06-19 Richard Biener <rguenther@suse.de>
15979 PR tree-optimization/86179
15980 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
15981 after failed recognition.
15983 2018-06-18 Martin Sebor <msebor@redhat.com>
15985 PR middle-end/85602
15986 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
15987 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
15988 Handle integer subtraction.
15989 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
15990 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
15992 2018-06-18 David Malcolm <dmalcolm@redhat.com>
15994 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
15995 param from rtx to rtx_insn *.
15996 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
15998 (frv_ifcvt_modify_insn): Likwise.
15999 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
16000 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
16001 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
16002 as_a <rtx_insn *> cast to local "unprotected_region" once
16003 it's been established that it's not NULL or pc_rtx.
16004 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
16005 param "sethi" from rtx to rtx_insn *.
16006 (nds32_group_float_insns): Likewise for param "insn".
16007 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
16009 (vax_output_int_subtract): Likewise.
16010 * config/vax/vax.c (vax_output_int_add): Likewise for param
16012 (vax_output_int_subtract): Likewise.
16013 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
16014 (emit_pattern_after): Likewise for param "after".
16015 (emit_insn_after): Likewise.
16016 (emit_jump_insn_after): Likewise.
16017 (emit_call_insn_after): Likewise.
16018 (emit_debug_insn_after): Likewise.
16019 (emit_pattern_before): Likewise for param "before".
16020 (emit_insn_before): Likewise.
16021 (emit_jump_insn_before): Likewise.
16022 * final.c (get_insn_template): Likewise for param "insn", removing
16024 * output.h (get_insn_template): Likewise for 2nd param.
16025 * rtl.h (emit_insn_before): Likewise.
16026 (emit_jump_insn_before): Likewise.
16027 (emit_debug_insn_before_noloc): Likewise.
16028 (emit_insn_after): Likewise.
16029 (emit_jump_insn_after): Likewise.
16030 (emit_call_insn_after): Likewise.
16031 (emit_debug_insn_after): Likewise.
16032 (set_insn_deleted): Likewise for param.
16034 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
16037 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
16038 floating point modes, so that IFmode is numerically greater than
16039 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
16040 to declare the ordering. This prevents IFmode from being
16041 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
16042 machine. Include rs6000-modes.h to share the fractional values
16043 between genmodes* and the rest of the compiler.
16044 (IFmode): Likewise.
16045 (KFmode): Likewise.
16046 (TFmode): Likewise.
16047 * config/rs6000/rs6000-modes.h: New file.
16048 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
16049 meaning of rs6000_long_double_size so that 126..128 selects an
16050 appropriate 128-bit floating point type.
16051 (rs6000_option_override_internal): Likewise.
16052 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
16053 (TARGET_LONG_DOUBLE_128): Change the meaning of
16054 rs6000_long_double_size so that 126..128 selects an appropriate
16055 128-bit floating point type.
16056 (LONG_DOUBLE_TYPE_SIZE): Update comment.
16057 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
16058 source and destination to match the standard usage.
16059 (truncifkf2): Likewise.
16060 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
16061 ISA 2.07 to use an explicit clobber, instead of passing in a
16063 (copysign<mode>3_soft): Likewise.
16065 2018-06-18 David Malcolm <dmalcolm@redhat.com>
16067 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
16068 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
16069 (vect_slp_analyze_instance_dependence): Likewise.
16070 (vect_enhance_data_refs_alignment): Likewise.
16071 (vect_analyze_data_refs_alignment): Likewise.
16072 (vect_slp_analyze_and_verify_instance_alignment
16073 (vect_analyze_data_ref_accesses): Likewise.
16074 (vect_prune_runtime_alias_test_list): Likewise.
16075 (vect_analyze_data_refs): Likewise.
16076 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
16077 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
16078 (vect_analyze_scalar_cycles_1): Likewise.
16079 (vect_get_loop_niters): Likewise.
16080 (vect_analyze_loop_form_1): Likewise.
16081 (vect_update_vf_for_slp): Likewise.
16082 (vect_analyze_loop_operations): Likewise.
16083 (vect_analyze_loop): Likewise.
16084 (vectorizable_induction): Likewise.
16085 (vect_transform_loop): Likewise.
16086 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
16087 * tree-vect-slp.c (vect_analyze_slp): Likewise.
16088 (vect_make_slp_decision): Likewise.
16089 (vect_detect_hybrid_slp): Likewise.
16090 (vect_slp_analyze_operations): Likewise.
16091 (vect_slp_bb): Likewise.
16092 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
16093 (vectorizable_bswap): Likewise.
16094 (vectorizable_call): Likewise.
16095 (vectorizable_simd_clone_call): Likewise.
16096 (vectorizable_conversion): Likewise.
16097 (vectorizable_assignment): Likewise.
16098 (vectorizable_shift): Likewise.
16099 (vectorizable_operation): Likewise.
16100 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
16102 2018-06-18 Martin Sebor <msebor@redhat.com>
16104 PR tree-optimization/81384
16105 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
16106 * builtins.c (expand_builtin_strnlen): New function.
16107 (expand_builtin): Call it.
16108 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
16109 * builtins.def (BUILT_IN_STRNLEN): New.
16110 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
16111 Warn for bounds in excess of maximum object size.
16112 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
16113 single-value ranges. Handle strnlen.
16114 (handle_builtin_strlen): Handle strnlen.
16115 (strlen_check_and_optimize_stmt): Same.
16116 * doc/extend.texi (Other Builtins): Document strnlen.
16118 2018-06-18 Maya Rashish <coypu@sdf.org>
16120 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
16121 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
16122 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
16124 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
16126 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
16128 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
16130 * tree.c (escaped_string::escape): Replace cast to char * by
16131 const_cast<char *> (unescaped).
16133 2018-06-18 Nick Clifton <nickc@redhat.com>
16136 * tree.c (escaped_string): New class. Converts an unescaped
16137 string into its escaped equivalent.
16138 (warn_deprecated_use): Use the new class to convert the
16139 deprecation message, if present.
16140 (test_escaped_strings): New self test.
16141 (test_c_tests): Add test_escaped_strings.
16142 * doc/extend.texi (deprecated): Add a note that the
16143 deprecation message is affected by the -fmessage-length
16144 option, and that control characters will be escaped.
16145 (#pragma GCC error): Document this pragma.
16146 (#pragma GCC warning): Likewise.
16147 * doc/invoke.texi (-fmessage-length): Document this option's
16148 effect on the #warning and #error preprocessor directives and
16149 the deprecated attribute.
16151 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
16153 * tree.c (decl_value_expr_lookup): Revert latest change.
16154 (decl_value_expr_insert): Likewise.
16156 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
16158 * gimplify.c (nonlocal_vlas): Delete.
16159 (nonlocal_vla_vars): Likewise.
16160 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
16162 (gimplify_body): Do not create and destroy nonlocal_vlas.
16163 * tree-nested.c: Include diagnostic.h.
16164 (use_pointer_in_frame): Tweak.
16165 (lookup_field_for_decl): Add assertion and declare the transformation.
16166 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
16167 internal error when the reference is in a wrong context. Do not
16168 create a debug decl by default.
16169 (note_nonlocal_block_vlas): Delete.
16170 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
16171 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
16172 create a debug decl by default.
16173 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
16174 call is in a wrong context.
16175 (fixup_vla_decls): New function.
16176 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
16177 debug variables were created.
16178 * tree.c (decl_value_expr_lookup): Add checking assertion.
16179 (decl_value_expr_insert): Likewise.
16181 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
16183 PR middle-end/82479
16184 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
16185 * tree-scalar-evolution.c (interpret_expr): Likewise.
16186 (expression_expensive_p): Likewise.
16187 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
16188 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
16189 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
16190 (ssa_defined_by_minus_one_stmt_p): New.
16192 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
16194 PR middle-end/64946
16195 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
16196 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
16197 * dojump.c (do_jump): Likewise.
16198 * expr.c (expand_expr_real_2): Check operand type's sign.
16199 * fold-const.c (const_unop): Handle ABSU_EXPR.
16200 (fold_abs_const): Likewise.
16201 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
16202 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
16203 (strip_sign_op_1): Likesise.
16204 * match.pd: Add new pattern to generate ABSU_EXPR.
16205 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
16206 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
16207 * tree-eh.c (operation_could_trap_helper_p): Likewise.
16208 * tree-inline.c (estimate_operator_cost): Likewise.
16209 * tree-pretty-print.c (dump_generic_node): Likewise.
16210 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
16211 * tree.def (ABSU_EXPR): New.
16213 2018-06-16 Jakub Jelinek <jakub@redhat.com>
16215 PR middle-end/86095
16216 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
16217 documented as preserved for backward compatibility only.
16218 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
16220 PR rtl-optimization/86108
16221 * bb-reorder.c (create_forwarder_block): Renamed to ...
16222 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
16223 jump from new landing pad to the second part.
16224 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
16227 2018-06-15 Jakub Jelinek <jakub@redhat.com>
16229 PR middle-end/85878
16230 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
16231 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
16232 Only call store_expr for halves if the mode is the same.
16234 PR middle-end/86123
16235 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
16236 Fix up comment formatting.
16238 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
16240 * typed-splay-tree.h (typed_splay_tree::remove): New function.
16241 (typed_splay_tree::closure,
16242 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
16243 (typed_splay_tree::typed_splay_tree,
16244 typed_splay_tree::operator =): Declared private.
16245 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
16246 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
16247 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
16248 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
16249 typed_splay_tree::splay_tree_splay,
16250 typed_splay_tree::splay_tree_foreach_helper,
16251 typed_splay_tree::splay_tree_insert,
16252 typed_splay_tree::splay_tree_remove,
16253 typed_splay_tree::splay_tree_lookup,
16254 typed_splay_tree::splay_tree_predecessor,
16255 typed_splay_tree::splay_tree_successor,
16256 typed_splay_tree::splay_tree_min,
16257 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
16258 (typed_splay_tree::root, typed_splay_tree::comp,
16259 typed_splay_tree::delete_key,
16260 typed_splay_tree::delete_value): New data members.
16261 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
16262 typed_splay_tree::remove.
16264 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
16266 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
16267 -mginv and -mno-ginv to the assembler.
16268 * config/mips/mips.opt (-mcrc): New option.
16269 (-mginv): Likewise.
16270 * doc/invoke.text (-mcrc): Document.
16271 (-mginv): Likewise.
16273 2018-06-15 Nick Clifton <nickc@redhat.com>
16276 * tree.c (escaped_string): New class. Converts an unescaped
16277 string into its escaped equivalent.
16278 (warn_deprecated_use): Use the new class to convert the
16279 deprecation message, if present.
16280 (test_escaped_strings): New self test.
16281 (test_c_tests): Add test_escaped_strings.
16282 * doc/extend.texi (deprecated): Add a note that the
16283 deprecation message is affected by the -fmessage-length
16284 option, and that control characters will be escaped.
16285 (#pragma GCC error): Document this pragma.
16286 (#pragma GCC warning): Likewise.
16287 * doc/invoke.texi (-fmessage-length): Document this option's
16288 effect on the #warning and #error preprocessor directives and
16289 the deprecated attribute.
16291 2018-06-15 Richard Biener <rguenther@suse.de>
16293 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
16294 here, also noting vector size used.
16295 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
16296 size used in MSG_OPTIMIZED_LOCATIONS dump.
16297 (pass_slp_vectorize::execute): Adjust.
16299 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
16302 * config/arc/arc.c (arc_return_address_register): Fix
16305 2018-06-15 Richard Biener <rguenther@suse.de>
16307 PR middle-end/86159
16308 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
16309 leave useless conversion stripping to force_gimple_operand_gsi.
16310 (gimplify_build2): Likewise.
16311 (gimplify_build1): Likewise.
16313 2018-06-15 Richard Biener <rguenther@suse.de>
16315 PR middle-end/86076
16316 * tree-cfg.c (move_stmt_op): unshare invariant addresses
16317 before adjusting their block.
16319 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
16321 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
16322 multilibs for *-*-rtems*.
16323 * config/riscv/t-rtems: New file.
16325 2018-06-14 Jakub Jelinek <jakub@redhat.com>
16327 PR middle-end/86122
16328 * match.pd ((A +- CST1) +- CST2): Punt if last resort
16329 unsigned_type_for returns NULL.
16332 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
16333 subregs of multi-word pseudos unless the float mode has word size.
16335 2018-06-14 Richard Biener <rguenther@suse.de>
16337 PR middle-end/86139
16338 * tree-vect-generic.c (build_word_mode_vector_type): Remove
16339 duplicate and harmful type_hash_canon.
16340 * tree.c (type_hash_canon): Assert we didn't find ourselves.
16342 2018-06-14 Richard Biener <rguenther@suse.de>
16345 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
16348 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
16350 * config/rtems.h (STDINT_LONG32): Define.
16352 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
16353 Prachi Godbole <prachi.godbole@imgtec.com>
16355 * config/mips/mips-cpus.def: Define P6600.
16356 * config/mips/mips-tables.opt: Regenerate.
16357 * config/mips/mips.c (mips_ucbranch_type): New enum.
16358 (mips_rtx_cost_data): Add support for P6600.
16359 (mips_issue_rate): Likewise.
16360 (mips_multipass_dfa_lookahead): Likewise.
16361 (mips_avoid_hazard): Likewise.
16362 (mips_reorg_process_insns): Likewise.
16363 (mips_classify_branch_p6600): New function.
16364 * config/mips/mips.h (TUNE_P6600): New define.
16365 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
16366 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
16367 * config/mips/mips.md: Include p6600.md.
16368 (processor): Add p6600.
16369 * config/mips/p6600.md: New file.
16370 * doc/invoke.texi: Add p6600 to supported architectures.
16372 2018-06-13 Martin Sebor <msebor@redhat.com>
16374 PR tree-optimization/86114
16375 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
16377 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
16379 2018-06-13 Richard Biener <rguenther@suse.de>
16381 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
16382 Properly set vector type of the intermediate stmt.
16383 * tree-vect-stmts.c (vectorizable_operation): The destination
16384 var always has vectype_out type.
16386 2018-06-13 Jeff Law <law@redhat.com>
16388 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
16389 integer 0 for argument to print_rtl_with_bb.
16390 (rl78_reorg): Likewise.
16392 2018-06-13 David Malcolm <dmalcolm@redhat.com>
16394 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
16395 from rtx to rtx_insn *.
16396 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
16398 (add_sched_insns_for_speculation): Likewise for local "target",
16399 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
16400 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
16401 from rtx_insn ** to rtx_code_label **.
16402 (reorg_emit_nops): Likewise.
16403 (c6x_reorg): Likewise for local "call_labels".
16404 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
16406 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
16407 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
16408 the loops over LABEL_REFS.
16409 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
16411 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
16412 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
16413 (split_branches): Strengthen local "olabel" from rtx to
16414 rtx_insn *, adding a safe_as_a cast.
16415 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
16417 (add_insn_after): Likewise for first two params.
16418 (add_insn_before): Likewise.
16419 (remove_insn): Likewise for param.
16420 (emit_pattern_before_noloc): Likewise for second and third params.
16421 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
16422 (emit_call_insn_before_noloc): Likewise.
16423 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
16425 (emit_barrier_before): Likewise.
16426 (emit_label_before): Strengthen "label" param from "rtx" to
16427 "rtx_code_label *". Strengthen "before" param from "rtx" to
16429 (emit_insn_after_1): Strengthen "after" param from "rtx" to
16431 (emit_pattern_after_noloc): Likewise.
16432 (emit_insn_after_noloc): Likewise.
16433 (emit_jump_insn_after_noloc): Likewise.
16434 (emit_call_insn_after_noloc): Likewise.
16435 (emit_debug_insn_after_noloc): Likewise.
16436 (emit_barrier_after): Likewise.
16437 (emit_label_after): Likewise for both params.
16438 (emit_pattern_after_setloc): Likewise for "after" param. Convert
16439 "loc" param from "int" to "location_t".
16440 (emit_insn_after_setloc): Likewise.
16441 (emit_jump_insn_after_setloc): Likewise.
16442 (emit_call_insn_after_setloc): Likewise.
16443 (emit_debug_insn_after_setloc): Likewise.
16444 (emit_pattern_before_setloc): Likewise for "before" param. Convert
16445 "loc" param from "int" to "location_t".
16446 (emit_pattern_before): Convert NULL_RTX to NULL.
16447 (emit_insn_before_setloc): Convert "loc" param from "int" to
16449 (emit_jump_insn_before_setloc): Likewise.
16450 (emit_call_insn_before_setloc): Likewise.
16451 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
16452 rtx_insn *. Convert "loc" param from "int" to "location_t".
16453 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
16454 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
16455 Convert 3rd param from "int" to "location_t".
16456 (emit_barrier_before, emit_barrier_after, next_real_insn):
16457 Strengthen param from rtx to rtx_insn *.
16458 (emit_label_before): Strengthen 1st param from "rtx" to
16459 "rtx_code_label *". Strengthen 2nd param from "rtx" to
16461 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
16462 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
16463 Strengthen 2nd param from "rtx" to "rtx_insn *".
16464 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
16465 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
16466 Likewise. Convert 3rd param from "int" to "location_t".
16467 (emit_label_after): Strengthen 1st param from "rtx" to
16468 "rtx_code_label *".
16469 (next_real_insn, remove_insn): Strengthen param from "rtx" to
16471 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
16472 from "rtx" to "rtx_insn *".
16474 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
16476 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
16477 bodies streamed in with -Q.
16478 * dumpfile.c (dump_files): Add lto-stream-out dump file.
16479 * dumpfile.h (tree_dump_index): Add lto_stream_out.
16480 * gimple-streamer-out.c: Include gimple-pretty-print.h
16481 (output_bb): Dump stmts streamed.
16482 * lto-section-out.c: Include print-tree.h
16483 (lto_begin_section): Dump sections created.
16484 (lto_output_decl_index): Dump decl encoded.
16485 * lto-streamer-out.c: Include print-tree.h
16486 (create_output_block): Dump output block created.
16487 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
16488 (output_function): Dump function output.
16489 (output_constructor): Dump constructor streamed.
16490 (write_global_stream): Output indexes encoded.
16491 (produce_asm_for_decls): Dump streams encoded.
16492 * lto-streamer.c (streamer_dump_file): New global var.
16493 * lto-streamer.h (streamer_dump_file): Declare.
16494 * passes.c (ipa_write_summaries): Initialize streamer dump.
16495 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
16498 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
16501 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
16502 offsets for register save directives. Emit a second batch of save
16503 directives, if need be, when the function accesses prior frames.
16505 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
16507 * config/arc/fpu.md (fmasf4): Force operand to register.
16508 (fnmasf4): Likewise.
16510 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
16512 * config/arc/arc-protos.h (arc_pad_return): Remove.
16513 * config/arc/arc.c (machine_function): Remove force_short_suffix
16515 (arc_print_operand): Adjust printing of '&'.
16516 (arc_verify_short): Remove conditional printing of short suffix.
16517 (arc_final_prescan_insn): Remove reference to size_reason.
16518 (pad_return): New function.
16519 (arc_reorg): Call pad_return.
16520 (arc_pad_return): Remove.
16521 (arc_init_machine_status): Remove reference to force_short_suffix.
16522 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
16523 (attr length): When attribute iscompact is true force to 2
16524 regardless; in the case of maybe check if we want to force the
16525 instruction to have 4 bytes length.
16526 (nopv): Change it to generate 4 byte long nop as well.
16527 (blockage): New pattern.
16528 (simple_return): Remove call to arc_pad_return.
16529 (p_return_i): Likewise.
16531 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
16533 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
16535 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
16537 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
16540 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
16542 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
16543 for ARC700 and ARCv2.
16545 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
16548 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
16549 operands[2] instead of operands[1].
16552 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
16554 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
16555 case, check whether the outer register overlaps an unallocatable
16556 register, not just whether it fits the required class.
16558 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
16560 * poly-int.h (can_div_trunc_p): Add new overload in which all values
16562 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
16563 (memrefs_conflict_p): Likewise.
16564 (init_alias_analysis): Likewise.
16565 * cfgexpand.c (expand_debug_expr): Likewise.
16566 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
16567 * cse.c (fold_rtx): Likewise.
16568 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
16569 * expr.c (emit_block_move_hints): Likewise.
16570 (clear_storage_hints, push_block, emit_push_insn): Likewise.
16571 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
16572 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
16573 (emit_group_store): Likewise.
16574 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
16575 to read the PRE/POST_MODIFY increment.
16576 * calls.c (store_one_arg): Use strip_offset.
16577 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
16579 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
16581 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
16582 (simplify_binary_operation_1): Extend CONST_INT handling to
16584 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
16585 than a HOST_WIDE_INT.
16586 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
16588 (adjust_mems, add_stores): Update accodingly.
16589 (vt_canonicalize_addr): Track polynomial offsets.
16590 (emit_note_insn_var_location): Likewise.
16591 (vt_add_function_parameter): Likewise.
16592 (vt_initialize): Likewise.
16594 2018-06-12 Jeff Law <law@redhat.com>
16596 * config.gcc (alpha*-*-freebsd*): Remove.
16597 * config/alpha/freebsd.h: Remove.
16599 2018-06-12 David Malcolm <dmalcolm@redhat.com>
16602 * spellcheck-tree.c (levenshtein_distance): Rename to...
16603 (get_edit_distance): ...this, and update for underlying renaming.
16604 * spellcheck-tree.h (levenshtein_distance): Rename to...
16605 (get_edit_distance): ...this.
16606 * spellcheck.c (levenshtein_distance): Rename to...
16607 (get_edit_distance): ...this. Convert from Levenshtein distance
16608 to Damerau-Levenshtein distance by supporting transpositions of
16609 adjacent characters. Rename "v1" to "v_next" and "v0" to
16611 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
16612 (selftest::test_edit_distance_unit_test_oneway): ...this, and
16613 update for underlying renaming.
16614 (selftest::levenshtein_distance_unit_test): Rename to...
16615 (selftest::test_get_edit_distance_unit): ...this, and update for
16616 underlying renaming.
16617 (selftest::test_find_closest_string): Add example from PR 69968
16618 where transposition helps
16619 (selftest::test_metric_conditions): Update for renaming.
16620 (selftest::test_metric_conditions): Likewise.
16621 (selftest::spellcheck_c_tests): Likewise.
16622 * spellcheck.h (levenshtein_distance): Rename both overloads to...
16623 (get_edit_distance): ...this.
16624 (best_match::consider): Update for renaming.
16626 2018-06-12 Martin Sebor <msebor@redhat.com>
16628 PR tree-optimization/85259
16629 * builtins.c (compute_objsize): Handle constant offsets.
16630 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
16631 true iff a warning has been issued.
16632 * gimple.h (gimple_nonartificial_location): New function.
16633 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
16634 gimple_nonartificial_location and handle -Wno-system-headers.
16635 (handle_builtin_stxncpy): Same.
16637 2018-06-12 Martin Sebor <msebor@redhat.com>
16640 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
16642 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
16644 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
16645 BUILTIN_VEC_XST entries for pointer to double and long long.
16647 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
16650 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
16652 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
16655 2018-06-12 Martin Liska <mliska@suse.cz>
16657 * doc/options.texi: Document IntegerRange.
16659 2018-06-12 Martin Liska <mliska@suse.cz>
16661 * config/i386/i386.opt: Make MPX-related options as Deprecated.
16662 * opt-functions.awk: Handle Deprecated flag.
16663 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
16665 (read_cmdline_option): Report warning for a deprecated option.
16666 * opts.h (struct cl_option): Add new field cl_deprecated.
16667 (CL_ERR_DEPRECATED): New.
16669 2018-06-12 Martin Liska <mliska@suse.cz>
16671 * doc/options.texi: Document Deprecated option flag.
16673 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
16675 * config/arc/arc-arch.h (arc_extras): New enum.
16676 (arc_cpu_t):Add field extra.
16677 (arc_cpu_types): Consider the extras.
16678 * config/arc/arc-cpus.def: Add extras info.
16679 * config/arc/arc-opts.h (processor_type): Consider extra field.
16680 * config/arc/arc.c (arc_override_options): Handle extra field.
16682 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
16684 * config/arc/arc-arch.h: Update ARC_OPTX macro.
16685 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
16687 * config/arc/arc.c (arc_init): Update pic warning.
16688 (irq_range): Update irq range parsing warnings.
16689 (arc_override_options): Update various warning messages.
16690 (arc_handle_aux_attribute): Likewise.
16692 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
16694 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
16696 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
16698 * doc/sourcebuild.texi: Document usage of line number 0 in verify
16699 compiler messages directives.
16701 2018-06-12 Matthew Fortune <mfortune@gmail.com>
16703 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
16704 * config/mips/mips-tables.opt: Regenerate.
16705 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
16707 * doc/invoke.texi: Document -march=i6500.
16709 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
16711 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
16712 (i6400_gpmul): Add cpu_unit.
16713 (i6400_gpdiv): Likewise.
16714 (i6400_msa_add_d): Update reservations.
16715 (i6400_msa_int_add) Likewise.
16716 (i6400_msa_short_logic3) Likewise.
16717 (i6400_msa_short_logic2) Likewise.
16718 (i6400_msa_short_logic) Likewise.
16719 (i6400_msa_move) Likewise.
16720 (i6400_msa_cmp) Likewise.
16721 (i6400_msa_short_float2) Likewise.
16722 (i6400_msa_div_d) Likewise.
16723 (i6400_msa_long_logic1) Likewise.
16724 (i6400_msa_long_logic2) Likewise.
16725 (i6400_msa_mult) Likewise.
16726 (i6400_msa_long_float2) Likewise.
16727 (i6400_msa_long_float4) Likewise.
16728 (i6400_msa_long_float5) Likewise.
16729 (i6400_msa_long_float8) Likewise.
16730 (i6400_fpu_fadd): Include frint type.
16731 (i6400_fpu_store): New define_insn_reservation.
16732 (i6400_fpu_load): Likewise.
16733 (i6400_fpu_move): Likewise.
16734 (i6400_fpu_fcmp): Likewise.
16735 (i6400_fpu_fmadd): Likewise.
16736 (i6400_int_mult): Include imul3nc type and update reservation.
16737 (i6400_int_div): Include idiv3 type and update reservation.
16738 (i6400_int_load): Update to check type not move_type.
16739 (i6400_int_store): Likewise.
16740 (i6400_int_prefetch): Set zero latency.
16742 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
16744 * gcc.c: Document new %@{...} sequence.
16745 (LINK_COMMAND_SPEC): Use it for the -L switches.
16746 (cpp_unique_options): Use it for the -I switches.
16747 (at_file_argbuf): New global variable.
16748 (in_at_file): Likewise.
16749 (alloc_args): Create at_file_argbuf.
16750 (clear_args): Truncate at_file_argbuf.
16751 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
16752 (open_at_file): New function.
16753 (close_at_file): Likewise.
16754 (create_at_file): Delete.
16755 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
16758 (validate_switches_from_spec): Deal with %@{...} sequence.
16759 (validate_switches): Likewise.
16760 (driver::finalize): Call clear_args.
16762 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
16764 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
16766 2018-06-11 Martin Sebor <msebor@redhat.com>
16768 * doc/invoke.texi (-Wall): List -Wc++17-compat.
16769 (Wno-class-memaccess): Add @opindex.
16770 (Wno-templates, Wno-multiple-inheritance): Same.
16771 (Wno-virtual-inheritance, Wno-namespaces): Same.
16772 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
16773 (Wno-format-overflow, Wno-format-truncation): Same.
16774 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
16775 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
16776 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
16777 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
16778 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
16779 (Wno-misspelled-isr): Same.
16781 2018-06-11 Martin Sebor <msebor@redhat.com>
16783 * PR tree-optimization/86083
16784 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
16786 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
16788 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
16790 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
16793 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
16794 on the correct operand.
16795 (*movdi_internal64): Ditto.
16797 2018-06-11 Martin Liska <mliska@suse.cz>
16799 PR tree-optimization/86089
16800 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
16802 2018-06-11 Julia Koval <julia.koval@intel.com>
16804 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
16805 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
16806 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
16808 2018-06-11 Olivier Hainque <hainque@adacore.com>
16810 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
16811 for Ada with strict dwarf2.
16813 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
16816 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
16819 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
16821 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
16823 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
16825 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
16828 2018-06-08 Martin Liska <mliska@suse.cz>
16830 * tree-cfg.h (debug_function): Fix argument type to match
16833 2018-06-08 Martin Liska <mliska@suse.cz>
16835 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
16836 Remove usage of MPX-related (and removed) fields.
16837 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
16839 2018-06-08 David Malcolm <dmalcolm@redhat.com>
16841 * cfg.c (debug): Use TDF_NONE rather than 0.
16842 * cfghooks.c (debug): Likewise.
16843 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
16844 (struct dump_option_value_info): Convert to...
16845 (struct kv_pair): ...this template type.
16846 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
16848 (optinfo_verbosity_options): Likewise.
16849 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
16851 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
16852 than int for "optgroup_flags" param.
16853 (dump_generic_expr_loc): Use dump_flags_t rather than int for
16855 (dump_dec): Likewise.
16856 (dump_finish): Use TDF_NONE rather than 0.
16857 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
16858 rather than int for "optgroup_flags" param. Use TDF_NONE rather
16859 than 0. Update for change to option_ptr.
16860 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
16861 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
16862 0. Update for changes to optinfo_verbosity_options and
16864 (opt_info_switch_p): Convert optgroup_flags from int to
16866 (dump_basic_block): Use dump_flags_t rather than int
16867 for "dump_kind" param.
16868 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
16869 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
16870 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
16871 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
16872 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
16873 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
16874 TDF_NONE): Convert from macros to...
16875 (enum dump_flag): ...this new enum.
16876 (dump_flags_t): Update to use enum.
16877 (operator|, operator&, operator~, operator|=, operator&=):
16878 Implement for dump_flags_t.
16879 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
16880 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
16881 Convert from macros to...
16882 (enum optgroup_flag): ...this new enum.
16883 (optgroup_flags_t): New typedef.
16884 (operator|, operator|=): Implement for optgroup_flags_t.
16885 (struct dump_file_info): Convert field "alt_flags" to
16886 dump_flags_t. Convert field "optgroup_flags" to
16888 (dump_basic_block): Use dump_flags_t rather than int for param.
16889 (dump_generic_expr_loc): Likewise.
16890 (dump_dec): Likewise.
16891 (dump_register): Convert param "optgroup_flags" to
16893 (opt_info_enable_passes): Likewise.
16894 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
16896 * gimple-pretty-print.c (debug): Likewise.
16897 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
16898 (merged_store_group::apply_stores): Likewise.
16899 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
16900 * gimple.c (verify_gimple_pp): Likewise.
16901 * graphite-poly.c (print_pbb_body): Likewise.
16902 * passes.c (pass_manager::register_one_dump_file): Convert
16903 local "optgroup_flags" to optgroup_flags_t.
16904 * print-tree.c (print_node): Use TDF_NONE rather than 0.
16906 (debug_body): Likewise.
16907 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
16908 to optgroup_flags_t.
16909 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
16911 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
16912 (convert_mult_to_fma): Likewise.
16913 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
16914 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
16915 * tree-vect-data-refs.c (dump_lower_bound): Convert param
16916 "dump_kind" to dump_flags_t.
16918 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
16920 * config/rs6000/rs6000.c (min, max): Delete.
16922 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
16924 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
16925 -mabi=spe and -mabi=no-spe.
16927 2018-06-08 Martin Liska <mliska@suse.cz>
16929 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
16930 where we expect an existing summary.
16932 2018-06-08 Martin Liska <mliska@suse.cz>
16934 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
16935 * ipa-inline.h (estimate_edge_growth): Likewise.
16937 2018-06-08 Martin Liska <mliska@suse.cz>
16939 * cgraph.c (function_version_hasher::hash): Use
16940 cgraph_node::get_uid ().
16941 (function_version_hasher::equal):
16942 * cgraph.h (cgraph_node::get_uid): New method.
16943 * ipa-inline.c (update_caller_keys): Use
16944 cgraph_node::get_uid ().
16945 (update_callee_keys): Likewise.
16946 * ipa-utils.c (searchc): Likewise.
16947 (ipa_reduced_postorder): Likewise.
16948 * lto-cgraph.c (input_node): Likewise.
16949 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
16950 * symbol-summary.h (symtab_insertion): Likewise.
16951 (symtab_removal): Likewise.
16952 (symtab_duplication): Likewise.
16953 * tree-pretty-print.c (dump_function_header): Likewise.
16954 * tree-sra.c (convert_callers_for_node): Likewise.
16956 2018-06-08 Martin Liska <mliska@suse.cz>
16958 * cgraph.c (symbol_table::create_edge): Always assign a new
16960 (symbol_table::free_edge): Do not recycle numbers.
16961 * cgraph.h (cgraph_edge::get): New method.
16962 * symbol-summary.h (symtab_removal): Use it.
16963 (symtab_duplication): Likewise.
16964 (call_summary::hashable_uid): Remove.
16966 2018-06-08 Martin Liska <mliska@suse.cz>
16968 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
16969 (initialize_growth_caches): Remove.
16970 (free_growth_caches): Likewise.
16971 (do_estimate_edge_time): Use edge_growth_cache.
16972 (do_estimate_edge_size): Likewise.
16973 (do_estimate_edge_hints): Likewise.
16974 * ipa-inline.c (reset_edge_caches): Likewise.
16975 (recursive_inlining): Likewise.
16976 (inline_small_functions): Likewise.
16977 * ipa-inline.h (initialize_growth_caches): Remove.
16978 (estimate_edge_size): Likewise.
16979 (estimate_edge_time): Likewise.
16980 (estimate_edge_hints): Likewise.
16981 (reset_edge_growth_cache): Likewise.
16982 * symbol-summary.h (call_summary::remove): New method.
16984 2018-06-08 Martin Liska <mliska@suse.cz>
16986 * ipa-cp.c (class edge_clone_summary): New summary.
16987 (grow_edge_clone_vectors): Remove.
16988 (ipcp_edge_duplication_hook): Remove.
16989 (class edge_clone_summary_t): New call_summary class.
16990 (ipcp_edge_removal_hook): Remove.
16991 (edge_clone_summary_t::duplicate): New function.
16992 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
16993 (create_specialized_node): Likewise.
16994 (ipcp_driver): Initialize edge_clone_summaries and do not
16997 2018-06-08 Martin Liska <mliska@suse.cz>
16999 * symbol-summary.h (get): New function.
17000 (call_summary::m_initialize_when_cloning): New class member.
17002 2018-06-08 Martin Liska <mliska@suse.cz>
17004 * cgraph.c (cgraph_node::remove): Do not recycle uid.
17005 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
17006 (symbol_table::allocate_cgraph_symbol): Do not set uid.
17007 * passes.c (uid_hash_t): Record removed_nodes by their uids.
17008 (remove_cgraph_node_from_order): Use the removed_nodes set.
17009 (do_per_function_toporder): Likwise.
17010 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
17011 instead of summary_uid.
17012 (symtab_removal): Likewise.
17013 (symtab_duplication): Likewise.
17015 2018-06-08 Martin Liska <mliska@suse.cz>
17017 * ipa-cp.c (ipcp_store_bits_results): Use
17018 ipcp_transformation_sum.
17019 (ipcp_store_vr_results): Likewise.
17020 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
17022 (ipcp_transformation_initialize): ... this.
17023 (ipa_set_node_agg_value_chain):
17024 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
17025 (write_ipcp_transformation_info): Likewise.
17026 (read_ipcp_transformation_info): Likewise.
17027 (ipcp_update_bits): Likewise.
17028 (ipcp_update_vr): Likewise.
17029 (ipcp_transform_function): Likewise.
17030 * ipa-prop.h: Rename ipcp_transformation_summary to
17031 ipcp_transformation.
17032 (class ipcp_transformation_t): New function summary.
17033 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
17034 (ipa_get_agg_replacements_for_node): Likewise.
17036 2018-06-08 Martin Liska <mliska@suse.cz>
17038 * ipa-pure-const.c (struct funct_state_d): Do it class instead
17040 (class funct_state_summary_t): New function_summary class.
17041 (has_function_state): Remove.
17042 (get_function_state): Likewise.
17043 (set_function_state): Likewise.
17044 (add_new_function): Likewise.
17045 (funct_state_summary_t::insert): New function.
17046 (duplicate_node_data): Remove.
17047 (remove_node_data): Remove.
17048 (funct_state_summary_t::duplicate): New function.
17049 (register_hooks): Create new funct_state_summaries.
17050 (pure_const_generate_summary): Use it.
17051 (pure_const_write_summary): Likewise.
17052 (pure_const_read_summary): Likewise.
17053 (propagate_pure_const): Likewise.
17054 (propagate_nothrow): Likewise.
17055 (dump_malloc_lattice): Likewise.
17056 (propagate_malloc): Likewise.
17057 (execute): Do not register hooks, just remove summary
17059 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
17062 2018-06-08 Martin Liska <mliska@suse.cz>
17064 * ipa-reference.c (remove_node_data): Remove.
17065 (duplicate_node_data): Likewise.
17066 (class ipa_ref_var_info_summary_t): New class.
17067 (class ipa_ref_opt_summary_t): Likewise.
17068 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
17069 (get_reference_optimization_summary): Use
17070 ipa_ref_opt_sum_summaries.
17071 (set_reference_vars_info): Remove.
17072 (set_reference_optimization_summary): Likewise.
17073 (ipa_init): Create summaries.
17074 (init_function_info): Use function summary.
17075 (ipa_ref_opt_summary_t::duplicate): New function.
17076 (ipa_ref_opt_summary_t::remove): New function.
17077 (get_read_write_all_from_node): Fix GNU coding style.
17078 (propagate): Use function summary.
17079 (write_node_summary_p): Fix GNU coding style.
17080 (stream_out_bitmap): Likewise.
17081 (ipa_reference_read_optimization_summary): Use function summary.
17082 (ipa_reference_c_finalize): Do not release hooks.
17084 2018-06-08 Martin Liska <mliska@suse.cz>
17086 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
17087 (analyze_function_body): Extract multiple calls of get_create.
17088 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
17089 * ipa-inline.c (recursive_inlining): Use ::get method.
17090 * ipa-inline.h (estimate_edge_growth): Likewise.
17092 2018-06-08 Martin Liska <mliska@suse.cz>
17094 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
17096 (hsa_function_summary::hsa_function_summary): Use the new enum
17098 (hsa_gpu_implementation_p): Use hsa_summaries::get.
17099 * hsa-gen.c (hsa_get_host_function): Likewise.
17100 (get_brig_function_name): Likewise.
17101 * ipa-hsa.c (process_hsa_functions): Likewise.
17102 (ipa_hsa_write_summary): Likewise.
17103 * symbol-summary.h (symtab_duplication): Use ::get function/
17104 (get): New function.
17106 2018-06-08 Martin Liska <mliska@suse.cz>
17108 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
17110 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
17111 (hsa_register_kernel): Likewise.
17112 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
17113 * hsa-gen.c (hsa_get_host_function): Likewise.
17114 (get_brig_function_name): Likewise.
17115 (generate_hsa): Likewise.
17116 (pass_gen_hsail::execute): Likewise.
17117 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
17118 (devirtualization_time_bonus): Likewise.
17119 (ipcp_propagate_stage): Likewise.
17120 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
17121 (edge_set_predicate): Likewise.
17122 (evaluate_conditions_for_known_args): Likewise.
17123 (evaluate_properties_for_edge): Likewise.
17124 (ipa_fn_summary::reset): Likewise.
17125 (ipa_fn_summary_t::duplicate): Likewise.
17126 (dump_ipa_call_summary): Likewise.
17127 (ipa_dump_fn_summary): Likewise.
17128 (analyze_function_body): Likewise.
17129 (compute_fn_summary): Likewise.
17130 (estimate_edge_devirt_benefit): Likewise.
17131 (estimate_edge_size_and_time): Likewise.
17132 (estimate_calls_size_and_time): Likewise.
17133 (estimate_node_size_and_time): Likewise.
17134 (inline_update_callee_summaries): Likewise.
17135 (remap_edge_change_prob): Likewise.
17136 (remap_edge_summaries): Likewise.
17137 (ipa_merge_fn_summary_after_inlining): Likewise.
17138 (ipa_update_overall_fn_summary): Likewise.
17139 (read_ipa_call_summary): Likewise.
17140 (inline_read_section): Likewise.
17141 (write_ipa_call_summary): Likewise.
17142 (ipa_fn_summary_write): Likewise.
17143 (ipa_free_fn_summary): Likewise.
17144 * ipa-hsa.c (process_hsa_functions): Likewise.
17145 (ipa_hsa_write_summary): Likewise.
17146 (ipa_hsa_read_section): Likewise.
17147 * ipa-icf.c (sem_function::merge): Likewise.
17148 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
17149 (do_estimate_edge_time): Likewise.
17150 (estimate_size_after_inlining): Likewise.
17151 (estimate_growth): Likewise.
17152 (growth_likely_positive): Likewise.
17153 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
17154 (inline_call): Likewise.
17155 * ipa-inline.c (caller_growth_limits): Likewise.
17156 (can_inline_edge_p): Likewise.
17157 (can_inline_edge_by_limits_p): Likewise.
17158 (compute_uninlined_call_time): Likewise.
17159 (compute_inlined_call_time): Likewise.
17160 (want_inline_small_function_p): Likewise.
17161 (edge_badness): Likewise.
17162 (update_caller_keys): Likewise.
17163 (update_callee_keys): Likewise.
17164 (recursive_inlining): Likewise.
17165 (inline_small_functions): Likewise.
17166 (inline_to_all_callers_1): Likewise.
17167 (dump_overall_stats): Likewise.
17168 (early_inline_small_functions): Likewise.
17169 (early_inliner): Likewise.
17170 * ipa-inline.h (estimate_edge_growth): Likewise.
17171 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
17172 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
17173 * ipa-prop.h (IPA_NODE_REF): Likewise.
17174 (IPA_EDGE_REF): Likewise.
17175 * ipa-pure-const.c (malloc_candidate_p): Likewise.
17176 (propagate_malloc): Likewise.
17177 * ipa-split.c (execute_split_functions): Likewise.
17178 * symbol-summary.h: Rename get to get_create.
17180 (get_create): Likewise.
17181 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
17183 2018-06-08 Martin Liska <mliska@suse.cz>
17185 * symbol-summary.h (release): Move definition out of class
17187 (symtab_removal): Likewise.
17188 (symtab_duplication): Likewise.
17190 2018-06-08 Martin Liska <mliska@suse.cz>
17192 * symbol-summary.h (function_summary): Move constructor
17193 implementation out of class declaration.
17194 (release): Likewise.
17195 (symtab_insertion): Likewise.
17196 (symtab_removal): Likewise.
17197 (symtab_duplication): Likewise.
17200 2018-06-08 Martin Liska <mliska@suse.cz>
17202 * Makefile.in: Remove support for MPX (macros, related functions,
17203 fields in cgraph_node, ...).
17204 * builtin-types.def (BT_BND): Likewise.
17205 (BT_FN_BND_CONST_PTR): Likewise.
17206 (BT_FN_CONST_PTR_BND): Likewise.
17207 (BT_FN_VOID_PTR_BND): Likewise.
17208 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
17209 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
17210 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
17211 (expand_builtin_mempcpy_with_bounds): Likewise.
17212 (expand_builtin_memset_with_bounds): Likewise.
17213 (expand_builtin_memset_args): Likewise.
17214 (std_expand_builtin_va_start): Likewise.
17215 (expand_builtin): Likewise.
17216 (expand_builtin_with_bounds): Likewise.
17217 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
17218 (DEF_LIB_BUILTIN_CHKP): Likewise.
17219 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
17220 (DEF_CHKP_BUILTIN): Likewise.
17221 (BUILT_IN_MEMCPY): Likewise.
17222 (BUILT_IN_MEMMOVE): Likewise.
17223 (BUILT_IN_MEMPCPY): Likewise.
17224 (BUILT_IN_MEMSET): Likewise.
17225 (BUILT_IN_STPCPY): Likewise.
17226 (BUILT_IN_STRCAT): Likewise.
17227 (BUILT_IN_STRCHR): Likewise.
17228 (BUILT_IN_STRCPY): Likewise.
17229 (BUILT_IN_STRLEN): Likewise.
17230 (BUILT_IN_MEMCPY_CHK): Likewise.
17231 (BUILT_IN_MEMMOVE_CHK): Likewise.
17232 (BUILT_IN_MEMPCPY_CHK): Likewise.
17233 (BUILT_IN_MEMSET_CHK): Likewise.
17234 (BUILT_IN_STPCPY_CHK): Likewise.
17235 (BUILT_IN_STRCAT_CHK): Likewise.
17236 (BUILT_IN_STRCPY_CHK): Likewise.
17237 * calls.c (store_bounds): Likewise.
17238 (emit_call_1): Likewise.
17239 (special_function_p): Likewise.
17240 (maybe_warn_nonstring_arg): Likewise.
17241 (initialize_argument_information): Likewise.
17242 (finalize_must_preallocate): Likewise.
17243 (compute_argument_addresses): Likewise.
17244 (expand_call): Likewise.
17245 * cfgexpand.c (expand_call_stmt): Likewise.
17246 (expand_return): Likewise.
17247 (expand_gimple_stmt_1): Likewise.
17248 (pass_expand::execute): Likewise.
17249 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
17250 (cgraph_node::remove): Likewise.
17251 (cgraph_node::dump): Likewise.
17252 (cgraph_node::verify_node): Likewise.
17253 * cgraph.h (chkp_function_instrumented_p): Likewise.
17254 (symtab_node::get_alias_target): Likewise.
17255 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
17256 (cgraph_local_p): Likewise.
17257 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
17258 (cgraph_edge::rebuild_references): Likewise.
17259 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
17260 (walk_polymorphic_call_targets): Likewise.
17261 (cgraph_node::expand_thunk): Likewise.
17262 (symbol_table::output_weakrefs): Likewise.
17263 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
17264 (ix86_handle_option): Likewise.
17265 * config/i386/constraints.md: Likewise.
17266 * config/i386/i386-builtin-types.def (BND): Likewise.
17270 * config/i386/i386-builtin.def (BDESC_END): Likewise.
17271 (BDESC_FIRST): Likewise.
17273 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
17274 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
17275 * config/i386/i386.c (enum reg_class): Likewise.
17276 (ix86_target_string): Likewise.
17277 (ix86_option_override_internal): Likewise.
17278 (ix86_conditional_register_usage): Likewise.
17279 (ix86_valid_target_attribute_inner_p): Likewise.
17280 (ix86_set_indirect_branch_type): Likewise.
17281 (ix86_set_current_function): Likewise.
17282 (ix86_function_arg_regno_p): Likewise.
17283 (init_cumulative_args): Likewise.
17284 (ix86_function_arg_advance): Likewise.
17285 (ix86_function_arg): Likewise.
17286 (ix86_pass_by_reference): Likewise.
17287 (ix86_function_value_regno_p): Likewise.
17288 (ix86_function_value_1): Likewise.
17289 (ix86_function_value_bounds): Likewise.
17290 (ix86_return_in_memory): Likewise.
17291 (ix86_setup_incoming_vararg_bounds): Likewise.
17292 (ix86_va_start): Likewise.
17293 (indirect_thunk_need_prefix): Likewise.
17294 (print_reg): Likewise.
17295 (ix86_print_operand): Likewise.
17296 (ix86_expand_call): Likewise.
17297 (ix86_output_function_return): Likewise.
17298 (reg_encoded_number): Likewise.
17299 (BDESC_VERIFYS): Likewise.
17300 (ix86_init_mpx_builtins): Likewise.
17301 (ix86_init_builtins): Likewise.
17302 (ix86_emit_cmove): Likewise.
17303 (ix86_emit_move_max): Likewise.
17304 (ix86_expand_builtin): Likewise.
17305 (ix86_builtin_mpx_function): Likewise.
17306 (ix86_get_arg_address_for_bt): Likewise.
17307 (ix86_load_bounds): Likewise.
17308 (ix86_store_bounds): Likewise.
17309 (ix86_load_returned_bounds): Likewise.
17310 (ix86_store_returned_bounds): Likewise.
17311 (ix86_class_likely_spilled_p): Likewise.
17312 (ix86_hard_regno_mode_ok): Likewise.
17313 (x86_order_regs_for_local_alloc): Likewise.
17314 (ix86_mitigate_rop): Likewise.
17315 (ix86_bnd_prefixed_insn_p): Likewise.
17316 (ix86_mpx_bound_mode): Likewise.
17317 (ix86_make_bounds_constant): Likewise.
17318 (ix86_initialize_bounds): Likewise.
17319 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
17320 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
17321 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
17322 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
17323 (TARGET_CHKP_BOUND_MODE): Likewise.
17324 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
17325 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
17326 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
17327 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
17328 * config/i386/i386.h (TARGET_MPX): Likewise.
17329 (TARGET_MPX_P): Likewise.
17330 (VALID_BND_REG_MODE): Likewise.
17331 (FIRST_BND_REG): Likewise.
17332 (LAST_BND_REG): Likewise.
17333 (enum reg_class): Likewise.
17334 (BND_REG_P): Likewise.
17335 (BND_REGNO_P): Likewise.
17336 (BNDmode): Likewise.
17337 (ADJUST_INSN_LENGTH): Likewise.
17338 * config/i386/i386.md: Likewise.
17339 * config/i386/i386.opt: Likewise.
17340 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
17341 (defined): Likewise.
17342 (LINK_MPX): Likewise.
17343 (MPX_SPEC): Likewise.
17344 (LIBMPX_SPEC): Likewise.
17345 (LIBMPXWRAPPERS_SPEC): Likewise.
17346 (CHKP_SPEC): Likewise.
17347 * config/i386/predicates.md: Likewise.
17348 * dbxout.c (dbxout_type): Likewise.
17349 * doc/extend.texi: Likewise.
17350 * doc/invoke.texi: Likewise.
17351 * doc/md.texi: Likewise.
17352 * doc/tm.texi: Likewise.
17353 * doc/tm.texi.in: Likewise.
17354 * dwarf2out.c (is_base_type): Likewise.
17355 (gen_formal_types_die): Likewise.
17356 (gen_subprogram_die): Likewise.
17357 (gen_type_die_with_usage): Likewise.
17358 (gen_decl_die): Likewise.
17359 (dwarf2out_late_global_decl): Likewise.
17360 * expr.c (expand_assignment): Likewise.
17361 (emit_storent_insn): Likewise.
17362 (store_expr_with_bounds): Likewise.
17363 (store_expr): Likewise.
17364 (expand_expr_real_1): Likewise.
17365 * expr.h (store_expr_with_bounds): Likewise.
17366 * function.c (use_register_for_decl): Likewise.
17367 (struct bounds_parm_data): Likewise.
17368 (assign_parms_augmented_arg_list): Likewise.
17369 (assign_parm_find_entry_rtl): Likewise.
17370 (assign_parm_is_stack_parm): Likewise.
17371 (assign_parm_load_bounds): Likewise.
17372 (assign_bounds): Likewise.
17373 (assign_parms): Likewise.
17374 (expand_function_start): Likewise.
17375 * gcc.c (CHKP_SPEC): Likewise.
17376 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
17377 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
17378 (wrestrict_dom_walker::check_call): Likewise.
17379 * gimple.c (gimple_build_call_from_tree): Likewise.
17380 * gimple.h (enum gf_mask): Likewise.
17381 (gimple_call_with_bounds_p): Likewise.
17382 (gimple_call_set_with_bounds): Likewise.
17383 * gimplify.c (gimplify_init_constructor): Likewise.
17384 * ipa-cp.c (initialize_node_lattices): Likewise.
17385 (propagate_constants_across_call): Likewise.
17386 (find_more_scalar_values_for_callers_subset): Likewise.
17387 * ipa-hsa.c (process_hsa_functions): Likewise.
17388 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
17389 * ipa-icf.c (sem_function::merge): Likewise.
17390 * ipa-inline.c (early_inliner): Likewise.
17391 * ipa-pure-const.c (warn_function_noreturn): Likewise.
17392 (warn_function_cold): Likewise.
17393 (propagate_pure_const): Likewise.
17394 * ipa-ref.h (enum GTY): Likewise.
17395 * ipa-split.c (find_retbnd): Likewise.
17396 (consider_split): Likewise.
17397 (split_function): Likewise.
17398 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
17399 * ipa.c (walk_polymorphic_call_targets): Likewise.
17400 (symbol_table::remove_unreachable_nodes): Likewise.
17401 (process_references): Likewise.
17402 (cgraph_build_static_cdtor_1): Likewise.
17403 * lto-cgraph.c (lto_output_node): Likewise.
17404 (output_refs): Likewise.
17405 (compute_ltrans_boundary): Likewise.
17406 (input_overwrite_node): Likewise.
17407 (input_node): Likewise.
17408 (input_cgraph_1): Likewise.
17409 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
17410 * passes.c (pass_manager::execute_early_local_passes): Likewise.
17411 (class pass_chkp_instrumentation_passes): Likewise.
17412 (make_pass_chkp_instrumentation_passes): Likewise.
17413 * passes.def: Likewise.
17414 * rtl.h (struct GTY): Likewise.
17415 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
17416 * stor-layout.c (layout_type): Likewise.
17417 * symtab.c: Likewise.
17418 * target.def: Likewise.
17419 * targhooks.c (default_chkp_bound_type): Likewise.
17420 (default_chkp_bound_mode): Likewise.
17421 (default_builtin_chkp_function): Likewise.
17422 (default_chkp_function_value_bounds): Likewise.
17423 (default_chkp_make_bounds_constant): Likewise.
17424 (default_chkp_initialize_bounds): Likewise.
17425 * targhooks.h (default_chkp_bound_type): Likewise.
17426 (default_chkp_bound_mode): Likewise.
17427 (default_builtin_chkp_function): Likewise.
17428 (default_chkp_function_value_bounds): Likewise.
17429 (default_chkp_make_bounds_constant): Likewise.
17430 (default_chkp_initialize_bounds): Likewise.
17431 * toplev.c (compile_file): Likewise.
17432 (process_options): Likewise.
17433 * tree-core.h (DEF_BUILTIN): Likewise.
17434 (DEF_BUILTIN_CHKP): Likewise.
17435 * tree-inline.c (declare_return_variable): Likewise.
17436 (remap_gimple_stmt): Likewise.
17437 (copy_bb): Likewise.
17438 (initialize_inlined_parameters): Likewise.
17439 (expand_call_inline): Likewise.
17440 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
17441 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
17442 (make_pass_ipa_chkp_produce_thunks): Likewise.
17443 (make_pass_chkp): Likewise.
17444 (make_pass_chkp_opt): Likewise.
17445 (make_pass_chkp_instrumentation_passes): Likewise.
17446 * tree-pretty-print.c (dump_generic_node): Likewise.
17447 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
17448 * tree-ssa-dce.c (propagate_necessity): Likewise.
17449 (eliminate_unnecessary_stmts): Likewise.
17450 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
17451 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
17452 * tree-ssa-sccvn.h: Likewise.
17453 * tree-ssa-strlen.c (get_string_length): Likewise.
17454 (valid_builtin_call): Likewise.
17455 (adjust_last_stmt): Likewise.
17456 (handle_builtin_strchr): Likewise.
17457 (handle_builtin_strcpy): Likewise.
17458 (handle_builtin_stxncpy): Likewise.
17459 (handle_builtin_memcpy): Likewise.
17460 (handle_builtin_strcat): Likewise.
17461 (strlen_check_and_optimize_stmt): Likewise.
17462 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
17463 * tree-streamer-in.c: Likewise.
17464 * tree-streamer.c (record_common_node): Likewise.
17465 * tree.c (tree_code_size): Likewise.
17466 (wide_int_to_tree_1): Likewise.
17467 (type_contains_placeholder_1): Likewise.
17468 (build_common_tree_nodes): Likewise.
17469 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
17470 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
17471 (POINTER_BOUNDS_P): Likewise.
17472 (BOUNDED_TYPE_P): Likewise.
17473 (BOUNDED_P): Likewise.
17474 (CALL_WITH_BOUNDS_P): Likewise.
17475 (pointer_bounds_type_node): Likewise.
17476 * value-prof.c (gimple_ic): Likewise.
17477 * var-tracking.c (vt_add_function_parameters): Likewise.
17478 * varasm.c (make_decl_rtl): Likewise.
17479 (assemble_start_function): Likewise.
17480 (output_constant): Likewise.
17481 (maybe_assemble_visibility): Likewise.
17482 * varpool.c (ctor_for_folding): Likewise.
17483 * chkp-builtins.def: Remove.
17484 * ipa-chkp.c: Remove.
17485 * ipa-chkp.h: Remove.
17486 * rtl-chkp.c: Remove.
17487 * rtl-chkp.h: Remove.
17488 * tree-chkp-opt.c: Remove.
17489 * tree-chkp.c: Remove.
17490 * tree-chkp.h: Remove.
17492 2018-06-07 Carl Love <cel@us.ibm.com>
17494 * config/rs6000/vsx.md (vextract_fp_from_shorth,
17495 vextract_fp_from_shortl): Add BE support.
17497 2018-06-07 Paul Koning <ni1d@arrl.net>
17499 * compare-elim.c (try_merge_compare): Don't merge compare if
17500 address contains a side effect.
17501 (try_eliminate_compare): Likewise.
17503 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
17505 * config.gcc: Support "tremont".
17506 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
17507 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
17509 * config/i386/i386.c (m_TREMONT): Define.
17510 (processor_target_table): Add "tremont".
17511 (PTA_TREMONT): Define.
17512 (ix86_lea_outperforms): Add TARGET_TREMONT.
17513 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
17514 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
17515 and M_INTEL_GOLDMONT_PLUS.
17516 (fold_builtin_cpu): Add "tremont".
17517 (ix86_add_stmt_cost): Add TARGET_TREMONT.
17518 (ix86_option_override_internal): Add "tremont".
17519 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
17520 (processor_type): Add PROCESSOR_TREMONT.
17521 * config/i386/x86-tune.def: Add m_TREMONT.
17522 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
17524 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
17526 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
17527 symbol defined for msp430i* devices to be lower case.
17529 2018-06-07 Richard Biener <rguenther@suse.de>
17531 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
17532 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
17533 Properly wrap signed arithmetic if overflow wraps.
17535 2018-06-07 Jakub Jelinek <jakub@redhat.com>
17537 PR tree-optimization/69615
17538 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
17539 of a cast from a same precision integral SSA_NAME in a bb dominated
17540 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
17541 cast to utype if rhs2 has already a compatible type.
17543 2018-06-07 Richard Biener <rguenther@suse.de>
17545 PR tree-optimization/85935
17546 * graphite-scop-detection.c (find_params_in_bb): Analyze
17547 condition operands with respect to the correct loop. Assert
17548 the analysis doesn't fail.
17550 2018-06-04 Carl Love <cel@us.ibm.com>
17552 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
17553 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
17554 as it is slightly cheaper.
17555 (first_match_or_eos_index_<mode>):
17556 Calculate index using natural element order.
17557 (first_match_index_<mode>):
17558 Calculate index using natural element order.
17559 (first_match_or_eos_index_<mode>):
17560 Calculate index using natural order.
17561 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
17562 for BE and LE modes.
17563 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
17564 P9V_BUILTIN_VCLZLSBB_V16QI.
17565 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
17568 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
17570 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
17571 indentation and line wrap for many prototypes. Add missing
17572 @smallexample directives around block of prototypes for vec_xl and
17575 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
17577 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
17578 track if we pass or return IEEE 128-bit floating point.
17579 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
17580 C++ mangling that is compatible with GCC 8.1.
17581 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
17582 (init_cumulative_args): Note if we pass or return IEEE 128-bit
17583 floating point types.
17584 (rs6000_function_arg_advance_1): Likewise.
17585 (rs6000_mangle_type): Optionally generate mangled names that match
17586 what GCC 8.1 generated for IEEE 128-bit floating point types.
17587 (rs6000_globalize_decl_name): If we have an external function that
17588 passes or returns IEEE 128-bit types, generate a weak reference
17589 from the mangled name used in GCC 8.1 to the current mangled
17591 (rs6000_init_builtins): Make __ibm128 use the long double type if
17592 long double is IBM extended double. Make __float128 use the long
17593 double type if long double is IEEE 128-bit.
17596 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
17597 macro for __ibm128 built-in functions.
17598 (PACK_IF): Add __ibm128 pack/unpack functions.
17599 (UNPACK_IF): Likewise.
17600 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
17601 enable long double built-in functions if long double is IEEE
17602 128-bit floating point.
17603 (rs6000_invalid_builtin): Update long double built-in function
17605 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
17606 functions, adjust the built-in function to use the long double
17607 built-in function if __ibm128 and long double are the same type.
17608 * doc/extend.texi (PowerPC builtins): Update documention for
17609 __builtin_{,un}pack_longdouble. Add documentation for
17610 __builtin_{,un}pack_ibm128.
17612 2018-06-06 Jim Wilson <jimw@sifive.com>
17614 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
17615 (struct machine_function): New field interrupt_mode.
17616 (riscv_handle_type_attribute): New function. Add forward declaration.
17617 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
17618 (riscv_expand_epilogue): Check interrupt_mode field.
17619 (riscv_set_current_function): Check interrupt attribute args and
17620 set interrupt_mode field.
17621 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
17622 (riscv_sret, riscv_uret): New.
17623 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
17624 new arguments to interrupt attribute.
17626 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
17629 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
17630 Don't handle -mcpu=power8 if -mpower9-vector is also used.
17632 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
17634 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
17635 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
17636 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
17637 several redundant entries.
17639 2018-06-06 David Malcolm <dmalcolm@redhat.com>
17641 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
17642 type from "rtx" to "rtx_insn *".
17643 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
17644 for local "call_insn", removing cast.
17645 (ix86_expand_call): Likewise, introducing a "call_insn" local.
17647 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
17649 PR tree-optimization/86066
17650 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
17651 for BIT_INSERT_EXPR stores.
17653 2018-06-06 Richard Biener <rguenther@suse.de>
17655 PR tree-optimization/86062
17656 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
17657 component refs ontop
17658 of to be offsetted base.
17660 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
17662 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
17663 to be static and remove check on interrupt attribute name.
17665 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
17667 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
17668 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
17670 2018-06-05 Steve Ellcey <sellcey@cavium.com>
17673 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
17675 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
17676 Remove second argument, change how error is called.
17677 (aarch64_layout_arg): Remove second argument from
17678 aarch64_err_no_fpadvsimd call.
17679 (aarch64_init_cumulative_args): Ditto.
17680 (aarch64_gimplify_va_arg_expr): Ditto.
17681 * config/aarch64/aarch64.md (mov<mode>): Ditto.
17683 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
17685 * config/i386/i386.md (simple_return_indirect_internal): New expander.
17686 (*simple_return_indirect_internal<mode>): Rename from
17687 simple_return_indirect_internal. Use W mode iterator.
17688 (rstorssp): New expander.
17689 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
17690 (clrssbsy): New expander.
17691 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
17693 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
17695 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
17697 (cmse_check_pointed_object): Likewise.
17699 2018-06-05 Martin Liska <mliska@suse.cz>
17701 PR gcov-profile/47618
17702 * doc/invoke.texi: Document how -fprofile-dir format
17705 2018-06-05 Richard Biener <rguenther@suse.de>
17707 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
17708 removal pretend DOM info isn't available so we do not update
17709 it and only remove edges, not dominated blocks. Actually free
17710 DOM info in case we removed something. Remove unreachable blocks.
17711 (mfb_keep_latches): Work with either DOM info or marked backedges.
17712 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
17713 first. Mark backedges if DOM info isn't available.
17714 (Re-)compute DOM info after cleanup_control_flow_pre.
17716 2018-06-05 Richard Biener <rguenther@suse.de>
17718 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
17719 (locus_discrim_hasher::hash): Adjust.
17720 (locus_discrim_hasher::equal): Likewise.
17721 (next_discriminator_for_locus): Work on line directly.
17722 (same_line_p): Pass in expanded locus1 as well.
17723 (assign_discriminators): Avoid redundant location expansions.
17725 2018-06-05 Richard Biener <rguenther@suse.de>
17727 PR tree-optimization/86046
17728 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
17729 if required after clearing TREE_ADDRESSABLE.
17731 2018-06-05 Richard Biener <rguenther@suse.de>
17733 PR tree-optimization/86047
17734 * tree-ssa-loop.c (for_each_index): Glob handling of all
17735 decls and constants and really handle all of them.
17737 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17740 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
17741 qualifier_void_pointer and qualifier_const_void_pointer.
17742 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
17743 (arm_init_builtins): Handle the above.
17744 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
17745 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
17746 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
17749 2018-06-05 Martin Liska <mliska@suse.cz>
17751 * auto-profile.c (read_autofdo_file): Do not use
17752 gcov_ctr_summary struct.
17753 (afdo_callsite_hot_enough_for_early_inline): Likewise.
17754 * coverage.c (struct counts_entry): Likewise.
17755 (read_counts_file): Read just single summary entry.
17756 (get_coverage_counts): Use gcov_summary struct.
17757 * coverage.h (get_coverage_counts): Likewise.
17758 * gcov-dump.c (dump_working_sets): Likewise.
17759 (tag_summary): Dump just single summary.
17760 * gcov-io.c (gcov_write_summary): Write just histogram
17762 (gcov_read_summary): Read just single summary.
17763 (compute_working_sets): Use gcov_summary struct.
17764 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
17765 of GCOV_COUNTERS_SUMMABLE.
17766 (GCOV_COUNTERS_SUMMABLE): Remove.
17767 (GCOV_FIRST_VALUE_COUNTER): Replace with
17768 GCOV_COUNTER_V_INTERVAL.
17769 (struct gcov_ctr_summary): Remove.
17770 (struct gcov_summary): Directly use fields of former
17772 (compute_working_sets): Use gcov_summary struct.
17773 * gcov.c (read_count_file): Do not use ctrs fields.
17774 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
17776 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
17778 * profile.c: Likewise.
17779 * profile.h: Likewise.
17781 2018-06-05 Martin Liska <mliska@suse.cz>
17783 PR gcov-profile/84846
17784 * gcov.c (output_lines): Print working directory only
17785 in intermediate format.
17787 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
17789 * config/s390/s390-builtin-types.def: Add void function type.
17790 * config/s390/s390-builtins.def: Use the function type for the
17793 2018-06-04 Jim Wilson <jimw@sifive.com>
17795 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
17797 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
17798 and maybe_eh_return. Change regno to unsigned int. Use new args to
17799 handle EH_RETURN_DATA_REGNO registers properly.
17800 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
17801 (riscv_expand_epilogue): Update comment. Change argument name and
17802 type. Update code to use new name and type. Pass new args to
17803 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
17805 * config/riscv/riscv.md (NORMAL_RETURN): New.
17806 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
17807 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
17808 (eh_return): Call gen_eh_return_internal and emit barrier.
17809 (eh_return_internal): Call riscv_expand_epilogue.
17811 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
17813 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
17814 bit_insertion field and declare can_be_merged_into method.
17815 (merged_store_group::can_be_merged_into): New method.
17816 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
17817 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
17818 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
17820 2018-06-04 Richard Biener <rguenther@suse.de>
17822 PR tree-optimization/85955
17823 * builtins.c (fold_builtin_sincos): Convert pointers to
17824 destination to appropriate type before dereferencing.
17826 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
17828 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
17830 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
17832 * expr.c (expand_expr_real_1): Force the operand into memory if
17833 its TYPE_MODE is BLKmode and if there is no integer mode for
17834 the number of bits being extracted.
17836 2018-06-04 Jakub Jelinek <jakub@redhat.com>
17840 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
17841 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
17843 2018-06-04 Richard Biener <rguenther@suse.de>
17845 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
17846 (cleanup_tree_cfg_noloop): ... single caller. Do
17847 start_recording_case_labels later.
17849 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
17851 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
17852 to _IMMINTRIN_H_INCLUDED.
17853 * config/i386/pconfigintrin.h: Ditto.
17854 * config/i386/waitpkgintrin.h: Ditto.
17855 * config/i386/immintrin.h: Add includes for sgxintrin.h,
17856 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
17857 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
17858 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
17859 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
17860 waitpkgintrin.h and cldemoteintrin.h.
17862 2018-06-04 Richard Biener <rguenther@suse.de>
17864 PR tree-optimization/86038
17865 * tracer.c (find_best_successor): Check probability for
17866 being initialized, bail out if not.
17868 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
17871 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
17872 of bits to ignore when comparing architectures.
17874 2018-06-04 Jakub Jelinek <jakub@redhat.com>
17876 PR tree-optimization/69615
17877 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
17878 maximum or minimum of the type, try to merge it also as if
17879 range1 is + [-, x - 1] or + [x + 1, -].
17882 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
17884 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
17886 PR tree-optimization/86034
17887 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
17888 the unsigned bitfield type in a bit insertion sequence if it does not
17889 have a larger precision than the bitfield size.
17890 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
17892 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
17894 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
17896 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
17898 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
17899 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
17900 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
17901 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
17903 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
17905 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
17906 Disable -fdelete-null-pointer-checks for ELF toolchain.
17908 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
17909 Kito Cheng <kito.cheng@gmail.com>
17911 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
17912 (nds32le-*-*, nds32be-*-*): Integrate checking process.
17913 (nds32*-*-*): Add glibc and uclibc conditions.
17914 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
17915 (TARGET_EXCEPT_UNWIND_INFO): Define.
17916 * config/nds32/elf.h: New file.
17917 * config/nds32/linux.h: New file.
17918 * config/nds32/nds32-elf.opt: New file.
17919 * config/nds32/nds32-linux.opt: New file.
17920 * config/nds32/nds32-fp-as-gp.c
17921 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
17922 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
17924 (nds32_asm_file_end): Ditto.
17925 (nds32_print_operand): Ditto.
17926 (nds32_insert_attributes): Ditto.
17927 (nds32_init_libfuncs): New function.
17928 (TARGET_HAVE_TLS): Define.
17929 (TARGET_INIT_LIBFUNCS): Define.
17930 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
17932 (TARGET_ELF): Apply different mcmodel setting.
17933 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
17934 been migrated into elf.h and linux.h files.
17935 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
17936 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
17937 (mcmodel): The content has been migrated into nds32-elf.opt and
17938 nds32-linux.opt files.
17939 * config/nds32/t-elf: New file.
17940 * config/nds32/t-linux: New file.
17942 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
17943 Shiva Chen <shiva0217@gmail.com>
17945 * config/nds32/constants.md (unspec_volatile_element): Add
17946 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
17947 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
17949 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
17950 (make_pass_nds32_fp_as_gp): Declare.
17951 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
17953 (nds32_asm_function_end_prologue): Remove unused asm output.
17954 (nds32_asm_function_begin_epilogue): Remove unused asm output.
17955 (nds32_asm_file_start): Output necessary fp_as_gp information.
17956 (nds32_option_override): Adjust register usage.
17957 (nds32_expand_prologue): Consider fp_as_gp situation.
17958 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
17959 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
17962 (simple_return): Ditto.
17963 (omit_fp_begin): Output special directive for fp_as_gp.
17964 (omit_fp_end): Output special directive for fp_as_gp.
17965 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
17966 mforbid-fp-as-gp): New options.
17968 2018-06-01 Mark Wielaard <mark@klomp.org>
17970 * dwarf2out.c (dwarf2out_finish): Remove generation of
17971 DW_AT_loclists_base.
17973 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
17975 * gimple-ssa-store-merging.c: Include gimple-fold.h.
17976 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
17977 (struct merged_store_group): Add bit_insertion field.
17978 (dump_char_array): Use standard hexadecimal format.
17979 (merged_store_group::merged_store_group): Set bit_insertion to false.
17980 (merged_store_group::apply_stores): Use optimal buffer size. Deal
17981 with BIT_INSERT_EXPR stores. Move up code updating the mask and
17982 also print the mask in the dump file.
17983 (pass_store_merging::gate): Minor tweak.
17984 (imm_store_chain_info::coalesce_immediate): Fix wrong association
17985 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
17986 stores with INTEGER_CST stores.
17987 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
17988 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
17989 and use it throughout. Generate bit insertion sequences if need be.
17990 (pass_store_merging::process_store): Remove redundant condition.
17991 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
17993 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
17995 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
17996 the 128-bit floating point types. Fix function comment.
17998 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18000 * config/aarch64/aarch64-simd.md
18001 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
18003 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
18006 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
18008 PR tree-optimization/85989
18009 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
18011 (backprop::intersect_uses): Check it when deciding whether this
18012 is a backedge reference.
18013 (backprop::process_block): Add each phi to m_visited_phis
18014 after visiting it, then clear it at the end.
18016 2018-06-01 Richard Biener <rguenther@suse.de>
18018 * tree-vectorizer.h (vect_dr_stmt): New function.
18019 (vect_get_load_cost): Adjust.
18020 (vect_get_store_cost): Likewise.
18021 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
18022 Use vect_dr_stmt instead of DR_SMTT.
18023 (vect_record_base_alignments): Likewise.
18024 (vect_calculate_target_alignment): Likewise.
18025 (vect_compute_data_ref_alignment): Likewise and make static.
18026 (vect_update_misalignment_for_peel): Likewise.
18027 (vect_verify_datarefs_alignment): Likewise.
18028 (vector_alignment_reachable_p): Likewise.
18029 (vect_get_data_access_cost): Likewise. Pass down
18030 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
18031 (vect_get_peeling_costs_all_drs): Likewise.
18032 (vect_peeling_hash_get_lowest_cost): Likewise.
18033 (vect_enhance_data_refs_alignment): Likewise.
18034 (vect_find_same_alignment_drs): Likewise.
18035 (vect_analyze_data_refs_alignment): Likewise.
18036 (vect_analyze_group_access_1): Likewise.
18037 (vect_analyze_group_access): Likewise.
18038 (vect_analyze_data_ref_access): Likewise.
18039 (vect_analyze_data_ref_accesses): Likewise.
18040 (vect_vfa_segment_size): Likewise.
18041 (vect_small_gap_p): Likewise.
18042 (vectorizable_with_step_bound_p): Likewise.
18043 (vect_prune_runtime_alias_test_list): Likewise.
18044 (vect_analyze_data_refs): Likewise.
18045 (vect_supportable_dr_alignment): Likewise.
18046 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
18047 (vect_gen_prolog_loop_niters): Likewise.
18048 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
18049 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
18051 (vect_recog_mask_conversion_pattern): Likewise.
18052 (vect_try_gather_scatter_pattern): Likewise.
18053 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
18054 to vect_get_store_cost.
18055 (vect_get_store_cost): Get stmt_info instead of DR.
18056 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
18057 (vect_get_load_cost): Get stmt_info instead of DR.
18059 2018-06-01 Richard Biener <rguenther@suse.de>
18061 PR middle-end/86017
18062 * gimple-fold.c (var_decl_component_p): Also allow offsetted
18063 vars wrapped in MEM_REFs.
18065 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
18067 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
18068 Fix subreg tests so that we only return a choice between
18069 GENERAL_REGS and FP_REGS if the original classes included both.
18071 2018-06-01 Richard Biener <rguenther@suse.de>
18074 * tree-ssa-structalias.c (get_function_part_constraint):
18075 Handle NULL fi->decl.
18076 (find_func_aliases_for_call): Properly handle indirect
18077 fi from direct call.
18078 (find_func_clobbers): Likewise.
18079 (ipa_pta_execute): Likewise.
18080 (create_variable_info_for): For functions that are ifunc_resolver
18081 resolve to a varinfo that contains the result of the resolver call.
18082 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
18085 2018-05-31 Michael Collison <michael.collison@arm.com>
18087 * config/aarch64/aarch64.md:
18088 (*fix_to_zero_extenddfdi2): New pattern.
18089 * gcc.target/aarch64/fix_extend1.c: New testcase.
18091 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
18093 PR middle-end/78809
18094 PR middle-end/83026
18095 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
18096 and BUILT_IN_STRNCMP_EQ.
18097 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
18098 BUILT_IN_STRNCMP_EQ.
18099 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
18100 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
18101 (gimple_fold_builtin): Likewise.
18102 * tree-ssa-strlen.c (compute_string_length): New function.
18103 (determine_min_obsize): New function.
18104 (handle_builtin_string_cmp): New function to handle calls to
18105 string compare functions.
18106 (strlen_optimize_stmt): Add handling to builtin string compare
18108 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
18109 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
18110 * tree.c (build_common_builtin_nodes): Add new defines of
18111 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
18113 2018-05-31 Jakub Jelinek <jakub@redhat.com>
18116 * bb-reorder.c (pass_partition_blocks::gate): Return false for
18117 functions with naked attribute.
18119 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
18121 * config/i386/sse.md (avx_vec_concat<mode>):
18122 Substitute concat_tg_mode mode attribute with xtg_mode.
18123 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
18124 (concat_tg_mode): Remove mode attribute.
18126 2018-05-31 Martin Sebor <msebor@redhat.com>
18129 * calls.c (alloc_max_size): Correct a logic error/typo.
18130 Treat excessive arguments as infinite. Warn for invalid arguments.
18131 * doc/invoke.texi (-Walloc-size-larger-than): Update.
18133 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
18136 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
18137 and movx for Haswell.
18139 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
18140 Cesar Philippidis <cesar@codesourcery.com>
18142 PR middle-end/85879
18143 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
18144 when emitting error on private/firstprivate reductions.
18145 * omp-low.c (lower_omp_target): Avoid reference-type processing
18146 on pointers for firstprivate clause.
18148 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
18150 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
18153 * config/aarch64/aarch64-simd.md
18154 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
18155 (aarch64_ld1_x3_<mode>): Likewise
18156 (aarch64_st1x2<VALLDIF:mode>): Likewise
18157 (aarch64_st1_x2_<mode>): Likewise
18158 (aarch64_st1x3<VALLDIF:mode>): Likewise
18159 (aarch64_st1_x3_<mode>): Likewise
18160 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
18161 (vld1_s8_x3): Likewise.
18162 (vld1_u16_x3): Likewise.
18163 (vld1_s16_x3): Likewise.
18164 (vld1_u32_x3): Likewise.
18165 (vld1_s32_x3): Likewise.
18166 (vld1_u64_x3): Likewise.
18167 (vld1_s64_x3): Likewise.
18168 (vld1_f16_x3): Likewise.
18169 (vld1_f32_x3): Likewise.
18170 (vld1_f64_x3): Likewise.
18171 (vld1_p8_x3): Likewise.
18172 (vld1_p16_x3): Likewise.
18173 (vld1_p64_x3): Likewise.
18174 (vld1q_u8_x3): Likewise.
18175 (vld1q_s8_x3): Likewise.
18176 (vld1q_u16_x3): Likewise.
18177 (vld1q_s16_x3): Likewise.
18178 (vld1q_u32_x3): Likewise.
18179 (vld1q_s32_x3): Likewise.
18180 (vld1q_u64_x3): Likewise.
18181 (vld1q_s64_x3): Likewise.
18182 (vld1q_f16_x3): Likewise.
18183 (vld1q_f32_x3): Likewise.
18184 (vld1q_f64_x3): Likewise.
18185 (vld1q_p8_x3): Likewise.
18186 (vld1q_p16_x3): Likewise.
18187 (vld1q_p64_x3): Likewise.
18188 (vst1_s64_x2): Likewise.
18189 (vst1_u64_x2): Likewise.
18190 (vst1_f64_x2): Likewise.
18191 (vst1_s8_x2): Likewise.
18192 (vst1_p8_x2): Likewise.
18193 (vst1_s16_x2): Likewise.
18194 (vst1_p16_x2): Likewise.
18195 (vst1_s32_x2): Likewise.
18196 (vst1_u8_x2): Likewise.
18197 (vst1_u16_x2): Likewise.
18198 (vst1_u32_x2): Likewise.
18199 (vst1_f16_x2): Likewise.
18200 (vst1_f32_x2): Likewise.
18201 (vst1_p64_x2): Likewise.
18202 (vst1q_s8_x2): Likewise.
18203 (vst1q_p8_x2): Likewise.
18204 (vst1q_s16_x2): Likewise.
18205 (vst1q_p16_x2): Likewise.
18206 (vst1q_s32_x2): Likewise.
18207 (vst1q_s64_x2): Likewise.
18208 (vst1q_u8_x2): Likewise.
18209 (vst1q_u16_x2): Likewise.
18210 (vst1q_u32_x2): Likewise.
18211 (vst1q_u64_x2): Likewise.
18212 (vst1q_f16_x2): Likewise.
18213 (vst1q_f32_x2): Likewise.
18214 (vst1q_f64_x2): Likewise.
18215 (vst1q_p64_x2): Likewise.
18216 (vst1_s64_x3): Likewise.
18217 (vst1_u64_x3): Likewise.
18218 (vst1_f64_x3): Likewise.
18219 (vst1_s8_x3): Likewise.
18220 (vst1_p8_x3): Likewise.
18221 (vst1_s16_x3): Likewise.
18222 (vst1_p16_x3): Likewise.
18223 (vst1_s32_x3): Likewise.
18224 (vst1_u8_x3): Likewise.
18225 (vst1_u16_x3): Likewise.
18226 (vst1_u32_x3): Likewise.
18227 (vst1_f16_x3): Likewise.
18228 (vst1_f32_x3): Likewise.
18229 (vst1_p64_x3): Likewise.
18230 (vst1q_s8_x3): Likewise.
18231 (vst1q_p8_x3): Likewise.
18232 (vst1q_s16_x3): Likewise.
18233 (vst1q_p16_x3): Likewise.
18234 (vst1q_s32_x3): Likewise.
18235 (vst1q_s64_x3): Likewise.
18236 (vst1q_u8_x3): Likewise.
18237 (vst1q_u16_x3): Likewise.
18238 (vst1q_u32_x3): Likewise.
18239 (vst1q_u64_x3): Likewise.
18240 (vst1q_f16_x3): Likewise.
18241 (vst1q_f32_x3): Likewise.
18242 (vst1q_f64_x3): Likewise.
18243 (vst1q_p64_x3): Likewise.
18245 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
18247 * config/msp430/msp430.c (msp430_output_labelref): Prepend
18248 user_label_prefix to name.
18250 * tree-core.h: Update comment about the format of NAME string
18251 passed to handler in attribute_spec.
18253 * config/msp430/msp430.md: Remove erroneous subreg expression from
18254 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
18255 zero_extend{q,h}isi2.
18257 2018-05-30 Borislav Petkov <bp@suse.de>
18259 * doc/extend.texi: Document some architecture specific
18260 constraints and sort entries.
18262 2018-05-30 Martin Sebor <msebor@redhat.com>
18264 PR middle-end/85369
18265 * builtins.c (expand_builtin_stpcpy_1): New function.
18266 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
18267 only if the former succeeds.
18269 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
18271 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
18274 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
18276 * doc/invoke.texi (-flinker-output): Document
18278 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
18280 * passes.c (ipa_write_summaries): Only modify statements if body
18282 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
18283 incrementally linking.
18284 (ipa_passes): Likewise.
18285 * lto-cgraph.c (lto_output_node): When incrementally linking do not
18286 pass down resolution info.
18287 * common.opt (flag_incremental_link): Update info.
18288 * gcc.c (plugin specs): Turn flinker-output=* to
18289 -plugin-opt=-linker-output-known
18290 * toplev.c (compile_file): Also cut compilation when doing incremental
18292 * flag-types. (enum lto_partition_model): Add
18293 LTO_LINKER_OUTPUT_NOLTOREL.
18294 (invoke.texi): Add -flinker-output docs.
18295 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
18296 link same way as WPA; do not stream in dead initializers.
18298 * dwarf2out.c (dwarf2out_die_ref_for_decl,
18299 darf2out_register_external_decl): Support incremental link.
18301 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
18303 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
18305 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
18307 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
18308 it down to simple_object_copy_lto_debug_sections.
18309 (run_gcc): Determine incremental LTO link time and configure
18310 lto1 into non-wpa mode, disable renaming of debug sections.
18312 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
18314 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
18315 descriptions of various incorrectly documented functions.
18317 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
18320 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
18321 address check not strict.
18323 2018-05-30 Richard Biener <rguenther@suse.de>
18325 PR tree-optimization/85964
18326 * tracer.c (better_p): Drop initialized count check, we only
18327 call the function with initialized counts now.
18328 (find_best_successor): Do find a best edge if one
18329 has uninitialized count.
18330 (find_best_predecessor): Likewise. Do BB frequency check only
18331 if count is initialized.
18333 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
18335 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
18336 (aarch64_ldrstr_offset_compare): New.
18337 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
18338 load/store orderings.
18339 (aarch64_gen_adjusted_ldpstp): Likewise.
18341 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
18343 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
18344 Check for subset of GENERAL_REGS and FP_REGS.
18345 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
18348 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
18350 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
18351 and wi::to_poly_offset. Add the current offset and then check
18352 whether the sum fits, rather than using an unchecked addition of
18353 a checked term. Check for a shwi rather than a uhwi.
18354 * expr.c (get_bit_range): Use tree_to_poly_uint64.
18355 (store_constructor): Use poly_int_tree_p.
18356 (expand_expr_real_1): Likewise.
18357 * function.c (assign_temp): Likewise.
18358 * fold-const.c (const_binop): Use poly_int_tree_p and
18359 wi::to_poly_offset.
18360 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
18362 * ipa-icf-gimple.c (func_checker::compare_operand): Use
18363 to_poly_offset for MEM offsets.
18364 * ipa-icf.c (sem_variable::equals): Likewise.
18365 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
18366 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
18367 wi::to_poly_offset for BIT_FIELD_REF offsets.
18368 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
18369 wi::to_poly_offset.
18370 * var-tracking.c (emit_note_insn_var_location): Use
18371 tree_to_poly_uint64.
18373 2018-05-29 Jim Wilson <jimw@sifive.com>
18375 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
18377 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
18380 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
18381 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
18383 (sse4_1_round<mode>2): Use nonimmediate_operand
18384 for operand 1 predicate.
18386 2018-05-29 Martin Sebor <msebor@redhat.com>
18387 Richard Biener <rguenther@suse.de>
18390 * calls.c (get_size_range): Call determine_value_range instead
18391 of get_value_range..
18392 * tree-vrp.h (determine_value_range): Declared new function.
18393 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
18395 2018-05-29 Richard Biener <rguenther@suse.de>
18397 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
18398 sure to use non-pattern stmts for get_earlier_stmt arguments.
18399 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
18400 called on pattern stmts.
18401 (get_later_stmt): Likewise.
18403 2018-05-29 Martin Liska <mliska@suse.cz>
18405 PR gcov-profile/85759
18406 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
18409 2018-05-29 Jakub Jelinek <jakub@redhat.com>
18411 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
18413 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
18417 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
18418 VEC_PACK_FLOAT_EXPR): New tree codes.
18419 * tree-pretty-print.c (op_code_prio): Handle
18420 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
18421 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
18422 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
18423 * tree-inline.c (estimate_operator_cost): Likewise.
18424 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
18425 * fold-const.c (const_binop): Likewise.
18426 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
18427 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
18428 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
18429 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
18430 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
18431 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
18432 * expr.c (expand_expr_real_2): Likewise.
18433 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
18434 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
18435 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
18437 * optabs.c (expand_widen_pattern_expr): For
18438 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
18439 sign from result type rather than operand's type.
18440 (expand_binop_directly): For vec_packu_float_optab and
18441 vec_packs_float_optab allow result type to be different from operand's
18443 * optabs-tree.c (optab_for_tree_code): Handle
18444 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
18445 VEC_PACK_FLOAT_EXPR. Formatting fixes.
18446 * tree-vect-generic.c (expand_vector_operations_1): Handle
18447 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
18448 VEC_PACK_FLOAT_EXPR.
18449 * tree-vect-stmts.c (supportable_widening_operation): Handle
18451 (supportable_narrowing_operation): Handle FLOAT_EXPR.
18452 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
18453 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
18454 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
18455 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
18457 (vec_pack<floatprefix>_float_<mode>): New expander.
18458 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
18460 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
18461 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
18462 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
18463 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
18464 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
18466 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
18467 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
18468 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
18469 VEC_PACK_FLOAT_EXPR): Document.
18471 2018-05-29 Richard Biener <rguenther@suse.de>
18473 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
18475 (stmt_vec_info_vec): Make pointer.
18476 (init_stmt_vec_info_vec): Remove.
18477 (free_stmt_vec_info_vec): Likewise.
18478 (set_stmt_vec_info_vec): New function.
18479 (free_stmt_vec_infos): Likewise.
18480 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
18481 (set_vinfo_for_stmt): Likewise.
18482 (get_earlier_stmt): Likewise.
18483 (get_later_stmt): Likewise.
18484 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
18485 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
18486 (vec_info::~vec_info): Free stmt_vec_infos.
18487 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
18488 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
18489 (pass_slp_vectorize::execute): Likewise.
18490 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
18491 (free_stmt_vec_info_vec): Likewise.
18492 (set_stmt_vec_info_vec): New function.
18493 (free_stmt_vec_infos): Likewise.
18494 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
18495 the global stmt_vec_info_vec.
18496 * tree-parloops.c (gather_scalar_reductions): Use
18497 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
18500 2018-05-29 Richard Biener <rguenther@suse.de>
18502 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
18504 2018-05-29 Martin Liska <mliska@suse.cz>
18505 David Malcolm <dmalcolm@redhat.com>
18507 * vec.c (test_reverse): New.
18508 (vec_c_tests): Add new test.
18509 * vec.h (vl_ptr>::reverse): New function.
18511 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
18513 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
18515 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
18518 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
18520 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
18522 2018-05-28 Richard Biener <rguenther@suse.de>
18524 PR tree-optimization/85933
18525 * tree-vect-data-refs.c (vect_record_base_alignments): Only
18526 look at stmts marked as vectorizable.
18528 2018-05-28 Richard Biener <rguenther@suse.de>
18530 PR tree-optimization/85934
18531 * tree-vect-generic.c (expand_vector_operations_1): Hoist
18532 vector boolean check before scalar optimization.
18534 2018-05-28 Jakub Jelinek <jakub@redhat.com>
18536 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
18539 2018-05-28 Mark Wielaard <mark@klomp.org>
18541 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
18542 if it is an expression containing a minus sign.
18544 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
18546 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
18548 2018-05-27 Paul Koning <ni1d@arrl.net>
18550 * config/pdp11/pdp11.md (truncsihi2): Remove.
18552 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
18553 Chung-Ju Wu <jasonwucj@gmail.com>
18555 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
18557 (unaligned_store_dw): Ditto.
18558 * config/nds32/nds32-memory-manipulation.c
18559 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
18560 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
18561 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
18562 (emit_setmem_word_loop): Rename to ...
18563 (emit_setmem_doubleword_loop): ... this.
18564 (nds32_gen_dup_4_byte_to_word_value): New function.
18565 (nds32_gen_dup_8_byte_to_double_word_value): New function.
18566 (nds32_expand_setmem_loop): Refine implementation.
18567 (nds32_expand_setmem_loop_v3m): Ditto.
18568 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
18571 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
18573 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
18575 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
18577 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
18578 (nds32_init_machine_status): Initialize machine->attr_naked_p and
18579 machine->attr_no_prologue_p.
18580 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
18581 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
18582 (nds32_expand_epilogue): Consider attr_naked_p.
18583 (nds32_expand_epilogue_v3pop): Likewise.
18584 (nds32_can_use_return_insn): Likewise.
18585 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
18586 attr_no_prologue_p fields.
18587 * config/nds32/nds32.opt (mret-in-naked-func): New option.
18589 2018-05-27 Jakub Jelinek <jakub@redhat.com>
18592 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
18594 * config/i386/sse.md
18595 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
18597 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
18599 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
18601 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
18603 (*<floatsuffix>floatv2div2sf2): Rename to ...
18604 (*float<floatunssuffix>v2div2sf2): ... this.
18605 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
18606 (float<floatunssuffix>v2div2sf2_mask): ... this.
18607 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
18608 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
18609 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
18611 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
18613 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
18615 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
18617 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
18619 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
18621 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
18622 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
18623 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
18624 gen_ufix_truncv8dfv8si2.
18625 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
18626 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
18627 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
18628 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
18629 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
18630 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
18631 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
18632 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
18634 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
18638 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
18640 2018-05-25 Jim Wilson <jimw@sifive.com>
18642 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
18643 * config/riscv/riscv.c (struct machine_function): Add
18644 interrupt_handler_p and attribute_checked_p fields.
18645 (riscv_attribute_table): Add interrupt.
18646 (riscv_interrupt_type_p): New.
18647 (riscv_save_reg_p): Save extra regs for interrupt handler.
18648 (riscv_use_save_libcall): Return false for interrupt handler.
18649 (riscv_first_stack_step): Add forward declaration.
18650 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
18651 for interrupt handler with large frame. Use it for saved reg list.
18652 (riscv_expand_prologue): Move flag_stack_usage_info support to
18653 eliminate duplication.
18654 (riscv_expand_epilogue): Generate mret for interrupt handler.
18655 (riscv_epilogue_uses): New.
18656 (riscv_can_use_return_insn): Return false for interrupt handler.
18657 (riscv_function_ok_for_sibcall): Likewise.
18658 (riscv_set_current_function): Add interrupt handler support.
18659 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
18660 * config/riscv/riscv.md (UNSPECV_MRET): New.
18662 (riscv_frflags, riscv_fsflags): Use tab after opcode.
18664 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
18666 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
18668 PR tree-optimization/85712
18669 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
18670 this candidate has already been replaced in-situ by a copy.
18672 2018-05-25 Jason Merrill <jason@redhat.com>
18674 PR c++/80485 - inline function non-zero address.
18675 * symtab.c (nonzero_address): Check DECL_COMDAT.
18677 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
18680 * config/alpha/alpha.md (ashlsi3): New insn pattern.
18681 (*ashlsi_se): Rename from *ashldi_se. Define as sign
18682 extension of SImode operation. Use const123_operand predicate.
18683 (*saddsi_1): Remove.
18684 (*saddl_se_1): Ditto.
18685 (*ssubsi_1): Ditto.
18686 (*ssubl_se_1): Ditto.
18687 * config/alpha/predicates.md (const123_operand): New predicate.
18688 * config/alpha/constraints.md (P): Use IN_RANGE.
18690 2018-05-25 Richard Biener <rguenther@suse.de>
18692 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
18694 (ref_maybe_used_by_stmt_p): Likewise.
18695 (stmt_may_clobber_ref_p): Likewise.
18696 (stmt_may_clobber_ref_p_1): Likewise.
18697 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
18699 (ref_maybe_used_by_stmt_p): Likewise.
18700 (stmt_may_clobber_ref_p): Likewise.
18701 (stmt_may_clobber_ref_p_1): Likewise.
18702 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
18703 the alias oracle to disambiguate DRs with stmts DR analysis
18705 (vect_analyze_data_refs): Do not give up on not analyzable
18706 DRs for BB vectorization. Remove code truncating the dataref
18709 2018-05-25 Jakub Jelinek <jakub@redhat.com>
18712 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
18713 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
18714 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
18716 2018-05-25 Richard Biener <rguenther@suse.de>
18718 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
18719 function, combining stmt data ref gathering and fatal analysis
18721 (vect_analyze_data_refs): Remove now redudnant code and simplify.
18722 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
18723 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
18724 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
18725 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
18727 2018-05-25 Bin Cheng <bin.cheng@arm.com>
18729 PR tree-optimization/85720
18730 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
18731 SCC if all partitions are builtins.
18732 (version_loop_by_alias_check): New parameter. Generate cancelable
18733 runtime alias check if all partitions are builtins.
18734 (distribute_loop): Update call to above function.
18736 2018-05-25 Bin Cheng <bin.cheng@arm.com>
18738 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
18739 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
18740 (parm_default_def_partition_arg): Ditto.
18741 (set_parm_default_def_partition): Ditto.
18742 (get_parm_default_def_partitions): Ditto and make it static.
18743 (get_undefined_value_partitions): Ditto and make it static.
18744 (remove_ssa_form): Refactor call to init_var_map here.
18745 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
18746 computation for loop region.
18747 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
18748 (register_default_def): Delete.
18749 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
18750 (parm_default_def_partition_arg): Ditto.
18751 (set_parm_default_def_partition): Ditto.
18752 (get_parm_default_def_partitions): Ditto and make it static.
18753 (get_undefined_value_partitions): Ditto and make it static.
18754 (coalesce_with_default, coalesce_with_default): Update comment.
18755 (create_coalesce_list_for_region): New func factored out from
18756 create_outofssa_var_map.
18757 (populate_coalesce_list_for_outofssa): New func factored out from
18758 create_outofssa_var_map and coalesce_ssa_name.
18759 (create_outofssa_var_map): Delete.
18760 (coalesce_ssa_name): Refactor to support live range computation.
18761 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
18762 (get_parm_default_def_partitions): Delete.
18763 (get_undefined_value_partitions): Ditto.
18764 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
18765 computation for loop region.
18766 (new_tree_live_info, loe_visit_block): Ditto.
18767 (live_worklist, set_var_live_on_entry): Ditto.
18768 (calculate_live_on_exit, verify_live_on_entry): Ditto.
18769 * tree-ssa-live.h (struct _var_map): New fields.
18770 (init_var_map): Change decl.
18771 (region_contains_p): New.
18773 2018-05-25 Bin Cheng <bin.cheng@arm.com>
18775 * tree-ssa-live.h (live_merge_and_clear): Delete.
18777 2018-05-25 Richard Biener <rguenther@suse.de>
18780 * tree-dump.c (dequeue_and_dump): Remove access to removed
18781 operand 2 of a SWITCH_EXPR.
18783 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
18785 * doc/sourcebuild.texi (vect_double_cond_arith): Include
18786 multiplication and division.
18787 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
18788 (cond_udiv@var{m}, cond_umod@var{m}): Document.
18789 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
18790 (cond_udiv_optab, cond_umod_optab): New optabs.
18791 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
18792 (IFN_COND_RDIV): New internal functions.
18793 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
18794 TRUNC_MOD_EXPR and RDIV_EXPR.
18795 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
18796 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
18798 (SVE_INT_BINARY): Include mult.
18799 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
18800 (optab, sve_int_op): Handle mult.
18801 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
18803 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
18804 for SVE_INT_BINARY_SD.
18806 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
18808 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
18809 (optab, sve_int_op): Handle div and udiv.
18810 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
18811 for SVE_INT_BINARY_SD.
18812 (*<optab><mode>3): New insn for the same.
18814 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
18816 * tree-vect-patterns.c: Include predict.h.
18817 (vect_recog_divmod_pattern): Restrict check for division support
18818 to when optimizing for size.
18820 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
18822 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
18823 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
18824 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
18825 (gimple_match_op::set_op): Likewise.
18826 (gimple_resimplify4): Declare.
18827 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
18828 (expr::gen_transform): Likewise.
18829 (decision_tree::gen): Generate a simplification routine for 4 operands.
18830 * gimple-match-head.c (gimple_simplify): Add an overload for
18831 4 operands. In the top-level function, handle up to 4 call
18832 arguments and call gimple_resimplify4.
18833 (gimple_resimplify4): New function.
18834 (build_call_internal): Pass a fourth operand.
18835 (maybe_push_to_seq): Likewise.
18836 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
18837 Fold VEC_COND_EXPRs of an operation and a default value into
18838 an IFN_COND_* function if possible.
18839 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
18841 (SVE_COND_FP_BINARY): Include them.
18842 (optab, sve_fp_op): Handle them.
18843 (SVE_INT_BINARY_REV): New code iterator.
18844 (SVE_COND_FP_BINARY_REV): New int iterator.
18845 (commutative): New int attribute.
18846 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
18848 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
18850 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
18851 (*cond_<optab><mode>): New patterns for reversed operands.
18853 2018-05-25 Richard Biener <rguenther@suse.de>
18855 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
18856 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
18857 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
18858 (STMT_VINFO_GROUPED_ACCESS): Adjust.
18859 * tree-vect-data-refs.c (everywhere): Adjust users.
18860 * tree-vect-loop.c (everywhere): Likewise.
18861 * tree-vect-slp.c (everywhere): Likewise.
18862 * tree-vect-stmts.c (everywhere): Likewise.
18863 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
18865 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
18867 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
18869 (gcc_cv_as_section_exclude): ... this.
18870 Try Solaris as #exclude syntax.
18871 * configure: Regenerate.
18872 * config.in: Regenerate.
18873 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
18875 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
18876 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
18878 * varasm.c (default_elf_asm_named_section): Don't check if
18879 HAVE_GAS_SECTION_EXCLUDE is defined.
18881 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
18883 * doc/md.texi: Update the documentation of the cond_* optabs
18884 to mention the new final operand. Fix GET_MODE_NUNITS call.
18885 Describe the scalar case too.
18886 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
18887 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
18889 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
18890 (get_conditional_internal_fn): Update comment.
18891 * tree-vect-loop.c (vectorizable_reduction): Pass the original
18892 accumulator value as a final argument to conditional functions.
18893 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
18894 a define_expand and add an "else" operand. Assert for now that
18895 the else operand is equal to operand 2. Use SVE_INT_BINARY and
18896 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
18897 (*cond_<optab><mode>): New patterns.
18898 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
18899 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
18900 (UNSPEC_COND_EOR): Delete.
18901 (optab): Remove associated mappings.
18902 (SVE_INT_BINARY): New code iterator.
18903 (sve_int_op): Remove int attribute and add "minus" to the code
18905 (SVE_COND_INT_OP): Delete.
18906 (SVE_COND_FP_OP): Rename to...
18907 (SVE_COND_FP_BINARY): ...this.
18909 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
18911 * optabs.c (can_reuse_operands_p): New function.
18912 (maybe_legitimize_operands): Try to reuse the results for
18915 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
18917 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
18918 Add {q} suffix to insn mnemonic.
18920 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
18922 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
18923 (msp430_warn_func_return): New.
18925 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
18927 * fold-const.c (tree_nonzero_bits): New function.
18928 * fold-const.h (tree_nonzero_bits): Likewise.
18929 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
18930 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
18932 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
18936 * varasm.c (assemble_alias): Check ifunc_resolver only on
18939 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
18942 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
18943 when memory input operand is handled.
18945 2018-05-24 Luis Machado <luis.machado@linaro.org>
18947 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
18949 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
18951 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
18953 * match.pd: Delay FMA folds until after vectorization.
18955 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
18958 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
18959 address check not strict.
18961 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
18963 * gimple-match.h (gimple_match_op): New class.
18964 (mprts_hook): Replace parameters with a gimple_match_op *.
18965 (maybe_build_generic_op): Likewise.
18966 (gimple_simplified_result_is_gimple_val): Replace parameters with
18967 a const gimple_match_op *.
18968 (gimple_simplify): Replace code_helper * and tree * parameters with
18969 a gimple_match_op * parameter.
18970 (gimple_resimplify1): Replace code_helper *, tree and tree *
18971 parameters with a gimple_match_op * parameter.
18972 (gimple_resimplify2): Likewise.
18973 (gimple_resimplify3): Likewise.
18974 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
18975 parameters with a gimple_match_op * parameter.
18976 * gimple-match-head.c (gimple_simplify): Change prototypes of
18977 auto-generated functions to take a gimple_match_op * instead of
18978 separate code_helper * and tree * parameters. Make the same
18979 change in the top-level overload and update calls to the
18980 gimple_resimplify routines. Update calls to the auto-generated
18981 functions and to maybe_push_res_to_seq in the publicly-facing
18982 operation-specific gimple_simplify overloads.
18983 (gimple_match_op::MAX_NUM_OPS): Define.
18984 (gimple_resimplify1): Replace rcode and ops with a single res_op
18985 parameter. Update call to gimple_simplify.
18986 (gimple_resimplify2): Likewise.
18987 (gimple_resimplify3): Likewise.
18988 (mprts_hook): Replace parameters with a gimple_match_op *.
18989 (maybe_build_generic_op): Likewise.
18990 (build_call_internal): Replace type, nargs and ops with
18991 a gimple_match_op *.
18992 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
18993 with a single gimple_match_op *. Update calls to mprts_hook,
18994 build_call_internal and gimple_simplified_result_is_gimple_val.
18995 Factor out code that is common to the tree_code and combined_fn cases.
18996 * genmatch.c (expr::gen_transform): Replace tem_code and
18997 tem_ops with a gimple_match_op called tem_op. Update calls
18998 to the gimple_resimplify functions and maybe_push_res_to_seq.
18999 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
19000 res_ops. Update call to the gimple_resimplify functions.
19001 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
19002 (decision_tree::gen): Make the functions take a gimple_match_op *
19003 called res_op instead of separate res_code and res_ops parameters.
19004 Update call accordingly.
19005 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
19006 and ops with a single res_op parameter. Update calls to
19007 maybe_build_generic_op and maybe_push_res_to_seq.
19008 (fold_stmt_1): Update calls to gimple_simplify and
19009 replace_stmt_with_simplification.
19010 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
19011 and gimple_simplified_result_is_gimple_val.
19012 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
19014 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
19015 with a gimple_match_op *.
19016 (vn_nary_build_or_lookup): Likewise. Update call to
19017 vn_nary_build_or_lookup_1.
19018 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
19019 gimple_match_op *. Update calls to the gimple_resimplify routines
19020 and to gimple_simplified_result_is_gimple_val.
19021 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
19022 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
19023 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
19024 (visit_nary_op): Likewise.
19025 (visit_reference_op_load): Likewise.
19027 2018-05-23 Luis Machado <luis.machado@linaro.org>
19029 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
19030 modifier for printing the step amount.
19032 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
19035 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
19038 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
19040 * doc/sourcebuild.texi (Endianness): New subsubsection.
19042 2018-05-23 Luis Machado <luis.machado@linaro.org>
19044 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
19045 <prefetch_dynamic_strides>: New const bool field.
19046 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
19047 prefetch_dynamic_strides.
19048 (exynosm1_prefetch_tune): Likewise.
19049 (thunderxt88_prefetch_tune): Likewise.
19050 (thunderx_prefetch_tune): Likewise.
19051 (thunderx2t99_prefetch_tune): Likewise.
19052 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
19054 (aarch64_override_options_internal): Update to set
19055 PARAM_PREFETCH_DYNAMIC_STRIDES.
19056 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
19057 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
19058 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
19059 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
19060 prefetch-dynamic-strides setting.
19062 2018-05-23 Luis Machado <luis.machado@linaro.org>
19064 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
19065 <minimum_stride>: New const int field.
19066 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
19067 minimum_stride field defaulting to -1.
19068 (exynosm1_prefetch_tune): Likewise.
19069 (thunderxt88_prefetch_tune): Likewise.
19070 (thunderx_prefetch_tune): Likewise.
19071 (thunderx2t99_prefetch_tune): Likewise.
19072 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
19073 <default_opt_level>: Set to 3.
19074 (aarch64_override_options_internal): Update to set
19075 PARAM_PREFETCH_MINIMUM_STRIDE.
19076 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
19077 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
19078 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
19079 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
19080 stride is constant and is below the minimum stride threshold.
19082 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19084 * config/arm/arm-cpus.in (mode26): Delete.
19085 (armv4): Delete mode26 reference.
19086 * config/arm/arm.c (arm_configure_build_target): Delete use of
19089 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
19091 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
19093 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
19094 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
19096 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
19097 (floatunsdidf2): Ditto.
19099 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
19101 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
19102 (fixuns_trunc<mode>si2_avx512f): Ditto.
19103 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
19104 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
19105 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
19107 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
19109 PR rtl-optimization/79985
19110 * df-scan.c (df_insn_refs_collect): Remove special case for
19111 global registers and asm statements.
19113 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
19115 * extend.texi (Global Register Variables): Rewrite the bullet list.
19116 Note that the register is available for allocation. Note that access
19117 via inline asm must use constraints. Add note about async-signal
19118 handlers. Remove paragraph about automagic register selection.
19120 2018-05-23 Richard Biener <rguenther@suse.de>
19122 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
19123 of fixed offset from memset VN.
19125 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
19127 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
19128 first_interp field.
19129 (alloc_cand_and_find_basis): Initialize first_interp field.
19130 (slsr_process_mul): Modify first_interp field.
19131 (slsr_process_add): Likewise.
19132 (slsr_process_cast): Modify first_interp field for each new
19134 (slsr_process_copy): Likewise.
19135 (dump_candidate): Dump first_interp field.
19136 (replace_mult_candidate): Process all interpretations, not just
19138 (replace_rhs_if_not_dup): Likewise.
19139 (replace_one_candidate): Likewise.
19141 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
19143 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
19145 (aarch64_needs_frame_chain): New function.
19146 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
19148 2018-05-23 Sudakshina Das <sudi.das@arm.com>
19151 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
19152 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
19153 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
19154 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
19155 as true for strict-align.
19156 (aarch64_can_inline_p): Perform checks even when callee has no
19157 attributes to check for strict alignment.
19158 * doc/extend.texi (AArch64 Function Attributes): Document
19160 * doc/invoke.texi: (AArch64 Options): Likewise.
19162 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
19164 PR tree-optimization/85853
19165 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
19166 the handling of the root of the node to...
19167 (vect_slp_analyze_node_operations_1): ...this new function,
19168 and run the whole thing with the child nodes' def types
19169 set according to their SLP node's def type.
19171 2018-05-23 Richard Biener <rguenther@suse.de>
19173 PR middle-end/85874
19174 * tree-data-ref.c (create_runtime_alias_checks): Defer
19175 and ignore overflow warnings.
19177 2018-05-23 Yury Gribov <tetra2005@gmail.com>
19179 PR tree-optimization/85822
19180 * tree-vrp.c (is_masked_range_test): Fix handling of negative
19183 2018-05-23 Richard Biener <rguenther@suse.de>
19185 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
19186 memset constants via native_interpret_expr.
19188 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
19191 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
19193 (cgraph_node::create_alias): Likewise.
19194 (cgraph_node::get_availability): Check ifunc_resolver instead
19195 of looking up ifunc attribute.
19196 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
19197 * varasm.c (do_assemble_alias): Likewise.
19198 (assemble_alias): Likewise.
19199 (default_binds_local_p_3): Likewise.
19200 * cgraph.h (cgraph_node): Add ifunc_resolver.
19201 (cgraph_node::only_called_directly_or_aliased_p): Return false
19202 for IFUNC resolver.
19203 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
19205 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
19206 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
19207 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
19208 instead of looking up ifunc attribute.
19210 2018-05-22 Luis Machado <luis.machado@linaro.org>
19212 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
19214 2018-05-22 Martin Sebor <msebor@redhat.com>
19216 PR middle-end/85359
19217 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
19218 only when expasion succeeds.
19219 (expand_builtin_strcmp): Same.
19220 (expand_builtin_strncmp): Same.
19222 2018-05-22 Martin Sebor <msebor@redhat.com>
19224 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
19226 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
19227 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19229 * config/aarch64/aarch64-ldpstp.md: Replace uses of
19230 aarch64_mem_pair_operand with memory_operand and delete operand swapping
19232 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
19233 Add check for legitimate_address.
19234 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
19235 (aarch64_swap_ldrstr_operands): New.
19236 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
19239 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
19240 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19242 * config/aarch64/aarch64.md: New patterns to generate stp
19244 (store_pair_sw, store_pair_dw): New patterns to generate stp for
19245 single words and double words.
19246 (load_pair_sw, load_pair_dw): Likewise.
19247 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
19249 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
19251 * config/aarch64/aarch64-ldpstp.md: Modify peephole
19252 for different mode ldpstp and add peephole for merged zero stores.
19253 Likewise for loads.
19254 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
19256 (aarch64_gen_store_pair): Rename calls to match new patterns.
19257 (aarch64_gen_load_pair): Rename calls to match new patterns.
19258 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
19259 (load_pair<DREG:mode><DREG2:mode>): ... This.
19260 (store_pair<mode>): Rename to...
19261 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
19262 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
19263 New mode iterators.
19264 (V_INT_EQUIV): Handle SImode.
19265 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
19268 2018-05-22 Martin Sebor <msebor@redhat.com>
19271 * calls.c (maybe_warn_nonstring_arg): Use string length to set
19272 or ajust the presumed bound on an operation to avoid unnecessary
19275 2018-05-22 Martin Sebor <msebor@redhat.com>
19277 PR tree-optimization/85826
19278 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
19279 assuming that a DECL necesarily has a constant size.
19281 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
19283 PR middle-end/85862
19284 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
19286 2018-05-22 Richard Biener <rguenther@suse.de>
19288 PR tree-optimization/85834
19289 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
19290 non-constant and non-zero memset arguments.
19292 2018-05-22 Martin Liska <mliska@suse.cz>
19295 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
19297 2018-05-22 Richard Biener <rguenther@suse.de>
19299 PR tree-optimization/85863
19300 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
19301 comparisons when vectype is specified.
19302 (vectorizable_condition): Do not specify vectype for
19303 vect_is_simple_cond when SLP vectorizing.
19305 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
19308 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
19309 define __ibm128 as long double.
19310 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
19311 as a distinct type when IEEE 128-bit support is enabled.
19312 (init_float128_ieee): Fix up conversions between IFmode and IEEE
19313 128-bit types to use the correct functions.
19314 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
19315 convert between 128-bit floating point types that have different
19316 modes but the same representation, instead of using gen_lowpart to
19318 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
19320 (IFKF_reg): New attributes to give the register constraints for
19322 (extend<mode>tf2_internal): New insns to mark an explicit
19323 conversion between 128-bit floating point types that have a
19324 different mode but share the same representation.
19326 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
19328 PR tree-optimization/85814
19329 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
19330 a null return from get_strinfo when unsharing the next
19331 strinfo in the chain.
19333 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
19336 * varasm.c (weak_finish): Clean up weak_decls.
19338 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19340 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
19341 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
19342 UNSPEC_UADALP values.
19343 * config/aarch64/iterators.md (ABAL): New int iterator.
19346 (sur): Add mappings for the above.
19347 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
19349 (aarch64_<sur>abal<mode>_4): Likewise.
19350 (aarch64_<sur>adalp<mode>_3): Likewise.
19351 (<sur>sadv16qi): New define_expand.
19353 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
19355 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
19356 (*movdf_internal): Ditto.
19357 (*rcpsf2_sse): Ditto.
19358 (*rsqrtsf2_sse): Ditto.
19359 (*sqrt<mode>2_sse): Ditto.
19361 2018-05-21 Tamar Christina <tamar.christina@arm.com>
19363 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
19365 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
19366 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
19367 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
19368 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
19370 * config/aarch64/arm_neon.h: Likewise.
19371 * config/aarch64/iterators.md (VQ_I): New.
19373 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
19375 * config.gcc: Add arc/t-multilib-linux to tmake_file for
19377 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
19380 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
19382 * config/nds32/constraints.md (S): New constraint.
19383 * config/nds32/nds32.md (call_internal): Use constraint S.
19384 (call_value_internal): Likewise.
19385 (sibcall_internal): Likewise.
19386 (sibcall_value_internal): Likewise.
19388 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
19389 Chung-Ju Wu <jasonwucj@gmail.com>
19391 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
19392 into consideration.
19394 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
19395 Chung-Ju Wu <jasonwucj@gmail.com>
19397 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
19398 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
19399 (nds32_rtx_costs_impl): Simplify.
19400 (nds32_address_cost_impl): Simplify.
19401 (nds32_init_rtx_costs): New function.
19402 (nds32_rtx_costs_speed_prefer): Likewise.
19403 (nds32_rtx_costs_size_prefer): Likewise.
19404 (nds32_address_cost_speed_prefer): Likewise.
19405 (nds32_address_cost_speed_fwprop): Likewise.
19406 (nds32_address_cost_size_prefer): Likewise.
19407 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
19408 * config/nds32/nds32.c (nds32_option_override): Use
19409 nds32_init_rtx_costs function.
19411 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
19413 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
19414 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
19415 (TARGET_PIPELINE_N8): Likewise.
19416 (TARGET_PIPELINE_N10): Likewise.
19417 (TARGET_PIPELINE_N13): Likewise.
19418 (TARGET_PIPELINE_GRAYWOLF): Likewise.
19420 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
19422 * config/nds32/nds32-fpu.md: Update copyright year.
19424 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
19426 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
19428 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
19430 * config/nds32/nds32.c
19431 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
19432 * config/nds32/nds32.opt (minline-asm-r15): New option.
19434 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
19436 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
19438 * config/nds32/nds32.md (abssi2): New pattern.
19440 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
19442 * config/i386/i386.md (rex64namesuffix): New mode attribute.
19443 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
19444 Merge insn pattern from sse_cvtsi2ss<round_name> and
19445 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
19446 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
19447 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
19448 using SWI48 mode iterator.
19449 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
19450 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
19451 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
19452 pattern from sse_cvttss2si<round_saeonly_name>
19453 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
19454 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
19455 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
19456 using SWI48 mode iterator.
19457 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
19458 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
19459 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
19460 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
19461 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
19462 using SWI48 mode iterator.
19463 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
19464 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
19465 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
19466 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
19467 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
19468 SWI48 mode iterator.
19469 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
19470 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
19471 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
19472 pattern from sse_cvttsd2si<round_saeonly_name>
19473 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
19475 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
19477 * config/nds32/nds32-md-auxiliary.c
19478 (nds32_valid_smw_lwm_base_p): Refine.
19479 (nds32_output_smw_single_word): Refine.
19480 (nds32_output_smw_double_word): New.
19481 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
19483 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
19485 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
19486 (nds32_output_stack_pop): Refine.
19487 (nds32_expand_unaligned_load): Refine.
19488 (nds32_expand_unaligned_store): Refine.
19490 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
19491 Chung-Ju Wu <jasonwucj@gmail.com>
19493 * config/nds32/constants.md: Add TP_REGNUM constant.
19494 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
19495 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
19497 * config/nds32/nds32-doubleword.md: Consider flag_pic.
19498 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
19499 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
19500 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
19501 and PIC code generation.
19502 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
19504 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
19506 * config/nds32/nds32.md: Support TLS and PIC.
19507 * config/nds32/nds32.c: Support TLS and PIC.
19508 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
19509 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
19512 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
19514 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
19515 mode with E_ prefix.
19517 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
19518 Chung-Ju Wu <jasonwucj@gmail.com>
19520 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
19521 * config/nds32/nds32-md-auxiliary.c
19522 (symbolic_reference_mentioned_p): New.
19523 (nds32_legitimize_ict_address): New.
19524 (nds32_expand_ict_move): New.
19525 (nds32_indirect_call_referenced_p): New.
19526 (nds32_symbol_binds_local_p): Delete.
19527 (nds32_long_call_p): Modify.
19528 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
19529 * config/nds32/nds32-protos.h
19530 (symbolic_reference_mentioned_p): Declare.
19531 (nds32_legitimize_ict_address): Declare.
19532 (nds32_expand_ict_move): Declare.
19533 (nds32_indirect_call_referenced_p): Declare.
19534 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
19535 (nds32_relax_group): Use nds32_ict_const_p as condition.
19536 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
19537 (nds32_asm_file_start): Output ict_model directive in asm code.
19538 (nds32_legitimate_address_p): Consider indirect call.
19539 (nds32_print_operand): Consider indirect call.
19540 (nds32_print_operand_address): Consider indirect call.
19541 (nds32_insert_attributes): Handle "indirect_call" attribute.
19542 (TARGET_LEGITIMATE_ADDRESS_P): Define.
19543 (TARGET_LEGITIMATE_CONSTANT_P): Define.
19544 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
19545 (TARGET_DELEGITIMIZE_ADDRESS): Define.
19546 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
19547 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
19548 (TARGET_ICT_MODEL_SMALL): Define.
19549 (TARGET_ICT_MODEL_LARGE): Define.
19550 * config/nds32/nds32.md (movsi): Consider ict model.
19551 (call, call_value): Consider ict model.
19552 (sibcall, sibcall_value): Consider ict model.
19553 * config/nds32/nds32.opt (mict-model): New option.
19554 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
19557 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
19558 Monk Chiang <sh.chiang04@gmail.com>
19559 Jim Wilson <jimw@sifive.com>
19561 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
19562 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
19563 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
19564 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
19565 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
19566 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
19567 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
19568 compute save_libcall_adjustment properly.
19569 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
19570 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
19571 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
19572 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
19573 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
19574 (ABI_SPEC): Handle mabi=ilp32e.
19575 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
19576 (RVE): Add RVE mask.
19577 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
19578 <-march>: Add rv32e as an example.
19580 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
19583 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
19584 (intra_create_variable_infos): Handle C++ constructors.
19586 2018-05-18 Martin Liska <mliska@suse.cz>
19588 * passes.def: Remove a redundant pass.
19590 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
19593 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
19595 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19597 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
19599 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
19601 (armv2, armv2a, armv3, armv3m): Delete architectures.
19602 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
19603 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
19604 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
19606 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
19607 (*mulsidi3adddi): Likewise.
19608 (mulsidi3): Likewise.
19609 (*mulsidi3_nov6): Likewise.
19610 (umulsidi3): Likewise.
19611 (umulsidi3_nov6): Likewise.
19612 (umaddsidi4): Likewise.
19613 (*umulsidi3adddi): Likewise.
19614 (smulsi3_highpart): Likewise.
19615 (*smulsi3_highpart_nov6): Likewise.
19616 (umulsi3_highpart): Likewise.
19617 (*umulsi3_highpart_nov6): Likewise.
19618 * config/arm/arm.h (arm_arch3m): Delete.
19619 * config/arm/arm.c (arm_arch3m): Delete.
19620 (arm_option_override_internal): Update armv3-related comment.
19621 (arm_configure_build_target): Delete use of isa_bit_mode32.
19622 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
19623 (arm_rtx_costs_internal): Delete check of arm_arch3m.
19624 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
19625 (mulsa3): Likewise.
19626 (mulusa3): Likewise.
19627 * config/arm/arm-protos.h (arm_arch3m): Delete.
19628 * config/arm/arm-tables.opt: Regenerate.
19629 * config/arm/arm-tune.md: Likewise.
19630 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
19631 deleted architectures.
19633 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19635 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
19636 (armv5t, armv5te): New features.
19637 (ARMv5, ARMv5e): Delete fgroups.
19638 (ARMv5t, ARMv5te): Adjust for above changes.
19639 (ARMv6m): Likewise.
19640 (armv5, armv5e): Delete arches.
19641 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
19643 (*call_reg_arm): Likewise.
19644 (*call_value_reg_armv5): Likewise.
19645 (*call_value_reg_arm): Likewise.
19646 (*call_symbol): Likewise.
19647 (*call_value_symbol): Likewise.
19648 (*sibcall_insn): Likewise.
19649 (*sibcall_value_insn): Likewise.
19650 (clzsi2): Likewise.
19651 (prefetch): Likewise.
19652 (define_split and define_peephole2 dependent on arm_arch5):
19654 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
19656 (TARGET_ARM_QBIT): Likewise.
19657 (TARGET_DSP_MULTIPLY): Likewise.
19658 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
19659 (arm_arch5, arm_arch5e): Delete.
19660 (arm_arch5t, arm_arch5te): Declare.
19661 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
19662 (arm_arch5t): Declare.
19663 (arm_option_reconfigure_globals): Update for the above.
19664 (arm_options_perform_arch_sanity_checks): Update comment, replace
19665 use of arm_arch5 with arm_arch5t.
19666 (use_return_insn): Likewise.
19667 (arm_emit_call_insn): Likewise.
19668 (output_return_instruction): Likewise.
19669 (arm_final_prescan_insn): Likewise.
19670 (arm_coproc_builtin_available): Likewise.
19671 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
19672 arm_arch5e with arm_arch5t and arm_arch5te.
19673 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
19674 (arm_arch5t, arm_arch5te): Declare.
19675 * config/arm/arm-tables.opt: Regenerate.
19676 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
19677 * config/arm/t-multilib: Likewise.
19678 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
19679 instead of arm_arch5.
19680 (*call_reg_thumb1): Likewise.
19681 (*call_value_reg_thumb1_v5): Likewise.
19682 (*call_value_reg_thumb1): Likewise.
19683 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
19685 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
19687 2018-05-18 Martin Liska <mliska@suse.cz>
19689 PR gcov-profile/84846
19690 * doc/gcov.texi: Document -t option of gcov tool.
19692 2018-05-18 Martin Liska <mliska@suse.cz>
19694 PR gcov-profile/84846
19695 * gcov.c (print_usage): Add new -t option.
19696 (process_args): Handle the option.
19697 (generate_results): Use stdout as output when requested by
19700 2018-05-18 Martin Liska <mliska@suse.cz>
19702 PR gcov-profile/84846
19703 * coverage.c (coverage_init): Write PWD to .gcno file.
19704 * doc/gcov.texi: Document how working directory is printed.
19705 * gcov-dump.c (dump_gcov_file): Print PWD.
19706 * gcov.c (output_intermediate_file): Likewise.
19707 (read_graph_file): Read PWD string.
19708 (output_lines): Print PWD.
19710 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
19712 PR middle-end/85817
19713 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
19714 for retval and return false if all args to phi are zero.
19716 2018-05-18 Richard Biener <rguenther@suse.de>
19718 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
19720 (evrp_dom_walker::before_dom_children): Call it.
19722 2018-05-18 Richard Biener <rguenther@suse.de>
19724 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
19725 results when processing array refs with variable index.
19727 2018-05-18 Toon Moene <toon@moene.org>
19729 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
19730 directly after that of -floop-interchange. Indicate that both
19731 options are enabled by default when specifying -O3.
19733 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19735 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
19736 iterator. Delete separate integer-mode vec_set<mode> expander.
19737 (aarch64_simd_vec_setv2di): Delete.
19738 (vec_setv2di): Delete.
19739 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
19740 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
19741 the "w, r" alternative.
19743 2018-05-18 Martin Liska <mliska@suse.cz>
19745 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
19746 * tree-pass.h (make_pass_lower_switch_O0): New function.
19747 * tree-switch-conversion.c (node_has_low_bound): Remove.
19748 (node_has_high_bound): Likewise.
19749 (node_is_bounded): Likewise.
19750 (class pass_lower_switch): Make it a template type and create
19752 (pass_lower_switch::execute): Add template argument.
19753 (make_pass_lower_switch): New function.
19754 (make_pass_lower_switch_O0): New function.
19755 (do_jump_if_equal): Remove.
19756 (emit_case_nodes): Simplify to just handle all 3 cases and leave
19757 all the hard work to tree optimization passes.
19759 2018-05-18 Martin Liska <mliska@suse.cz>
19761 * dbgcnt.c (limit_low): Renamed from limit.
19762 (limit_high): New variable.
19763 (dbg_cnt_is_enabled): Check for upper limit.
19764 (dbg_cnt): Adjust dumping.
19765 (dbg_cnt_set_limit_by_index): Add new argument for high
19767 (dbg_cnt_set_limit_by_name): Likewise.
19768 (dbg_cnt_process_single_pair): Parse new format.
19769 (dbg_cnt_process_opt): Use strtok.
19770 (dbg_cnt_list_all_counters): Remove 'value' and add
19772 * doc/invoke.texi: Document changes.
19774 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
19776 * doc/sourcebuild.texi (scalar_all_fma): Document.
19777 * tree.def (FMA_EXPR): Delete.
19778 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
19779 * internal-fn.c (ternary_direct): New macro.
19780 (expand_ternary_optab_fn): Likewise.
19781 (direct_ternary_optab_supported_p): Likewise.
19782 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
19783 * builtins.c (fold_builtin_fma): Delete.
19784 (fold_builtin_3): Don't call it.
19785 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
19786 * expr.c (expand_expr_real_2): Likewise.
19787 * fold-const.c (operand_equal_p): Likewise.
19788 (fold_ternary_loc): Likewise.
19789 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
19790 * gimple.c (DEFTREECODE): Likewise.
19791 * gimplify.c (gimplify_expr): Likewise.
19792 * optabs-tree.c (optab_for_tree_code): Likewise.
19793 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
19794 * tree-eh.c (operation_could_trap_p): Likewise.
19795 (stmt_could_throw_1_p): Likewise.
19796 * tree-inline.c (estimate_operator_cost): Likewise.
19797 * tree-pretty-print.c (dump_generic_node): Likewise.
19798 (op_code_prio): Likewise.
19799 * tree-ssa-loop-im.c (stmt_cost): Likewise.
19800 * tree-ssa-operands.c (get_expr_operands): Likewise.
19801 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
19802 * fold-const-call.h (fold_fma): Delete.
19803 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
19804 CFN_FNMA and CFN_FNMS.
19805 (fold_fma): Delete.
19806 * genmatch.c (combined_fn): New enum.
19807 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
19808 (commutative_op): New function.
19809 (commutate): Use it. Handle more than 2 operands.
19810 (dt_operand::gen_gimple_expr): Use commutative_op.
19811 (parser::parse_expr): Allow :c to be used with non-binary
19812 operators if the commutative operand is known.
19813 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
19814 CFN_FMS, CFN_FNMA and CFN_FNMS.
19815 (backprop::process_assign_use): Remove FMA_EXPR handling.
19816 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
19817 (gen_hsa_fma): New function.
19818 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
19819 IFN_FNMA and IFN_FNMS.
19820 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
19821 * gimple-fold.h (follow_all_ssa_edges): Declare.
19822 * gimple-fold.c (follow_all_ssa_edges): New function.
19823 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
19824 gimple_build interface and use follow_all_ssa_edges to fold the result.
19825 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
19826 instead of checking for optabs directly.
19827 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
19828 rather than FMA_EXPRs.
19829 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
19830 call to IFN_FMA instead of an FMA_EXPR.
19832 2018-05-17 Jim Wilson <jimw@sifive.com>
19834 * expr.c (do_tablejump): When converting index to Pmode, if we have a
19835 sign extended promoted subreg, and the range does not have the sign bit
19836 set, then do a sign extend.
19838 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
19839 test, check for sign extended subreg and/or constant operands, and
19840 do a sign extend in that case.
19842 2018-05-17 Steve Ellcey <sellcey@cavium.com>
19844 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
19845 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
19847 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
19848 Change logics_shift_reg to logics_shift_imm.
19849 (thunderx2t99_fp_loadpair_basic): Delete.
19850 (thunderx2t99_fp_storepair_basic): Delete.
19851 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
19852 (thunderx2t99_asimd_polynomial): Delete.
19853 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
19854 and neon_fp_mul_d_scalar_q.
19855 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
19856 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
19857 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
19858 (thunderx2t99_asimd_lut): Add missing tbl types.
19859 (thunderx2t99_asimd_ext): Delete.
19860 (thunderx2t99_asimd_load1_1_mult): Delete.
19861 (thunderx2t99_asimd_load1_2_mult): Delete.
19862 (thunderx2t99_asimd_load1_ldp): New.
19863 (thunderx2t99_asimd_load1): New.
19864 (thunderx2t99_asimd_load2): Add missing *load2* types.
19865 (thunderx2t99_asimd_load3): New.
19866 (thunderx2t99_asimd_load4): New.
19867 (thunderx2t99_asimd_store1_1_mult): Delete.
19868 (thunderx2t99_asimd_store1_2_mult): Delete.
19869 (thunderx2t99_asimd_store2_mult): Delete.
19870 (thunderx2t99_asimd_store2_onelane): Delete.
19871 (thunderx2t99_asimd_store_stp): New.
19872 (thunderx2t99_asimd_store1): New.
19873 (thunderx2t99_asimd_store2): New.
19874 (thunderx2t99_asimd_store3): New.
19875 (thunderx2t99_asimd_store4): New.
19877 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
19879 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
19880 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
19882 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
19883 Segher Boessenkool <segher@kernel.crashing.org>
19886 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
19889 2018-05-17 Richard Biener <rguenther@suse.de>
19891 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
19892 for pruning loop and prune defs feeding only already visited PHIs.
19894 2018-05-17 Richard Biener <rguenther@suse.de>
19896 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
19898 2018-05-17 Bin Cheng <bin.cheng@arm.com>
19899 Richard Biener <rguenther@suse.de>
19901 PR tree-optimization/85793
19902 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
19903 for VMAT_ELEMENTWISE.
19905 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
19907 * internal-fn.h (lookup_internal_fn): Declare
19908 * internal-fn.c (lookup_internal_fn): New function.
19909 * gimple.c (gimple_build_call_from_tree): Handle calls to
19910 internal functions.
19911 * gimple-pretty-print.c (dump_gimple_call): Print "." before
19912 internal function names.
19913 * tree-pretty-print.c (dump_generic_node): Likewise.
19914 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
19916 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
19918 * gimple-fold.h (gimple_build): Make the function forms take
19919 combined_fn rather than built_in_function.
19920 (gimple_simplify): Likewise.
19921 * gimple-match-head.c (gimple_simplify): Likewise.
19922 * gimple-fold.c (gimple_build): Likewise.
19923 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
19924 rather than gimple_build_call_internal.
19925 (get_initial_defs_for_reduction): Likewise.
19926 (vect_create_epilog_for_reduction): Likewise.
19927 (vectorizable_live_operation): Likewise.
19929 2018-05-17 Martin Liska <mliska@suse.cz>
19931 * gimple-ssa-sprintf.c (format_directive): Do not use
19932 space in between 'G_' and '('.
19934 2018-05-17 Jakub Jelinek <jakub@redhat.com>
19937 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
19938 even if the mask is not all ones.
19941 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
19943 (ix86_gimple_fold_builtin): Likewise.
19946 * config/i386/i386.c: Include tree-vector-builder.h.
19947 (ix86_vector_shift_count): New function.
19948 (ix86_fold_builtin): Fold shift builtins by scalar count.
19949 (ix86_gimple_fold_builtin): Likewise.
19951 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
19952 _mm512_setzero): New intrinsics.
19954 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
19955 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19957 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
19958 code generation for cases where splatting a value is not useful.
19959 * simplify-rtx.c (simplify_ternary_operation): Simplify
19960 vec_merge across a vec_duplicate and a paradoxical subreg forming
19961 a vector mode to a vec_concat.
19963 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
19965 * config.gcc: Support "goldmont-plus".
19966 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
19968 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
19969 PROCESSOR_GOLDMONT_PLUS.
19970 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
19971 (processor_target_table): Add "goldmont-plus".
19972 (PTA_GOLDMONT_PLUS): Define.
19973 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
19974 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
19975 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
19976 (fold_builtin_cpu): Add "goldmont-plus".
19977 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
19978 (ix86_option_override_internal): Add "goldmont-plus".
19979 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
19980 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
19981 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
19982 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
19984 2018-05-17 Richard Biener <rguenther@suse.de>
19986 PR tree-optimization/85757
19987 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
19988 remove defs that only feed that PHI from further processing.
19990 2018-05-16 Jim Wilson <jimw@sifive.com>
19992 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
19994 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
19996 2018-05-16 Mark Wielaard <mark@klomp.org>
19998 * dwarf2out.c (count_index_strings): New function.
19999 (output_indirect_strings): Call count_index_strings and generate
20000 header for dwarf_version >= 5.
20002 2018-05-16 Mark Wielaard <mark@klomp.org>
20004 * dwarf2out.c (dwarf_FORM): New function.
20005 (set_indirect_string): Use dwarf_FORM.
20006 (reset_indirect_string): Likewise.
20007 (size_of_die): Likewise.
20008 (value_format): Likewise.
20009 (output_die): Likewise.
20010 (add_skeleton_AT_string): Likewise.
20011 (output_macinfo_op): Likewise.
20012 (index_string): Likewise.
20013 (output_index_string_offset): Likewise.
20014 (output_index_string): Likewise.
20015 (count_index_strings): Likewise.
20017 2018-05-16 Carl Love <cel@us.ibm.com>
20019 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
20020 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
20022 2018-05-16 Martin Jambor <mjambor@suse.cz>
20024 * ipa-prop.c (ipa_free_all_edge_args): Remove.
20025 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
20027 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
20029 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
20030 (fnma<mode>4): Likewise.
20031 (fms<mode>4): Likewise.
20032 (fnms<mode>4): Likewise.
20033 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
20034 (aarch64_fnma<mode>4): Likewise.
20035 (aarch64_fms<mode>4): Likewise.
20036 (aarch64_fnms<mode>4): Likewise.
20037 (aarch64_fnmadd<mode>4): Likewise.
20039 2018-05-16 Jason Merrill <jason@redhat.com>
20041 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
20043 2018-05-16 Richard Biener <rguenther@suse.de>
20045 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
20046 (dump_stmt_cost): Declare.
20047 (add_stmt_cost): Dump cost we add.
20048 (add_stmt_costs): New function.
20049 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
20050 No longer exported.
20051 (vect_analyze_stmt): Adjust prototype.
20052 (vectorizable_condition): Likewise.
20053 (vectorizable_live_operation): Likewise.
20054 (vectorizable_reduction): Likewise.
20055 (vectorizable_induction): Likewise.
20056 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
20057 cost vector to pass to vectorizable_ and record afterwards.
20058 (vect_model_reduction_cost): Take cost vector argument and adjust.
20059 (vect_model_induction_cost): Likewise.
20060 (vectorizable_reduction): Likewise.
20061 (vectorizable_induction): Likewise.
20062 (vectorizable_live_operation): Likewise.
20063 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
20064 SLP_TREE_NUMBER_OF_VEC_STMTS.
20065 (vect_analyze_slp_cost_1): Remove.
20066 (vect_analyze_slp_cost): Likewise.
20067 (vect_slp_analyze_node_operations): Take visited args and
20068 a target cost vector. Avoid processing already visited stmt sets.
20069 (vect_slp_analyze_operations): Use a local cost vector to gather
20070 costs and register those of non-discarded instances.
20071 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
20072 (vect_schedule_slp_instance): Remove copying of
20073 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
20075 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
20076 adding cost. Record cost entry location.
20077 (vect_prologue_cost_for_slp_op): Function to compute cost of
20078 a constant or invariant generated for SLP vect in the prologue,
20079 split out from vect_analyze_slp_cost_1.
20080 (vect_model_simple_cost): Make static. Adjust for SLP costing.
20081 (vect_model_promotion_demotion_cost): Likewise.
20082 (vect_model_store_cost): Likewise, make static.
20083 (vect_model_load_cost): Likewise.
20084 (vectorizable_bswap): Add cost vector arg and adjust.
20085 (vectorizable_call): Likewise.
20086 (vectorizable_simd_clone_call): Likewise.
20087 (vectorizable_conversion): Likewise.
20088 (vectorizable_assignment): Likewise.
20089 (vectorizable_shift): Likewise.
20090 (vectorizable_operation): Likewise.
20091 (vectorizable_store): Likewise.
20092 (vectorizable_load): Likewise.
20093 (vectorizable_condition): Likewise.
20094 (vectorizable_comparison): Likewise.
20095 (can_vectorize_live_stmts): Likewise.
20096 (vect_analyze_stmt): Likewise.
20097 (vect_transform_stmt): Adjust calls to vectorizable_*.
20098 * tree-vectorizer.c: Include gimple-pretty-print.h.
20099 (dump_stmt_cost): New function.
20101 2018-05-16 Richard Biener <rguenther@suse.de>
20103 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
20104 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
20105 * tree-ssa-dse.c: Include tree-ssa-loop.h.
20106 (check_name): New callback.
20107 (dse_classify_store): Track cycles via a visited bitmap of PHI
20108 defs and simplify handling of in-loop and across loop dead stores
20109 and properly fail for loop-variant refs. Handle byte-tracking with
20110 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
20113 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
20115 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
20116 (vect_get_mask_type_for_stmt): Likewise.
20117 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
20119 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
20120 to determine the statement's vector type and the vector type that
20121 should be used for calculating nunits. Deal with cases in which
20122 the type has to be deferred.
20123 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
20124 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
20125 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
20126 (vect_determine_vf_for_stmt): New functions, split out from...
20127 (vect_determine_vectorization_factor): ...here.
20128 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
20129 (vect_get_mask_type_for_stmt): New functions, split out from
20130 vect_determine_vectorization_factor.
20132 2018-05-16 Richard Biener <rguenther@suse.de>
20134 * tree-cfg.c (verify_gimple_assign_ternary): Properly
20135 verify the [VEC_]COND_EXPR embedded comparison.
20137 2018-05-15 Martin Sebor <msebor@redhat.com>
20139 PR tree-optimization/85753
20140 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
20141 RECORD_TYPE in addition to ARRAY_TYPE.
20143 2018-05-15 Martin Sebor <msebor@redhat.com>
20145 PR middle-end/85643
20146 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
20148 2018-05-15 Richard Biener <rguenther@suse.de>
20150 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
20151 add by_clobber_p one. Change algorithm to collect all defs
20152 representing uses we need to walk and try reducing them to
20153 a single one before failing.
20154 (dse_dom_walker::dse_optimize_stmt): Adjust.
20156 2018-05-13 Mark Wielaard <mark@klomp.org>
20158 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
20159 (size_of_loc_descr): Likewise.
20160 (output_loc_operands): Likewise.
20161 (output_loc_operands_raw): Likewise.
20162 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
20163 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
20164 (hash_loc_operands): Likewise.
20165 (compare_loc_operands): Likewise.
20167 2018-05-14 Mark Wielaard <mark@klomp.org>
20169 * dwarf2out.c (count_index_addrs): New function.
20170 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
20172 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
20174 PR tree-optimization/83648
20175 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
20176 return value as malloc candidate.
20178 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
20181 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
20182 param as true in call to suggest_attribute.
20184 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
20186 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
20187 -mreadonly-in-sdata.
20189 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20191 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
20193 (aarch64_crypto_aesd_fused): Likewise.
20195 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
20197 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
20198 (movsi_aarch64): Likewise.
20199 (load_pairsi): Likewise.
20200 (load_pairdi): Likewise.
20201 (store_pairsi): Likewise.
20202 (store_pairdi): Likewise.
20203 (load_pairsf): Likewise.
20204 (load_pairdf): Likewise.
20205 (store_pairsf): Likewise.
20206 (store_pairdf): Likewise.
20207 (zero_extend): Likewise.
20208 (trunc): Swap alternatives.
20209 (fcvt_target): Add '?' to prefer w over r.
20211 2018-05-14 Jakub Jelinek <jakub@redhat.com>
20214 * config/i386/i386.md: Disallow non-commutative arithmetics in
20215 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
20216 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
20217 in the peephole2 before it.
20219 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
20221 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
20222 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
20223 (ix86_handle_option): Handle -mcldemote.
20224 * config.gcc: New header.
20225 * config/i386/cldemoteintrin.h: New file.
20226 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
20227 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
20229 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
20230 OPTION_MASK_ISA_CLDEMOTE.
20231 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
20232 (ix86_valid_target_attribute_inner_p): Ditto.
20233 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
20234 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
20235 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
20236 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
20237 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
20239 * config/i386/i386.opt: Add -mcldemote.
20240 * config/i386/x86intrin.h: New header.
20241 * doc/invoke.texi: Add -mcldemote.
20243 2018-05-14 Richard Biener <rguenther@suse.de>
20245 * doc/match-and-simplify.texi: Adjust :s documentation.
20247 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
20249 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
20250 intended memcpy size.
20251 (REORDER_45): Likewise.
20253 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
20255 * sort.cc: New file.
20256 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
20257 * vec.c (qsort_chk): Use gcc_qsort.
20258 * Makefile.in (OBJS-libcommon): Add sort.o.
20259 (build/sort.o): New target. Use it...
20260 (BUILD_RTL): ... here, and...
20261 (build/gencfn-macros): ... here, and...
20262 (build/genmatch): ... here.
20264 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
20265 Chung-Ju Wu <jasonwucj@gmail.com>
20267 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
20268 * config/nds32/nds32-graywolf.md: New file.
20269 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
20270 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
20272 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
20273 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
20274 * config/nds32/nds32.md (pipeline_model): Add graywolf.
20275 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
20276 * config/nds32/pipelines.md: Include n15 settings.
20278 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
20279 Chung-Ju Wu <jasonwucj@gmail.com>
20281 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
20282 * config/nds32/nds32-n13.md: New file.
20283 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
20284 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
20286 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
20287 * config/nds32/nds32.md (pipeline_model): Add n13.
20288 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
20289 * config/nds32/pipelines.md: Include n13 settings.
20291 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
20292 Chung-Ju Wu <jasonwucj@gmail.com>
20294 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
20295 * config/nds32/nds32-n10.md: New file.
20296 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
20297 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
20299 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
20300 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
20301 * config/nds32/nds32.md (pipeline_model): Add n10.
20302 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
20303 * config/nds32/pipelines.md: Include n10 settings.
20305 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
20306 Kito Cheng <kito.cheng@gmail.com>
20307 Chung-Ju Wu <jasonwucj@gmail.com>
20309 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
20310 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
20311 Add enum values for DSP extension instructions.
20312 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
20314 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
20315 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
20316 New code iterators.
20317 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
20318 * config/nds32/nds32-dspext.md: New file for DSP implementation.
20319 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
20320 * config/nds32/nds32-intrinsic.md: Likewise.
20321 * config/nds32/nds32_intrinsic.h: Likewise.
20322 * config/nds32/nds32-md-auxiliary.c: Likewise.
20323 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
20324 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
20325 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
20326 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
20327 * config/nds32/nds32-protos.h: New declarations for DSP extension.
20328 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
20329 TYPE_DMAC in switch statement.
20330 * config/nds32/nds32.c: New checking and implementation for DSP
20331 extension instructions.
20332 * config/nds32/nds32.h: Likewise.
20333 * config/nds32/nds32.md: Likewise.
20334 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
20335 * config/nds32/predicates.md: Implement new predicates for DSP
20338 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
20340 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
20341 Reformat alternatives and attributes so it is easier to identify
20342 which constraints/attributes go with which instruction.
20343 (mov<mode>_hardfloat32, FMOVE64): Likewise.
20344 (mov<mode>_softfloat32, FMOVE64): Likewise.
20345 (mov<mode>_hardfloat64, FMOVE64): Likewise.
20346 (mov<mode>_softfloat64, FMOVE64): Likewise.
20348 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
20350 * doc/extend.texi (PowerPC Built-in Functions): Rename this
20352 (Basic PowerPC Built-in Functions): The new name of the
20353 subsection previously known as "PowerPC Built-in Functions".
20354 (Basic PowerPC Built-in Functions Available on all Configurations):
20356 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
20357 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
20358 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
20359 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
20361 2018-05-11 Martin Jambor <mjambor@suse.cz>
20364 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
20367 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
20370 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
20372 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
20374 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
20375 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
20376 (ix86_handle_option): Handle -mwaitpkg.
20377 * config.gcc: New header.
20378 * config/i386/cpuid.h (bit_WAITPKG): New bit.
20379 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
20380 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
20382 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
20383 OPTION_MASK_ISA_WAITPKG.
20384 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
20385 (ix86_option_override_internal): Add PTA_WAITPKG.
20386 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
20387 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
20388 IX86_BUILTIN_TPAUSE.
20389 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
20390 __builtin_ia32_umwait and __builtin_ia32_tpause.
20391 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
20392 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
20393 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
20394 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
20395 UNSPECV_TPAUSE): New.
20396 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
20397 * config/i386/i386.opt: Add -mwaitpkg.
20398 * config/i386/waitpkgintrin.h: New file.
20399 * config/i386/x86intrin.h: New header.
20400 * doc/invoke.texi: Add -mwaitpkg.
20402 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
20405 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
20407 (cortex-m0): Use armv6s-m isa.
20408 (cortex-m0plus): Likewise.
20409 (cortex-m1): Likewise.
20410 (cortex-m0.small-multiply): Likewise.
20411 (cortex-m0plus.small-multiply): Likewise.
20412 (cortex-m1.small-multiply): Likewise.
20414 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
20415 Jakub Jelinek <jakub@redhat.com>
20417 PR tree-optimization/85692
20418 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
20419 source permute as well.
20421 2018-05-11 Martin Liska <mliska@suse.cz>
20424 * doc/extend.texi: Document LLVM style format for no_sanitize
20427 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
20429 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
20430 mode_supports_vsx_dform_quad to mode_supports_dq_form.
20431 (mode_supports_vsx_dform_quad): Likewise.
20432 (mode_supports_vmx_dform): Move these functions to be next to the
20433 other mode_supports functions.
20434 (mode_supports_dq_form): Likewise.
20435 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
20436 mode_supports_dq_form.
20437 (reg_offset_addressing_ok_p): Likewise.
20438 (offsettable_ok_by_alignment): Likewise.
20439 (rs6000_legitimate_offset_address_p): Likewise.
20440 (legitimate_lo_sum_address_p): Likewise.
20441 (rs6000_legitimize_address): Likewise.
20442 (rs6000_legitimize_reload_address): Likewise.
20443 (rs6000_secondary_reload_inner): Likewise.
20444 (rs6000_preferred_reload_class): Likewise.
20445 (rs6000_output_move_128bit): Likewise.
20447 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
20449 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
20450 Generate SImode target register for null target.
20451 <case IX86_BUILTIN_XGETBV>: Ditto.
20452 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
20453 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
20455 2018-05-10 Carl Love <cel@us.ibm.com>
20457 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
20458 dcbtt and dcbtstt if operands[2] is 0.
20460 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
20463 * config/i386/sse.md (usadv64qi): New expander.
20465 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
20467 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
20468 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
20469 -maltivec=be support.
20470 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
20471 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
20472 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
20473 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
20474 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
20475 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
20476 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
20477 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
20478 altivec_vsumsws): Adjust.
20479 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
20480 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
20481 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
20483 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
20484 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
20485 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
20486 (altivec_lve<VI_char>x): Delete expand.
20487 (*altivec_lve<VI_char>x_internal): Rename to...
20488 (altivec_lve<VI_char>x): ... this.
20489 (altivec_lvxl_<mode>): Delete expand.
20490 (*altivec_lvxl_<mode>_internal): Rename to ...
20491 (altivec_lvxl_<mode>): ... this.
20492 (altivec_stvxl_<mode>): Delete expand.
20493 (*altivec_stvxl_<mode>_internal): Rename to ...
20494 (altivec_stvxl_<mode>): ... this.
20495 (altivec_stve<VI_char>x): Delete expand.
20496 (*altivec_stve<VI_char>x_internal): Rename to ...
20497 (altivec_stve<VI_char>x): ... this.
20498 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
20499 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
20500 reduc_plus_scal_<mode>): Adjust.
20501 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
20503 (rs6000_cpu_cpp_builtins): Adjust.
20504 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
20505 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
20506 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
20507 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
20508 -maltivec=be support.
20509 (rs6000_split_vec_extract_var): Adjust.
20510 (rs6000_split_v4si_init): Adjust.
20511 (swap_selector_for_mode): Delete.
20512 (altivec_expand_lvx_be, altivec_expand_stvx_be,
20513 altivec_expand_stvex_be): Delete.
20514 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
20515 -maltivec=be support.
20516 (rs6000_gimple_fold_builtin): Ditto.
20517 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
20519 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
20520 (TARGET_DIRECT_MOVE_64BIT): Adjust.
20521 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
20522 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
20523 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
20524 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
20525 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
20526 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
20527 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
20528 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
20529 anonymous split): Adjust.
20530 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
20531 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
20533 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
20535 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
20536 when --with-gxx-include-dir is also specified.
20537 * configure: Regenerate.
20539 2018-05-09 Jim Wilson <jimw@sifive.com>
20542 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
20543 * config/riscv/t-withmultilib: New.
20544 * config/riscv/withmultilib.h: New.
20545 * doc/install.texi: Document RISC-V --with-multilib-list support.
20547 2018-05-09 Richard Biener <rguenther@suse.de>
20549 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
20551 (vect_bb_vectorization_profitable_p): Adjust. Compute
20552 actual scalar cost using the cost vector and the add_stmt_cost
20555 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
20557 PR rtl-optimization/85645
20558 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
20559 in the REG_CFA_REGISTER note for LR, don't leave it empty.
20561 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
20563 PR rtl-optimization/85645
20564 * shrink-wrap.c (spread_components): Return a boolean saying if
20565 anything was changed.
20566 (try_shrink_wrapping_separate): Iterate spread_components until
20567 nothing changes anymore.
20569 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
20571 PR rtl-optimization/85645
20572 * regrename.c (build_def_use): Also kill the chains that include the
20573 destination of a REG_CFA_REGISTER note.
20575 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
20577 PR rtl-optimization/85645
20578 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
20579 insn that has a REG_CFA_REGISTER note.
20581 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
20583 * cfgexpand.c (expand_clobber): New function.
20584 (expand_gimple_stmt_1): Use it.
20585 * tree-vect-stmts.c (vect_clobber_variable): New function,
20587 (vectorizable_simd_clone_call): ...here.
20588 (vectorizable_store): Emit a clobber either side of an
20589 IFN_STORE_LANES sequence.
20590 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
20592 2018-05-09 Tom de Vries <tom@codesourcery.com>
20595 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
20596 (define_insn "trap_if_false"): Add exit after trap.
20598 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
20600 PR rtl-optimization/85638
20601 * bb-reorder.c: Include common/common-target.h.
20602 (create_forwarder_block): New function extracted from...
20603 (fix_up_crossing_landing_pad): ...here. Rename into...
20604 (dw2_fix_up_crossing_landing_pad): ...this.
20605 (sjlj_fix_up_crossing_landing_pad): New function.
20606 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
20607 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
20608 from both partitions and exit the loop after one iteration.
20610 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
20613 * doc/extend.texi (PowerPC Built-in Functions): Rename this
20615 (Basic PowerPC Built-in Functions): The new name of the
20616 subsection previously known as "PowerPC Built-in Functions".
20617 (Basic PowerPC Built-in Functions Available on all Configurations):
20619 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
20621 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
20623 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
20625 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
20628 2018-05-08 Jim Wilson <jimw@sifive.com>
20630 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
20631 (LD_EMUL_SUFFIX): New.
20632 (LINK_SPEC): Use it.
20634 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
20636 * doc/extend.texi (PowerPC Built-in Functions): Rename this
20638 (Basic PowerPC Built-in Functions): The new name of the
20639 subsection previously known as "PowerPC Built-in Functions".
20640 (Basic PowerPC Built-in Functions Available on all Configurations):
20642 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
20644 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
20646 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
20648 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
20651 2018-05-08 Jakub Jelinek <jakub@redhat.com>
20654 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
20655 after cmpelim optimization.
20657 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
20659 * config.gcc: Support "goldmont".
20660 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
20661 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
20662 PROCESSOR_GOLDMONT.
20663 * config/i386/i386.c (m_GOLDMONT): Define.
20664 (processor_target_table): Add "goldmont".
20665 (PTA_GOLDMONT): Define.
20666 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
20667 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
20668 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
20669 (fold_builtin_cpu): Add "goldmont".
20670 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
20671 (ix86_option_override_internal): Add "goldmont".
20672 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
20673 (processor_type): Add PROCESSOR_GOLDMONT.
20674 * config/i386/i386.md: Add CPU "glm".
20675 * config/i386/glm.md: New file.
20676 * config/i386/x86-tune.def: Add m_GOLDMONT.
20677 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
20679 2018-05-08 Jakub Jelinek <jakub@redhat.com>
20682 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
20684 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
20685 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
20686 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
20689 * config/i386/i386.c (ix86_fold_builtin): Handle
20690 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
20693 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
20694 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
20696 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
20699 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
20700 (check_arch): Likewise.
20701 (check_fpu): Return the result rather than printing it.
20702 (end arch): Fix operator precedence.
20703 (end cpu): Likewise.
20704 (END): Print the result from check_fpu.
20706 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
20707 Alan Hayward <alan.hayward@arm.com>
20708 David Sherwood <david.sherwood@arm.com>
20710 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
20711 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
20712 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
20713 (*fcmuo<mode>_and): New patterns.
20715 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
20717 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
20718 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
20719 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
20720 (cmp_op, sve_imm_con): New code attributes.
20721 (SVE_COND_INT_CMP, imm_con): Delete.
20722 (cmp_op): Remove above unspecs from int attribute.
20723 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
20725 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
20726 comparison-specific unspecs.
20727 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
20728 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
20729 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
20730 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
20731 (*vec_fcm<cmp_op><mode>): Rename to...
20732 (*fcm<cmp_op><mode>): ...this and adjust likewise.
20733 (*vec_fcmuo<mode>): Rename to...
20734 (*fcmuo<mode>): ...this and adjust likewise.
20735 (*pred_fcm<cmp_op><mode>): New pattern.
20736 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
20737 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
20739 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
20741 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
20742 (aarch64_emit_sve_predicated_cond): New function.
20743 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
20744 (aarch64_emit_unspec_cond_or): Replace with...
20745 (aarch64_emit_sve_or_conds): ...this new function. Use
20746 aarch64_emit_sve_ptrue_op for the individual comparisons and
20747 aarch64_emit_binop to OR them together.
20748 (aarch64_emit_inverted_unspec_cond): Replace with...
20749 (aarch64_emit_sve_inverted_cond): ...this new function. Use
20750 aarch64_emit_sve_ptrue_op for the comparison and
20751 aarch64_emit_unop to invert the result.
20752 (aarch64_expand_sve_vec_cmp_float): Update after the above
20753 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
20755 2018-05-07 Nathan Sidwell <nathan@acm.org>
20757 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
20758 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
20759 (Backwards Compatibility): Likewise.
20761 2018-05-07 Luis Machado <luis.machado@linaro.org>
20765 2018-05-07 Luis Machado <luis.machado@linaro.org>
20767 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
20768 <prefetch_dynamic_strides>: New const bool field.
20769 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
20770 prefetch_dynamic_strides.
20771 (exynosm1_prefetch_tune): Likewise.
20772 (thunderxt88_prefetch_tune): Likewise.
20773 (thunderx_prefetch_tune): Likewise.
20774 (thunderx2t99_prefetch_tune): Likewise.
20775 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
20777 (aarch64_override_options_internal): Update to set
20778 PARAM_PREFETCH_DYNAMIC_STRIDES.
20779 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
20780 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
20781 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
20782 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
20783 prefetch-dynamic-strides setting.
20785 2018-05-07 Luis Machado <luis.machado@linaro.org>
20787 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
20788 <minimum_stride>: New const int field.
20789 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
20790 minimum_stride field.
20791 (exynosm1_prefetch_tune): Likewise.
20792 (thunderxt88_prefetch_tune): Likewise.
20793 (thunderx_prefetch_tune): Likewise.
20794 (thunderx2t99_prefetch_tune): Likewise.
20795 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
20796 (aarch64_override_options_internal): Update to set
20797 PARAM_PREFETCH_MINIMUM_STRIDE.
20798 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
20799 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
20800 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
20801 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
20802 stride is constant and is below the minimum stride threshold.
20804 2018-05-07 Luis Machado <luis.machado@linaro.org>
20806 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
20809 2018-05-07 Luis Machado <luis.machado@linaro.org>
20811 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
20812 <prefetch_dynamic_strides>: New const bool field.
20813 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
20814 prefetch_dynamic_strides.
20815 (exynosm1_prefetch_tune): Likewise.
20816 (thunderxt88_prefetch_tune): Likewise.
20817 (thunderx_prefetch_tune): Likewise.
20818 (thunderx2t99_prefetch_tune): Likewise.
20819 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
20821 (aarch64_override_options_internal): Update to set
20822 PARAM_PREFETCH_DYNAMIC_STRIDES.
20823 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
20824 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
20825 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
20826 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
20827 prefetch-dynamic-strides setting.
20829 2018-05-07 Luis Machado <luis.machado@linaro.org>
20831 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
20832 <minimum_stride>: New const int field.
20833 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
20834 minimum_stride field.
20835 (exynosm1_prefetch_tune): Likewise.
20836 (thunderxt88_prefetch_tune): Likewise.
20837 (thunderx_prefetch_tune): Likewise.
20838 (thunderx2t99_prefetch_tune): Likewise.
20839 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
20840 (aarch64_override_options_internal): Update to set
20841 PARAM_PREFETCH_MINIMUM_STRIDE.
20842 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
20843 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
20844 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
20845 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
20846 stride is constant and is below the minimum stride threshold.
20848 2018-05-06 Jakub Jelinek <jakub@redhat.com>
20851 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
20852 the type is addressable. Don't force op into register if it has
20855 2018-05-05 Roland McGrath <mcgrathr@google.com>
20858 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
20859 any section for which we don't know a specific type it should have,
20860 regardless of name. Previously this was done only for the exact
20861 names ".init_array", ".fini_array", and ".preinit_array".
20862 (default_elf_asm_named_section): Add comment about
20863 relationship with default_section_type_flags and SECTION_NOTYPE.
20864 (get_section): Don't consider it a type conflict if one side has
20865 SECTION_NOTYPE and the other doesn't, as long as neither has the
20866 SECTION_BSS et al used in the default_section_type_flags logic.
20868 2018-05-05 Tom de Vries <tom@codesourcery.com>
20871 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
20872 (workaround_barsyncs): New function.
20873 (nvptx_reorg): Use workaround_barsyncs.
20874 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
20875 (define_expand "nvptx_membar_cta"): New define_expand.
20876 (define_insn "*nvptx_membar_cta"): New insn.
20878 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
20880 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
20881 To improve optimization opportunities.
20882 * builtin-types.def: The new needed builtin types for the above.
20884 2018-05-04 Richard Biener <rguenther@suse.de>
20886 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
20887 * gimple-ssa-store-merging.c
20888 (imm_store_chain_info::output_merged_store): Remove redundant create,
20889 release split_store vector contents on failure.
20890 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
20891 scalar stmt vector on cache hit.
20893 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
20895 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
20897 * config.gcc (powerpc-xilinx-eabi*): Remove.
20898 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
20900 (fusion_addis_mem_combo_load): Ditto.
20901 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
20903 (rs6000_cpu_cpp_builtins): Ditto.
20904 * config/rs6000/rs6000-linux.c
20905 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
20906 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
20907 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
20909 (rs6000_setup_reg_addr_masks): Ditto.
20910 (rs6000_init_hard_regno_mode_ok): Ditto.
20911 (rs6000_option_override_internal): Ditto.
20912 (legitimate_lo_sum_address_p): Ditto.
20913 (rs6000_legitimize_address): Ditto.
20914 (rs6000_legitimize_reload_address): Ditto.
20915 (rs6000_legitimate_address_p): Ditto.
20916 (abi_v4_pass_in_fpr): Ditto.
20917 (setup_incoming_varargs): Ditto.
20918 (rs6000_gimplify_va_arg): Ditto.
20919 (rs6000_split_multireg_move): Ditto.
20920 (rs6000_savres_strategy): Ditto.
20921 (rs6000_emit_prologue_components): Ditto.
20922 (rs6000_emit_epilogue_components): Ditto.
20923 (rs6000_emit_prologue): Ditto.
20924 (rs6000_emit_epilogue): Ditto.
20925 (rs6000_elf_file_end): Ditto.
20926 (rs6000_function_value): Ditto.
20927 (rs6000_libcall_value): Ditto.
20928 * config/rs6000/rs6000.h: Ditto.
20929 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
20930 (TARGET_MINMAX): ... this. New.
20931 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
20932 * config/rs6000/rs6000.md: Remove Xilinx FP support.
20933 (*movsi_internal1_single): Delete.
20934 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
20935 mfpu=, mxilinx-fpu): Delete.
20936 * config/rs6000/singlefp.h: Delete.
20937 * config/rs6000/sysv4.h: Remove Xilinx FP support.
20938 * config/rs6000/t-rs6000: Ditto.
20939 * config/rs6000/t-xilinx: Delete.
20940 * config/rs6000/titan.md: Adjust for fp_type removal.
20941 * config/rs6000/vsx.md: Remove Xilinx FP support.
20942 (VStype_simple): Delete.
20943 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
20944 * config/rs6000/xfpu.h: Delete.
20945 * config/rs6000/xfpu.md: Delete.
20946 * config/rs6000/xilinx.h: Delete.
20947 * config/rs6000/xilinx.opt: Delete.
20948 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
20949 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
20951 2018-05-04 Tom de Vries <tom@codesourcery.com>
20954 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
20957 2018-05-04 Richard Biener <rguenther@suse.de>
20959 PR middle-end/85627
20960 * tree-complex.c (update_complex_assignment): We are always in SSA form.
20961 (expand_complex_div_wide): Likewise.
20962 (expand_complex_operations_1): Likewise.
20963 (expand_complex_libcall): Preserve EH info of the original stmt.
20964 (tree_lower_complex): Handle removed blocks.
20965 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
20966 on complex multiplication and division libcall builtins.
20968 2018-05-04 Richard Biener <rguenther@suse.de>
20970 PR middle-end/85574
20971 * fold-const.c (negate_expr_p): Restrict negation of operand
20972 zero of a division to when we know that can happen without
20974 (fold_negate_expr_1): Likewise.
20976 2018-05-04 Jakub Jelinek <jakub@redhat.com>
20979 * real.h (real_nextafter): Declare.
20980 * real.c (real_nextafter): New function.
20981 * fold-const-call.c (fold_const_nextafter): New function.
20982 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
20983 CASE_CFN_NEXTTOWARD.
20984 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
20985 even when arg1_mode is different from arg0_mode.
20987 2018-05-03 Nathan Sidwell <nathan@acm.org>
20989 * doc/extend.texi (Deprecated Features): Remove
20990 -ffriend-injection.
20991 (Backwards Compatibility): Likewise.
20992 * doc/invoke.texi (C++ Language Options): Likewise.
20993 (C++ Dialect Options): Likewise.
20995 2018-05-03 Jakub Jelinek <jakub@redhat.com>
20998 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
20999 _mm512_mask_mullox_epi64): New intrinsics.
21001 2018-05-03 Tom de Vries <tom@codesourcery.com>
21004 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
21005 dump files): Add offload-tree.
21007 2018-05-03 Richard Biener <rguenther@suse.de>
21009 PR tree-optimization/85615
21010 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
21011 to loops not nested in BBs loop father to avoid creating multi-entry
21014 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21016 PR tree-optimization/70291
21017 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
21018 arguments. Change return type to tree. Emit libcall as a new
21019 statement rather than replacing existing one when inplace_p is true.
21020 (expand_complex_multiplication_components): New function.
21021 (expand_complex_multiplication): Expand floating-point complex
21022 multiplication using the above.
21023 (expand_complex_division): Rename inner_type parameter to type.
21024 Update expand_complex_libcall call-site.
21025 (expand_complex_operations_1): Update expand_complex_multiplication
21026 and expand_complex_division call-sites.
21028 2018-05-02 Jakub Jelinek <jakub@redhat.com>
21031 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
21032 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
21033 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
21034 the highest significant bit of the shift count mask is clear. In
21035 check whether and[sq]i3 is needed verify that all significant bits
21036 of the shift count other than the highest are set.
21038 2018-05-02 Tom de Vries <tom@codesourcery.com>
21041 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
21042 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
21043 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
21044 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
21045 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
21046 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
21047 __builtin_goacc_parlevel_size.
21049 2018-05-02 Richard Biener <rguenther@suse.de>
21051 PR tree-optimization/85597
21052 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
21053 do not use split vect_get_vec_defs call but call vect_get_slp_defs
21056 2018-05-02 Tom de Vries <tom@codesourcery.com>
21059 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
21060 dump files): Add ltrans-tree.
21062 2018-05-02 Tom de Vries <tom@codesourcery.com>
21065 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
21066 dump files): Add wpa-ipa.
21068 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
21070 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
21071 powerpc*-*-linux*paired* target.
21072 * config/rs6000/750cl.h: Delete.
21073 * config/rs6000/paired.h: Delete.
21074 * config/rs6000/paired.md: Delete.
21075 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
21077 * config/rs6000/rs6000-builtin.def: Remove paired float support.
21078 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
21079 comment. Remove paired float support.
21080 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
21081 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
21083 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
21084 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
21086 * config/rs6000/rs6000.c: Remove paired float support.
21087 (paired_expand_vector_init, paired_expand_vector_move,
21088 paired_emit_vector_compare, paired_emit_vector_cond_expr,
21089 (paired_expand_lv_builtin, paired_expand_stv_builtin,
21090 paired_expand_builtin, paired_expand_predicate_builtin,
21091 paired_init_builtins): Delete.
21092 * config/rs6000/rs6000.h: Remove paired float support.
21093 * config/rs6000/rs6000.md: Remove paired float support.
21094 (move_from_CR_ov_bit): Delete.
21095 * config/rs6000/rs6000.opt (mpaired): Delete.
21096 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
21097 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
21099 2018-05-02 Richard Biener <rguenther@suse.de>
21101 PR middle-end/85567
21102 * gimplify.c (gimplify_save_expr): When in SSA form allow
21103 SAVE_EXPRs to compute to SSA vars.
21105 2018-05-02 Jakub Jelinek <jakub@redhat.com>
21108 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
21109 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
21110 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
21111 clobber operands[2], instead use a new pseudo. Formatting fixes.
21113 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
21115 PR tree-optimization/85586
21116 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
21117 exit early for statements in the same group if the accesses are
21120 2018-05-02 Tom de Vries <tom@codesourcery.com>
21123 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
21126 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
21128 PR tree-optimization/85143
21129 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
21131 2018-05-01 Tom de Vries <tom@codesourcery.com>
21134 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
21135 not found" error message.
21137 2018-05-01 Tom de Vries <tom@codesourcery.com>
21140 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
21141 * vec.c (test_ordered_remove_if): New function.
21142 (vec_c_tests): Call test_ordered_remove_if.
21143 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
21144 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
21145 * tree-vect-patterns.c (vect_pattern_recog_1): Use
21146 VEC_ORDERED_REMOVE_IF.
21148 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
21150 PR tree-optimization/82665
21151 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
21152 pointer subtraction where arguments come from a memchr call.
21154 2018-05-01 Jakub Jelinek <jakub@redhat.com>
21156 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
21157 --push-state --as-needed and --pop-state instead of --as-needed and
21158 --no-as-needed if ld supports it.
21159 * configure: Regenerated.
21162 * doc/install.texi2html: Replace _002d with - and _002a with * in
21163 generated html files using sed.
21165 2018-04-30 David Malcolm <dmalcolm@redhat.com>
21168 * gcc-rich-location.c (blank_line_before_p): New function.
21169 (use_new_line): New function.
21170 (gcc_rich_location::add_fixit_insert_formatted): New function.
21171 * gcc-rich-location.h
21172 (gcc_rich_location::add_fixit_insert_formatted): New function.
21174 2018-04-30 David Malcolm <dmalcolm@redhat.com>
21176 * selftest.c (assert_streq): Rename "expected" and "actual" to
21177 "val1" and "val2". Extend NULL-handling to cover both inputs
21178 symmetrically, while still requiring both to be non-NULL for a pass.
21179 * selftest.h (assert_streq): Rename "expected" and "actual" to
21181 (ASSERT_EQ): Likewise.
21182 (ASSERT_EQ_AT): Likewise.
21183 (ASSERT_KNOWN_EQ): Likewise.
21184 (ASSERT_KNOWN_EQ_AT): Likewise.
21185 (ASSERT_NE): Likewise.
21186 (ASSERT_MAYBE_NE): Likewise.
21187 (ASSERT_MAYBE_NE_AT): Likewise.
21188 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
21189 the assertion to pass.
21190 (ASSERT_STREQ_AT): Likewise.
21192 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
21194 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
21195 interaction with -pie.
21197 2018-04-30 David Malcolm <dmalcolm@redhat.com>
21199 * selftest.h: Fix alphabetization of per-source-file selftest
21202 2018-04-30 Jason Merrill <jason@redhat.com>
21204 PR c++/61982 - dead stores to destroyed objects.
21205 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
21208 2018-04-30 Jason Merrill <jason@redhat.com>
21210 * tree.c (build_clobber): New.
21211 * tree.h: Declare it.
21212 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
21214 2018-04-30 David Malcolm <dmalcolm@redhat.com>
21216 * diagnostic-show-locus.c (layout::layout): Update for
21217 location_get_source_line returning a char_span.
21218 (struct char_span): Move to input.h.
21219 (struct correction): Update for fields in char_span becoming
21221 (struct source_line): Update for location_get_source_line
21222 returning a char_span.
21223 (layout::print_line): Likewise.
21224 * edit-context.c (edited_file::print_content): Likewise.
21225 (edited_file::print_diff_hunk): Likewise.
21226 (edited_file::print_run_of_changed_lines): Likewise.
21227 (edited_file::get_num_lines): Likewise.
21228 (edited_line::edited_line): Likewise.
21229 * final.c (asm_show_source): Likewise.
21230 * input.c (location_get_source_line): Convert return type
21231 from const char * to char_span, losing the final "line_len"
21233 (dump_location_info): Update for the above.
21234 (get_substring_ranges_for_loc): Likewise. Use a char_span
21235 when handling the literal within the line.
21236 (test_reading_source_line): Update for location_get_source_line
21237 returning a char_span.
21238 * input.h (class char_span): Move here from
21239 diagnostic-show-locus.c, converting from a struct to a class.
21240 Make data members private.
21241 (char_span::operator bool): New.
21242 (char_span::length): New.
21243 (char_span::get_buffer): New.
21244 (char_span::operator[]): New.
21245 (char_span::subspan): Make const.
21246 (char_span::xstrdup): New.
21247 (location_get_source_line): Convert return type from const char *
21248 to char_span, losing the final "line_size" param.
21250 2018-04-30 Jan Hubicka <jh@suse.cz>
21252 * lto-wrapper.c (ltrans_priorities): New static var.
21253 (cmp_priority): New.
21254 (run_gcc): Read priorities and if doing parallel build order
21255 the Makefile by them.
21257 2018-04-30 David Malcolm <dmalcolm@redhat.com>
21259 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
21261 2018-04-30 Richard Biener <rguenther@suse.de>
21263 * tree-cfg.c (verify_address): Remove base argument, add
21264 flag whether to check TREE_ADDRESSABLE and do that.
21265 (verify_expr): Remove.
21266 (verify_types_in_gimple_reference): Add pieces from verify_expr.
21267 (verify_gimple_assign_single): Likewise.
21268 (verify_gimple_switch): Likewise.
21269 (verify_expr_location_1): Dereference tp once. Add (disabled)
21270 piece from verify_expr.
21271 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
21273 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
21275 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
21277 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
21279 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
21280 (small_data_pattern): Likewise.
21281 (arc_rewrite_small_data): Likewise.
21282 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
21283 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
21284 (get_symbol_alignment): New function.
21285 (legitimate_small_data_address_p): Likewise.
21286 (legitimate_scaled_address): Update, call
21287 legitimate_small_data_address_p.
21288 (output_sdata): New static variable.
21289 (arc_print_operand): Update how we handle small data operands.
21290 (arc_print_operand_address): Likewise.
21291 (arc_legitimate_address_p): Update, use
21292 legitimate_small_data_address_p.
21293 (arc_rewrite_small_data_p): Remove.
21294 (arc_rewrite_small_data_1): Likewise.
21295 (arc_rewrite_small_data): Likewise.
21296 (small_data_pattern): Likewise.
21297 (compact_sda_memory_operand): Update to use
21298 legitimate_small_data_address_p and get_symbol_alignment.
21299 (prepare_move_operands): Don't rewite sdata pattern.
21300 (prepare_extend_operands): Remove.
21301 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
21303 (zero_extendqisi2): Likewise.
21304 (zero_extendhisi2): Likewise.
21305 (extendqihi2): Likewise.
21306 (extendqisi2): Likewise.
21307 (extendhisi2): Likewise.
21308 (addsi3): Likewise.
21309 (subsi3): Likewise.
21310 (andsi3): Likewise.
21311 * config/arc/constraints.md (Usd): Change it to memory constraint.
21313 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
21315 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
21316 as source of std instructions.
21317 * config/arc/arc.md (movsi_insn): Update pattern predicate to
21318 allow 6-bit constants as source for store instructions.
21319 (movdi_insn): Update instruction pattern to allow 6-bit constants
21320 as source for store instructions.
21322 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
21324 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
21326 2018-04-30 Nathan Sidwell <nathan@acm.org>
21327 Sandra Loosemore <sandra@codesourcery.com>
21329 * dumpfile.c (dump_open): Allow '-' for stdout.
21330 * doc/invoke.texi (Developer Options): Document dump filename
21331 determination early. Document stdin/stdout selection.
21333 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
21335 Microblaze Target: PIC data text relative
21337 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
21338 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
21340 * config/microblaze/microblaze.h (microblaze_constant_address_p):
21341 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
21342 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
21343 New addressing mode for data-text relative position indepenedent code.
21344 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
21345 'ADDRESS_SYMBOLIC_TXT_REL'.
21346 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
21347 (microblaze_legitimate_pic_operand): Exclude function calls from
21348 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
21349 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
21351 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
21352 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
21353 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
21354 for 'address + offset'.
21355 (microblaze_expand_prologue): Add new function prologue call for
21357 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
21358 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
21359 table in case of TARGET_PIC_DATA_TEXT_REL.
21360 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
21361 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
21362 Add new macros 'UNSPEC_TEXT',
21363 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
21364 + exclude function calls from 'UNSPEC_PLT' in case of data text
21366 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
21367 new target hook for generating address diff vector tables in case of
21369 * doc/tm.texi : Regenerate.
21370 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
21371 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
21372 of addr diff vector generation.
21373 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
21374 target hook definition.
21375 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
21376 Add default function for generate_pic_addr_diff_vec -> flag_pic.
21377 * doc/invoke.texi (Add new pic option): Add new microblaze pic
21378 option for data text relative.
21380 2018-04-30 Richard Biener <rguenther@suse.de>
21382 * tree-chrec.h (evolution_function_is_constant_p): Remove
21384 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
21386 2018-04-30 Richard Biener <rguenther@suse.de>
21389 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
21391 2018-04-30 Richard Biener <rguenther@suse.de>
21393 PR tree-optimization/28364
21394 PR tree-optimization/85275
21395 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
21396 copying first exit test.
21398 2018-04-28 Mark Wielaard <mark@klomp.org>
21400 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
21401 dwarf_version >= 5.
21402 (dwarf_AT): Handle DW_AT_addr_base.
21403 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
21405 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
21408 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
21409 (*ashl<dwi>3_doubleword_mask_1): Ditto.
21410 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
21411 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
21413 2018-04-28 Richard Biener <rguenther@suse.de>
21415 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
21416 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
21417 to reflect use. Only add interesting stmts.
21419 2018-04-27 Martin Jambor <mjambor@suse.cz>
21422 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
21423 the jump function allows for passing through aggregate values.
21425 2018-04-27 David Malcolm <dmalcolm@redhat.com>
21427 * input.h (in_system_header_at): Convert from macro to inline
21429 (from_macro_expansion_at): Likewise.
21430 (from_macro_definition_at): Likewise.
21432 2018-04-27 Jeff Law <law@redhat.com>
21434 * config.gcc: Mark tile* targets as deprecated/obsolete.
21436 2018-04-27 Richard Biener <rguenther@suse.de>
21438 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
21441 2018-04-27 Richard Biener <rguenther@suse.de>
21443 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
21445 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
21447 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
21448 with Yd constraint. Set "preferred_for_speed" attribute from
21449 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
21450 with Yd constraint.
21451 (*movdi_internal): Ditto.
21452 (movti_interunit splitters): Remove
21453 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
21454 (movdi_interunit splitters): Ditto.
21455 * config/i386/constraints.md (Ye): Remove.
21456 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
21458 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21461 * config/aarch64/constraints.md (Usg): Limit to 31.
21462 (Usj): Limit to 63.
21464 2018-04-27 Jakub Jelinek <jakub@redhat.com>
21466 PR tree-optimization/85529
21467 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
21468 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
21469 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
21470 zero extension or masking of the MSB bit.
21471 (optimize_range_tests): Add FIRST_BB argument, pass it through
21472 to optimize_range_tests_var_bound.
21473 (maybe_optimize_range_tests, reassociate_bb): Adjust
21474 optimize_range_tests callers.
21476 2018-04-26 Richard Biener <rguenther@suse.de>
21477 Jakub Jelinek <jakub@redhat.com>
21479 * cgraph.h (symbol_table): Just declare debug method here.
21480 * symtab.c (symbol_table::debug): Define.
21482 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
21484 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
21486 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
21488 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
21489 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
21490 (*movdi_internal): Substitute Yi and Yj constraint with x
21491 and Ym and Yn constraint with y constraint. Update "isa"
21492 attribute and set "preferred_for_speed" attribute from
21493 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
21494 (*movsi_internal): Ditto.
21495 (*movdf_internal): Ditto.
21496 (*movsf_internal): Ditto.
21497 (*zero_extendsidi2): Ditto.
21498 * config/i386/sse.md (vec_set<mode>_0): Ditto.
21499 (sse2_loadld): Ditto.
21500 (*vec_extract<ssevecmodelower>_0): Ditto.
21501 (*vec_extractv4si_0_zext_sse4): Ditto.
21502 (vec_concatv2di): Ditto.
21503 (*vec_dup<mode>): Ditto.
21504 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
21505 * config/i386/constraints.md (Yi): Remove.
21510 2018-04-26 Nathan Sidwell <nathan@acm.org>
21512 * dumpfile.c (dump_open): New.
21513 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
21514 (dump_finish): Detect stdio/stderr by value not name.
21516 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
21518 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
21520 2018-04-26 Tom de Vries <tom@codesourcery.com>
21523 * config/nvptx/nvptx.c (verify_neutering_jumps)
21524 (verify_neutering_labels): New function
21525 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
21527 2018-04-26 Tom de Vries <tom@codesourcery.com>
21530 * config/nvptx/nvptx.c (needs_neutering_p): New function.
21531 (nvptx_single): Use needs_neutering_p to skip over insns that do not
21534 2018-04-26 Richard Biener <rguenther@suse.de>
21535 Tom de Vries <tom@codesourcery.com>
21538 * lto-streamer-out.c (output_function): Fixup loops if required to match
21539 discovery done in the reader.
21541 2018-04-26 Richard Biener <rguenther@suse.de>
21543 PR tree-optimization/85116
21544 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
21545 have a loop exit from the single latch predecessor. Remove
21546 case of header with just condition.
21547 (ch_base::copy_headers): Exclude infinite loops from any
21549 (pass_ch::execute): Record exits.
21551 2018-04-26 Richard Biener <rguenther@suse.de>
21553 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
21554 prologue cost vector and pass it to vect_get_load_cost.
21555 (vect_get_peeling_costs_all_drs): Likewise.
21556 (vect_peeling_hash_get_lowest_cost): Likewise.
21557 (vect_enhance_data_refs_alignment): Likewise.
21559 2018-04-26 Richard Biener <rguenther@suse.de>
21561 PR middle-end/85450
21562 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
21563 checking of integer<->pointer conversions.
21564 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
21565 sign-/zero-extending pointer types.
21566 (expand_omp_for_static_chunk): Likewise.
21568 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
21569 Jean Lee <xiaoyur347@gmail.com>
21571 * config/mips/mips.c (mips_asan_shadow_offset): New function.
21572 (TARGET_ASAN_SHADOW_OFFSET): Define.
21573 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
21574 true for -fsanitize=address.
21576 2018-04-25 Mark Wielaard <mark@klomp.org>
21578 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
21581 2018-04-25 Jakub Jelinek <jakub@redhat.com>
21583 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
21584 than "alu", remove explicit "memory" and "imm_disp" attributes.
21585 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
21587 PR middle-end/85414
21588 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
21589 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
21590 gen_lowpart_no_emit.
21592 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
21595 * config/i386/i386.c (ix86_expand_builtin): Change memory
21596 operand to XI, extend p0 to Pmode.
21597 * config/i386/i386.md: Change unspec volatile and operand
21598 1 mode to XI, change operand 0 mode to P.
21600 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
21602 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
21603 GET_MODE_MASK before any checking.
21604 (nds32_can_use_bset_p): Likewise.
21605 (nds32_can_use_btgl_p): Likewise.
21607 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
21609 * config/nds32/nds32-doubleword.md: New define_split pattern for
21610 illegal register number.
21612 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
21614 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
21616 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
21618 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
21620 2018-04-25 Richard Biener <rguenther@suse.de>
21622 * lto-streamer.h (LTO_major_version): Bump to 8.
21624 2018-04-25 Jakub Jelinek <jakub@redhat.com>
21626 * BASE-VER: Set to 9.0.0.
21628 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
21630 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
21631 in __abskf2 and __powikf2.
21633 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21636 * config/aarch64/constraints.md (Usg, Usj): New constraints.
21637 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
21638 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
21639 Use the above on operand 2. Reindent.
21640 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
21642 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
21645 * common/config/i386/i386-common.c (ix86_handle_option): Don't
21647 * config/i386/i386.opt (mcet): Removed.
21648 * doc/install.texi: Remove -mcet documentation.
21649 * doc/invoke.texi: Likewise.
21651 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
21654 * doc/install.texi: Remove -mcet from bootstrap-cet.
21656 2018-04-24 Jakub Jelinek <jakub@redhat.com>
21659 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
21660 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
21664 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
21665 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
21666 containing a CONST_VECTOR.
21668 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
21670 * doc/install.texi: Update newlib dependency for nvptx.
21672 2018-04-24 Jakub Jelinek <jakub@redhat.com>
21675 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
21676 instead of INTVAL when shifting x left.
21678 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
21680 PR tree-optimization/85478
21681 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
21682 vect_grouped_store_supported for single element vectors.
21684 2018-04-24 Richard Biener <rguenther@suse.de>
21687 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
21688 load cost increase to the case of non-constant step.
21690 2018-04-24 Jakub Jelinek <jakub@redhat.com>
21693 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
21694 destination if any_malformed_asm.
21696 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
21698 PR middle-end/85496
21699 * expr.c (store_field): In the bitfield case, if the value comes from
21700 a function call and is returned in registers by means of a PARALLEL,
21701 do not change the mode of the temporary unless BLKmode and VOIDmode.
21703 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
21705 PR rtl-optimization/85423
21706 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
21707 dependencies to debug insns when the previous insn is non-debug.
21709 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
21711 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
21712 enums into a single definition.
21713 (fls): Fix predicates and printing.
21716 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
21718 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
21719 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
21720 and short u6 immediate.
21721 (check_if_valid_sleep_operand): Remove.
21722 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
21724 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
21726 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
21727 flag_always_save_lp condition.
21728 * config/nds32/nds32.opt (malways-save-lp): New option.
21730 2018-04-22 Shiva Chen <shiva0217@gmail.com>
21732 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
21733 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
21734 * config/nds32/nds32.h
21735 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
21736 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
21738 2018-04-22 Shiva Chen <shiva0217@gmail.com>
21740 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
21741 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
21743 2018-04-22 Shiva Chen <shiva0217@gmail.com>
21744 Chung-Ju Wu <jasonwucj@gmail.com>
21746 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
21748 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
21749 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
21751 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
21753 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
21755 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
21757 * config/nds32/nds32-protos.h (nds32_data_alignment,
21758 nds32_local_alignment): Declare.
21759 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
21760 nds32_local_alignment): New functions.
21761 (TARGET_CONSTANT_ALIGNMENT): Define.
21762 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
21764 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
21766 * config/nds32/nds32.c
21767 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
21768 (TARGET_MODES_TIEABLE_P): Likewise.
21770 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
21772 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
21773 level Ofast and Og.
21775 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
21776 Chung-Ju Wu <jasonwucj@gmail.com>
21778 * config/nds32/constants.md (unspec_volatile_element): Add enum values
21779 for unaligned access.
21780 * config/nds32/nds32-intrinsic.c: Implementation of expanding
21782 * config/nds32/nds32-intrinsic.md: Likewise.
21783 * config/nds32/nds32_intrinsic.h: Likewise.
21784 * config/nds32/nds32.h (nds32_builtins): Likewise.
21785 * config/nds32/nds32.opt (munaligned-access): New option.
21786 * config/nds32/nds32.c (nds32_asm_file_start): Display
21787 flag_unaligned_access status.
21789 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
21791 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
21792 -mno-relax is present.
21793 * config/riscv/linux.h (LINK_SPEC): Ditto.
21795 2018-04-20 Martin Sebor <msebor@redhat.com>
21798 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
21800 (gimple_fold_builtin_stxcpy_chk): Same.
21801 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
21803 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
21806 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
21807 __powikf2 when long double is IEEE 128-bit.
21809 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
21811 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
21812 step to make sure stack always aligned.
21814 2018-04-20 Carl Love <cel@us.ibm.com>
21817 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
21818 size check for arg0.
21820 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
21821 Tom de Vries <tom@codesourcery.com>
21824 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
21825 Emit insns for calls too.
21826 (nvptx_find_par): Always look for worker-level predecessor insn.
21827 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
21829 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
21830 (nvptx_process_pars): Propagate frames for calls.
21832 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
21835 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
21837 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
21838 (ix86_handle_option): Don't handle OPT_mibt.
21839 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
21841 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
21843 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
21844 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
21845 (ix86_target_macros): Define __CET__ with flag_cf_protection
21846 for -fcf-protection.
21847 * config/i386/i386.c (isa2_opts): Remove -mibt.
21848 * config/i386/i386.h (TARGET_IBT): Removed.
21849 (TARGET_IBT_P): Likewise.
21850 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
21851 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
21852 * config/i386/i386.opt (mcet): Update help message.
21853 (mshstk): Likewise.
21855 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
21856 -mcet as an alias for -mshstk.
21858 2018-04-20 Richard Biener <rguenther@suse.de>
21860 PR middle-end/85475
21861 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
21862 complexity by forcing a single use of the multiply operand.
21864 2018-04-20 Martin Jambor <mjambor@suse.cz>
21867 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
21868 recursion dependency to only apply to non-clones.
21870 2018-04-20 Martin Jambor <mjambor@suse.cz>
21873 * ipa-cp.c (create_specialized_node): Check that clones of
21874 self-recursive edges exist during IPA-CP.
21876 2018-04-19 Toon Moene <toon@moene.org>
21878 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
21881 2018-04-19 Jakub Jelinek <jakub@redhat.com>
21883 PR tree-optimization/85467
21884 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
21885 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
21886 VECTOR_CST element to type.
21888 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
21891 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
21892 * config/i386/i386.md (builtin_setjmp_setup): Removed.
21893 (builtin_longjmp): Likewise.
21894 (save_stack_nonlocal): New pattern.
21895 (restore_stack_nonlocal): Likewise.
21897 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
21900 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
21901 Replace ASM_OUTPUT_LABEL with fprintf.
21903 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
21906 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
21907 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
21908 * config/i386/i386-c.c (ix86_target_macros_internal): Also
21909 define __IBT__ and __SHSTK__ for -fcf-protection.
21910 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
21912 (ix86_trampoline_init): Likewise.
21913 (x86_output_mi_thunk): Likewise.
21914 (ix86_notrack_prefixed_insn_p): Likewise.
21915 (ix86_option_override_internal): Don't disallow -fcf-protection.
21916 * config/i386/i386.md (rdssp<mode>): Also enable for
21918 (incssp<mode>): Likewise.
21919 (nop_endbr): Likewise.
21920 * config/i386/i386.opt (mcet): Change help message to built-in
21923 (mshstk): Likewise.
21924 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
21925 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
21926 enable CET built-in functions.
21928 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
21930 * common/config/i386/i386-common.c
21931 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
21932 OPTION_MASK_ISA_MOVDIRI_UNSET,
21933 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
21934 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
21935 * config.gcc (movdirintrin.h): New header.
21936 * config/i386/cpuid.h (bit_MOVDIRI,
21937 bit_MOVDIR64B): New bits.
21938 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
21940 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
21941 (VOID, PVOID, PCVOID)): New function types.
21942 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
21943 __builtin_ia32_directstoreu_u64,
21944 __builtin_ia32_movdir64b): New builtins.
21945 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
21946 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
21948 (ix86_valid_target_attribute_inner_p): Ditto.
21949 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
21950 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
21951 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
21952 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
21953 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
21954 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
21955 (movdiri<mode>, movdir64b_<mode>): New.
21956 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
21957 * config/i386/immintrin.h: Include movdirintrin.h.
21958 * config/i386/movdirintrin.h: New file.
21959 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
21961 2018-04-19 Richard Biener <rguenther@suse.de>
21963 PR middle-end/85455
21964 * cfg.c (clear_bb_flags): When loop state says we have
21965 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
21967 2018-04-19 Richard Biener <rguenther@suse.de>
21969 PR tree-optimization/84737
21970 * tree-vect-data-refs.c (vect_copy_ref_info): New function
21971 copying restrict info.
21972 (vect_setup_realignment): Use it.
21973 * tree-vectorizer.h (vect_copy_ref_info): Declare.
21974 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
21975 the first DR to all generated stores.
21976 (vectorizable_load): Likewise for loads.
21978 2018-04-19 Jakub Jelinek <jakub@redhat.com>
21980 PR tree-optimization/85446
21981 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
21982 the integral and pointer types to have the same precision.
21984 * doc/install.texi: Document --disable-cet being the default and
21987 2018-04-18 Martin Liska <mliska@suse.cz>
21989 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
21992 2018-04-18 Martin Liska <mliska@suse.cz>
21995 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
21998 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
21999 arguments if they are comparable.
22001 2018-04-18 Martin Liska <mliska@suse.cz>
22004 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
22007 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
22010 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
22013 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
22014 ENDBR after calling __morestack.
22016 2018-04-18 David Malcolm <dmalcolm@redhat.com>
22019 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
22020 by using gcc_base_ver to generate a gcc_driver_version, and use
22021 it when generating GCC_DRIVER_NAME.
22022 * configure: Regenerate.
22024 2018-04-18 Jakub Jelinek <jakub@redhat.com>
22027 * config.gcc: Obsolete powerpc*-*-*spe*.
22029 2018-04-17 Jakub Jelinek <jakub@redhat.com>
22032 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
22033 (stabstr_D): Change type of unum from unsigned int to
22034 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
22037 2018-04-17 Jim Wilson <jimw@sifive.com>
22040 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
22041 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
22042 Set arg_pointer_offset after using pretend_args_size.
22044 2018-04-17 Jakub Jelinek <jakub@redhat.com>
22046 PR rtl-optimization/85431
22047 * dse.c (record_store): Ignore zero width stores.
22050 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
22051 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
22052 __builtin_stack_restore rather than after it.
22053 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
22054 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
22055 argument instead of virtual_dynamic_stack_rtx.
22057 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
22059 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
22061 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
22062 Add note to error message to explain internal mapping of overloaded
22063 built-in function name to non-overloaded built-in function name.
22064 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
22067 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
22070 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
22071 where the inputs overlap with the output.
22073 2018-04-17 Jakub Jelinek <jakub@redhat.com>
22075 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
22076 (=v, v) alternative and explicit "memory" attribute.
22077 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
22078 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
22080 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
22081 "sselog1" type instead of "sselog".
22082 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
22083 "sselog". Remove explicit "memory" attribute.
22084 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
22085 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
22087 (vec_extract_hi_v32hi): Merge all alternatives into one, use
22088 "sselog1" type instead of "sselog". Remove explicit "memory"
22090 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
22091 use "sselog1" type instead of "sselog". Remove explicit "memory"
22093 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
22094 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
22096 (vec_extract_hi_v64qi): Merge all alternatives into one, use
22097 "sselog1" type instead of "sselog". Remove explicit "memory"
22099 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
22100 use "sselog1" type instead of "sselog". Remove explicit "memory"
22104 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
22106 PR middle-end/85414
22107 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
22110 2018-04-17 Martin Jambor <mjambor@suse.cz>
22113 * ipa-cp.c (create_specialized_node): Call
22114 expand_all_artificial_thunks if necessary.
22116 2018-04-17 Martin Liska <mliska@suse.cz>
22119 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
22120 in message, remote space in between '_G' and '('.
22122 2018-04-17 Jakub Jelinek <jakub@redhat.com>
22125 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
22126 avx512f_vmcmp<mode>3<round_saeonly_name>,
22127 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
22128 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
22129 avx512f_rndscale<mode><round_saeonly_name>,
22130 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
22131 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
22132 Use %<iptr>2 instead of %2 for -masm=intel.
22133 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
22134 avx512f_vcvttss2usi<round_saeonly_name>,
22135 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
22137 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
22138 avx512f_vcvttsd2usi<round_saeonly_name>,
22139 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
22140 Use %q1 instead of %1 for -masm=intel.
22141 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
22142 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
22143 of %3 for -masm=intel.
22144 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
22146 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
22148 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
22150 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
22151 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
22153 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
22155 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
22156 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
22157 %g1 and one with %0 and %1.
22158 (avx512er_vmrcp28<mode><round_saeonly_name>,
22159 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
22160 %1 for -masm=intel.
22161 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
22162 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
22163 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
22164 of %0 and %{%4%} for -masm=intel.
22165 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
22166 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
22167 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
22168 order of %0 and %{%5%}%{z%} for -masm=intel.
22170 2018-04-17 Jan Hubicka <jh@suse.cz>
22173 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
22175 2018-04-17 Martin Liska <mliska@suse.cz>
22178 * multiple_target.c (create_dispatcher_calls): Set apostrophes
22179 for target_clone error message. Make default implementation
22180 clone to be a local declaration.
22181 (separate_attrs): Add new argument and check for an empty
22183 (expand_target_clones): Handle it.
22184 (ipa_target_clone): Make redirection just for target_clones
22187 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
22188 Tom de Vries <tom@codesourcery.com>
22190 PR middle-end/84955
22191 * omp-expand.c (expand_oacc_for): Add dummy false branch for
22192 tiled basic blocks without omp continue statements.
22194 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
22197 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
22198 vec_extract expression as having side effects to make sure it gets
22201 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
22204 * config/i386/i386.c (get_builtin_code_for_version): Check
22207 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
22210 * config.gcc: Support "skylake".
22211 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
22213 * config/i386/i386.c (m_SKYLAKE): Define.
22214 (processor_target_table): Add "skylake".
22215 (ix86_option_override_internal): Add "skylake".
22216 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
22217 PROCESSOR_CANNONLAKE.
22218 (get_builtin_code_for_version): Fix priority for
22219 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
22220 PROCESSOR_SKYLAKE-AVX512.
22221 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
22222 (processor_type): Add PROCESSOR_SKYLAKE.
22224 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
22225 Jason Merrill <jason@redhat.com>
22228 * convert.c (convert_to_integer_1): Use direct recursion for
22229 enumeral types and types with a precision less than the number
22230 of bits in their mode.
22232 2018-04-16 Julia Koval <julia.koval@intel.com>
22235 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
22236 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
22238 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
22241 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
22242 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
22243 and -mno-direct-move.
22245 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
22248 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
22249 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
22250 Ensure negative shifts result in {0}.
22252 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
22254 PR rtl-optimization/79916
22255 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
22256 regs (if any) to define how to gnerate SD moves when LRA is in
22259 2018-04-13 Jakub Jelinek <jakub@redhat.com>
22261 PR rtl-optimization/85393
22262 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
22263 * except.c (expand_dw2_landing_pad_for_region): Make static.
22264 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
22265 a label and unconditional jump to old_bb, rather than
22266 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
22269 PR rtl-optimization/85376
22270 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
22271 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
22272 instead of a specific value.
22274 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
22275 Bin Cheng <bin.cheng@arm.com>
22277 PR tree-optimization/82965
22278 PR tree-optimization/83991
22279 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
22280 by_profile_only parameter.
22281 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
22282 information if the loop was predicted to iterate too many times.
22283 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
22285 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
22288 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
22291 2018-04-13 Martin Liska <mliska@suse.cz>
22292 Jakub Jelinek <jakub@redhat.com>
22294 PR middle-end/81657
22295 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
22296 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
22297 * builtins.c (expand_builtin_memory_copy_args): Use
22298 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
22299 handle dest_addr == pc_rtx.
22301 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
22304 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
22305 asked to not generate direct moves.
22306 (fix_trunc<mode>si2_stfiwx): Similar.
22307 (fix_trunc<mode>si2_internal): Similar.
22309 2018-04-12 Jakub Jelinek <jakub@redhat.com>
22312 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
22313 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
22314 lookup if dest in some wider mode is known to be const0_rtx and
22315 if so, record permanent equivalence for it to be ZERO_EXTEND of
22316 the narrower mode destination.
22318 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
22320 * lto-streamer-out.c (output_function): Revert 259346.
22321 * omp-expand.c (expand_oacc_for): Likewise.
22323 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
22325 PR rtl-optimization/85354
22326 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
22327 * sel-sched.c (sel_global_init): ... here.
22329 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
22332 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
22333 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
22334 mode for PE-COFF targets.
22335 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
22336 (i386_pe_asm_lto_end): Likewise.
22337 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
22338 (TARGET_ASM_LTO_END): Likewise.
22339 * config/i386/winnt.c (saved_debug_info_level): New static variable.
22340 (i386_pe_asm_lto_start): New function.
22341 (i386_pe_asm_lto_end): Likewise.
22343 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
22344 Richard Biener <rguenther@suse.de>
22346 PR middle-end/84955
22347 * lto-streamer-out.c (output_function): Fix CFG loop state before
22349 * omp-expand.c (expand_oacc_for): Handle calls to internal
22350 functions like regular functions.
22352 2018-04-12 Richard Biener <rguenther@suse.de>
22355 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
22356 for the early LTO debug to properly generate references to it
22357 during DIE emission. Do not re-use that for the skeleton for
22359 (dwarf2out_early_finish): Likewise.
22361 2018-04-12 Jakub Jelinek <jakub@redhat.com>
22364 * config/i386/sse.md
22365 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
22366 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
22367 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
22368 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
22369 and output is a reg, avoid creating invalid lowpart subreg, but
22370 instead split into a 512-bit move. Don't split if not AVX512VL,
22371 input is xmm16+ reg and output is a mem.
22372 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
22373 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
22374 xmm16+ reg and output is a mem.
22376 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
22378 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
22379 also for flag_dwarf2_cfi_asm.
22381 2018-04-12 Jakub Jelinek <jakub@redhat.com>
22383 PR rtl-optimization/85342
22384 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
22385 a bool scalar var inside of the loop instead. Don't try to update
22386 recog_data.operand after failed apply_change_group.
22388 2018-04-12 Tom de Vries <tom@codesourcery.com>
22391 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
22392 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
22393 array with flexible array member as array without given dimension.
22394 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
22395 argument for undefined param to true.
22397 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
22400 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
22401 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
22402 from PowerPC section.
22403 * config/rs6000/sysv4.opt (mcall-): Improve help text.
22404 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
22405 help text that is too long.
22406 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
22407 help text that is too long.
22408 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
22409 help text that is too long.
22411 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
22413 * config/alpha/alpha.md (stack_probe_internal): Rename
22414 from "probe_stack". Update all callers.
22416 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
22418 PR rtl-optimization/84566
22419 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
22420 sched_macro_fuse_insns.
22422 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
22425 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
22426 (compute_block_dependences): ... from here.
22428 2018-04-11 Jakub Jelinek <jakub@redhat.com>
22430 PR tree-optimization/85331
22431 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
22432 from int to HOST_WIDE_INT.
22434 2018-04-11 Martin Jambor <mjambor@suse.cz>
22437 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
22438 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
22439 not the same as the source val.
22440 (cgraph_edge_brings_value_p): New parameter.
22441 (gather_edges_for_value): Pass destination value to
22442 cgraph_edge_brings_value_p.
22443 (perhaps_add_new_callers): Likewise.
22444 (get_info_about_necessary_edges): Likewise and exclude values brought
22445 only by self-recursive edges.
22446 (create_specialized_node): Redirect only clones of self-calling edges.
22447 (+self_recursive_pass_through_p): New function.
22448 (find_more_scalar_values_for_callers_subset): Use it.
22449 (find_aggregate_values_for_callers_subset): Likewise.
22450 (known_aggs_to_agg_replacement_list): Removed.
22451 (decide_whether_version_node): Re-calculate known constants for all
22452 remaining context clones.
22454 2018-04-11 Richard Biener <rguenther@suse.de>
22457 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
22458 from early DWARF output.
22459 (dwarf2out_early_finish): Output line info unconditionally into
22460 early DWARF and add reference to it.
22462 2018-04-11 Jakub Jelinek <jakub@redhat.com>
22465 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
22466 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
22467 other than V2DFmode using iptr mode attribute.
22468 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
22470 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
22472 PR rtl-optimization/84659
22473 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
22475 2018-04-11 Jakub Jelinek <jakub@redhat.com>
22478 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
22480 (output_loc_list): Pass address of a dummy size variable even in the
22481 locview handling loop.
22482 (index_location_lists): Add comment on why skip_loc_list_entry can't
22485 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
22488 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
22491 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
22494 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
22495 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
22496 and -mstring-compare-inline-limit.
22498 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
22501 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
22502 for stack clash protection in a register whenever we need it to be in
22505 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
22507 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
22508 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
22510 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
22513 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
22515 (mlong-double-): Ditto.
22516 * config/rs6000/sysv4.opt (msdata=): Ditto.
22517 (mtls-size=): Ditto.
22519 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
22521 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
22522 erroneous entries for
22523 "vector int vec_ldl (int, long int *)", and
22524 "vector unsigned int vec_ldl (int, unsigned long int *)".
22525 Add comments and entries for
22526 "vector bool char vec_ldl (int, bool char *)",
22527 "vector bool short vec_ldl (int, bool short *)",
22528 "vector bool int vec_ldl (int, bool int *)",
22529 "vector bool long long vec_ldl (int, bool long long *)",
22530 "vector pixel vec_ldl (int, pixel *)",
22531 "vector long long vec_ldl (int, long long *)",
22532 "vector unsigned long long vec_ldl (int, unsigned long long *)".
22533 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
22534 type tree bool_long_long_type_node and correct definition of
22535 bool_V2DI_type_node to make reference to this new type tree.
22536 (rs6000_mangle_type): Replace erroneous reference to
22537 bool_long_type_node with bool_long_long_type_node.
22538 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
22539 comments to emphasize sign distinctions for char and int types and
22540 replace RS6000_BTI_bool_long constant with
22541 RS6000_BTI_bool_long_long constant. Also add comment to restrict
22542 use of RS6000_BTI_pixel.
22543 (bool_long_type_node): Remove this macro definition.
22544 (bool_long_long_type_node): New macro definition
22546 2018-04-10 Jakub Jelinek <jakub@redhat.com>
22548 PR rtl-optimization/85300
22549 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
22550 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
22551 simplify_unary_operation fails.
22553 2018-04-10 Martin Liska <mliska@suse.cz>
22555 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
22556 cgraph_edge and ipa_ref.
22558 2018-04-10 Jakub Jelinek <jakub@redhat.com>
22562 * config/i386/sse.md
22563 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
22564 computation of the VEC_MERGE selector from mask.
22565 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
22566 Fix decoding of the VEC_MERGE selector into mask.
22568 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
22570 PR tree-optimization/85286
22571 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
22573 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
22575 * final.c (final_1): Set insn_last_address as well as
22576 insn_current_address.
22578 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22581 * explow.c (emit_stack_probe): Call validize_mem on memory location
22582 before passing it to gen_probe_stack. Create address operand and
22583 legitimize it for the probe_stack_address case.
22585 2018-04-09 Jan Hubicka <jh@suse.cz>
22588 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
22589 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
22590 * tree.c (free_lang_data_in_type): Fix handling of binfos;
22592 (free_lang_data): Rebuild type inheritance graph.
22594 2018-04-09 Martin Sebor <msebor@redhat.com>
22596 * invoke.texi (-finline-small-functions): Mention other optimization
22598 (-findirect-inlining, -fpartial-inlining): Same.
22599 (-finline-functions-called-once): Same.
22600 (-freorder-blocks-and-partition): Same.
22602 2018-04-09 Jan Hubicka <jh@suse.cz>
22605 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
22606 jumps; choose last target that matches the criteria (i.e.
22607 no partition changes for non-crossing jumps).
22608 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
22609 support for redirecting crossing jumps to non-crossing.
22611 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
22613 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
22614 also for naked functions.
22616 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
22618 * config/arc/arc.md (add_shift): New pattern.
22619 (add_shift2): Likewise.
22620 (sub_shift): Likewise.
22621 (sub_shift_cmp0_noout): Likewise.
22622 (compare_si_ashiftsi): Likewise.
22623 (xbfu_cmp0_noout): New combine pattern.
22624 (xbfu_cmp0"): Likewise.
22625 (movsi_set_cc_insn): Place the predicable variant first.
22626 (commutative_binary_cmp0_noout): Remove clobber.
22627 (commutative_binary_cmp0): New pattern.
22628 (noncommutative_binary_cmp0): Likewise.
22629 (noncommutative_binary_cmp0_noout): Likewise.
22630 (noncommutative_binary_comparison_result_used): Removed.
22631 (rsub_cmp0): New pattern.
22632 (rsub_cmp0_noout): Likewise.
22633 (extzvsi): Changed, keep only meaningful variants.
22634 (SQH, SEZ): New iterators.
22635 (SQH_postfix): New mode attribute.
22636 (SEZ_prefix): New code attribute.
22637 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
22638 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
22639 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
22640 of numerical value.
22641 (noncommutative_operator): Check the availability of barrel
22644 2018-04-09 Richard Biener <rguenther@suse.de>
22646 PR tree-optimization/85284
22647 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
22648 Only use the niter constraining form of simple_iv when the exit
22649 is always executed.
22651 2018-04-09 Tom de Vries <tom@codesourcery.com>
22654 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
22655 (define_expand "*memory_barrier"): New define_expand.
22656 (define_insn "memory_barrier"): New insn.
22658 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
22660 PR rtl-optimization/80463
22661 PR rtl-optimization/83972
22662 PR rtl-optimization/83480
22664 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
22665 correct producer for the insn.
22666 (tidy_control_flow): Fixup seqnos in case of debug insns.
22668 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
22670 PR rtl-optimization/83913
22672 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
22673 different sched-times when merging exprs.
22675 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
22677 PR rtl-optimization/83962
22679 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
22680 tidy_fallthru_edge and tidy_control_flow.
22682 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
22684 PR rtl-optimization/83530
22686 * sel-sched.c (force_next_insn): New global variable.
22687 (remove_insn_for_debug): When force_next_insn is true, also leave only
22688 next insn in the ready list.
22689 (sel_sched_region): When the region wasn't scheduled, make another pass
22690 over it with force_next_insn set to 1.
22692 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
22694 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
22696 * config/nds32/constants.md (unspec_volatile_element): Add enum values
22697 for interrupt control.
22698 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
22699 functions for interrupt control.
22700 * config/nds32/nds32-intrinsic.md: Likewise.
22701 * config/nds32/nds32_intrinsic.h: Likewise.
22702 * config/nds32/nds32.h (nds32_builtins): Likewise.
22704 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
22706 * config/nds32/nds32.c (nds32_init_machine_status,
22707 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
22708 strict_aligned_p field.
22709 (nds32_expand_to_rtl_hook): New function.
22710 (TARGET_EXPAND_TO_RTL_HOOK): Define.
22711 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
22713 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
22714 Chung-Ju Wu <jasonwucj@gmail.com>
22716 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
22717 * config/nds32/nds32-n7.md: New file.
22718 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
22719 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
22721 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
22722 * config/nds32/nds32.md (pipeline_model): Add n7.
22723 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
22724 * config/nds32/pipelines.md: Include n7 settings.
22726 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
22727 Chung-Ju Wu <jasonwucj@gmail.com>
22729 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
22730 * config/nds32/nds32-e8.md: New file.
22731 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
22732 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
22734 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
22735 * config/nds32/nds32.md (pipeline_model): Add e8.
22736 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
22737 * config/nds32/pipelines.md: Include e8 settings.
22739 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
22740 Chung-Ju Wu <jasonwucj@gmail.com>
22742 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
22743 * config/nds32/nds32-n8.md: New file.
22744 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
22745 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
22747 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
22748 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
22749 * config/nds32/nds32.md (pipeline_model): Add n8.
22750 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
22751 * config/nds32/pipelines.md: Include n8 settings.
22753 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
22754 Chung-Ju Wu <jasonwucj@gmail.com>
22756 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
22757 * config/nds32/nds32-n9-2r1w.md: New file.
22758 * config/nds32/nds32-n9-3r2w.md: New file.
22759 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
22760 nds32_register_ports): New or modify for cpu n9.
22761 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
22763 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
22764 * config/nds32/nds32-utils.c: New file.
22765 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
22766 TARGET_MUL_SLOW): Define.
22767 * config/nds32/nds32.md (pipeline_model): New attribute.
22768 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
22769 New options that support cpu n9.
22770 * config/nds32/pipelines.md: Include n9 settings.
22771 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
22773 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
22775 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
22776 information if necessary.
22777 (output_cond_branch_compare_zero): Likewise.
22778 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
22779 (nds32_target_alignment): Refine for alignment.
22780 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
22781 (FUNCTION_BOUNDARY): Modify.
22782 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
22784 * config/nds32/nds32.opt (malways-align, malign-functions): New.
22786 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
22788 * config/nds32/constants.md (unspec_volatile_element): Add values for
22789 TLB operation and data prefetch.
22790 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
22791 functions for TLB operation and data prefetch.
22792 * config/nds32/nds32-intrinsic.md: Likewise.
22793 * config/nds32/nds32_intrinsic.h: Likewise.
22794 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
22795 (nds32_print_operand): Likewise.
22796 * config/nds32/nds32.h (nds32_builtins): Likewise.
22798 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
22799 Andrew Pinski <pinsika@gcc.gnu.org>
22801 PR middle-end/82976
22802 * match.pd: Use constant_boolean_node of correct type instead of
22803 boolean_true_node or boolean_false_node for simplifying
22804 pointer comparisons to zero.
22806 2018-04-07 Jakub Jelinek <jakub@redhat.com>
22808 PR tree-optimization/80021
22809 * tree.c (verify_type_variant): Make error call in verify_variant_match
22810 translatable and remove final full stop.
22812 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
22814 * config/nds32/constants.md (unspec_volatile_element): Add
22815 UNSPEC_VOLATILE_EH_RETURN.
22816 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
22817 nds32_output_stack_pop): Support dwarf exception handling process.
22818 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
22819 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
22820 exception handling process.
22821 (nds32_compute_stack_frame): Likewise.
22822 (nds32_return_addr_rtx): Likewise.
22823 (nds32_initial_elimination_offset): Likewise.
22824 (nds32_expand_prologue): Likewise.
22825 (nds32_expand_epilogue): Likewise.
22826 (nds32_dynamic_chain_address): New function.
22827 * config/nds32/nds32.h (machine_function): Add fields for dwarf
22828 exception handling.
22829 (DYNAMIC_CHAIN_ADDRESS): Define.
22830 (EH_RETURN_DATA_REGNO): Define.
22831 (EH_RETURN_STACKADJ_RTX): Define.
22832 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
22833 patterns for dwarf exception handling.
22835 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
22837 * config/nds32/nds32.h: Clean up obsolete macros.
22839 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
22841 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
22842 Add enum values for particular instructions.
22843 * config/nds32/nds32-intrinsic.c: Implementation of expanding
22844 particular intrinsic functions.
22845 * config/nds32/nds32-intrinsic.md: Likewise.
22846 * config/nds32/nds32_intrinsic.h: Likewise.
22847 * config/nds32/nds32.h (nds32_builtins): Likewise.
22848 * config/nds32/nds32.md (type): Add pbsad and pbsada.
22849 (btst, ave): New patterns for particular instructions.
22851 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
22853 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
22854 Add enum values for atomic load/store and memory sync.
22855 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
22857 * config/nds32/nds32-intrinsic.md: Likewise.
22858 * config/nds32/nds32_intrinsic.h: Likewise.
22859 * config/nds32/nds32.h (nds32_builtins): Likewise.
22861 2018-04-07 Jakub Jelinek <jakub@redhat.com>
22863 PR tree-optimization/85257
22864 * fold-const.c (native_encode_vector): If not all elts could fit
22865 and off is -1, return 0 rather than offset.
22866 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
22867 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
22868 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
22869 adjust buffer in native_interpret_expr call.
22871 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
22873 * config/nds32/constants.md (unspec_volatile_element): Add cache
22874 control enum values.
22875 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
22876 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
22877 * config/nds32/nds32.c (nds32_cctl_names): New.
22878 (nds32_print_operand): Handle cache control register names.
22879 * config/nds32/nds32.h (nds32_builtins): New enum values.
22880 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
22882 * config/nds32/nds32.md (type): Add mmu.
22883 * config/nds32/pipelines.md (simple_insn): Add mmu.
22885 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
22887 * config/nds32/nds32.md (type): Remove call.
22888 * config/nds32/pipelines.md (simple_insn): Likewise.
22890 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
22892 * config/nds32/constants.md (unspec_volatile_element): Add
22893 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
22894 UNSPEC_VOLATILE_FMFCFG.
22895 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
22896 description for fmfcfg and fmfcsr.
22897 (bdesc_1arg): Add fmtcsr.
22898 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
22899 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
22900 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
22901 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
22902 unspec_fmfcfg): New patterns.
22903 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
22904 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
22905 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
22906 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
22907 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
22908 __nds32__fmfcfg): Define.
22910 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
22912 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
22913 intrinsic register names.
22914 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
22915 intrinsic register enum values and macros.
22917 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
22919 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
22920 for load/store addressing form.
22921 (nds32_print_operand_address): Likewise.
22923 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
22926 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
22927 based on LABEL_REF. Remove useless assertion.
22928 (pic_address_needs_scratch): Fix formatting.
22929 (sparc_legitimize_pic_address): Minor tweaks.
22930 (sparc_delegitimize_address): Adjust assertion accordingly.
22931 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
22932 into symbolic_operand.
22933 (movsi_high_pic_label_ref): Likewise.
22934 (movsi_lo_sum_pic_label_ref): Likewise.
22935 (movdi_pic_label_ref): Likewise.
22936 (movdi_high_pic_label_ref): Likewise.
22937 (movdi_lo_sum_pic_label_ref): Likewise.
22939 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
22941 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
22942 custom LIB_SPEC setup.
22944 2018-04-06 Ruslan Bukin <br@bsdpad.com>
22945 Kito Cheng <kito.cheng@gmail.com>
22947 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
22948 * config/riscv/freebsd.h: New.
22950 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
22952 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
22953 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
22956 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
22957 Kito Cheng <kito.cheng@gmail.com>
22959 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
22960 nds32_output_call, nds32_symbol_binds_local_p): New functions.
22961 * config/nds32/nds32-protos.h (nds32_output_call,
22962 nds32_output_return): Declare.
22963 * config/nds32/nds32.md: Refine all the call and return patterns.
22965 2018-04-06 Jakub Jelinek <jakub@redhat.com>
22968 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
22969 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
22971 PR rtl-optimization/84872
22972 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
22973 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
22974 EDGE_CROSSING edge.
22976 2018-04-06 Tamar Christina <tamar.christina@arm.com>
22978 * expr.c (copy_blkmode_to_reg): Revert 254862.
22979 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
22981 2018-04-06 Richard Biener <rguenther@suse.de>
22983 PR middle-end/85244
22984 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
22985 after seeing a component reference with an adjacent field. Treat
22986 refs to arrays at struct end of external decls similar to
22987 refs to unconstrained commons.
22989 2018-04-06 Jakub Jelinek <jakub@redhat.com>
22992 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
22993 look through SAVE_EXPRs with non-side-effects argument. Adjust
22995 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
22998 2018-04-06 Richard Biener <rguenther@suse.de>
23000 PR middle-end/85180
23001 * alias.c (find_base_term): New wrapper around find_base_term
23002 unwinding CSELIB_VAL_PTR changes.
23003 (find_base_term): Do not restore CSELIB_VAL_PTR during the
23006 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
23008 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
23010 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
23011 constant definitions.
23012 ("nop"): lr 0,0 -> nopr r0
23013 ("nop_lr0", "nop_lr1"): New insn definitions.
23015 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
23017 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
23018 NDS32_V3PUSH_AVAILABLE_P macro.
23020 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
23021 Chung-Ju Wu <jasonwucj@gmail.com>
23023 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
23024 (nds32*-*-*): Add float and fpu_config into supported_defaults.
23025 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
23026 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
23027 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
23028 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
23029 * config/nds32/constraints.md: New constraints and checking for hard
23030 float configuration.
23031 * config/nds32/iterators.md: New mode iterator and attribute for hard
23032 float configuration.
23033 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
23035 * config/nds32/nds32-fpu.md: New file.
23036 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
23037 deal with hard float code generation.
23038 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
23040 (abi_type, float_reg_number): New enum type.
23041 * config/nds32/nds32-predicates.c: New predicates for hard float.
23042 * config/nds32/nds32-protos.h: Declare functions for hard float.
23043 * config/nds32/nds32.c: Implementation for hard float configuration.
23044 * config/nds32/nds32.h: Definitions for hard float configuration.
23045 * config/nds32/nds32.md: Include hard float machine description and
23046 modify patterns for hard float configuration.
23047 * config/nds32/nds32.opt: New options for hard float configuration.
23048 * config/nds32/predicates.md: New predicates for hard float
23051 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
23053 * common/config/nds32/nds32-common.c
23054 (nds32_option_optimization_table): Enable -mreleax-hint by default.
23056 2018-04-05 Jakub Jelinek <jakub@redhat.com>
23058 PR middle-end/85195
23059 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
23060 CONSTRUCTOR_ELT (ctor, ...)->value.
23062 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
23065 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
23067 2018-04-05 Tom de Vries <tom@codesourcery.com>
23070 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
23073 2018-04-05 Shiva Chen <shiva0217@gmail.com>
23074 Kito Cheng <kito.cheng@gmail.com>
23076 * config/nds32/constraints.md (U33): Fine-tune checking condition.
23077 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
23078 * config/nds32/nds32.h (nds32_16bit_address_type): Add
23079 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
23081 2018-04-05 Shiva Chen <shiva0217@gmail.com>
23082 Kito Cheng <kito.cheng@gmail.com>
23084 * config/nds32/constraints.md (Ufe): New memory constraint.
23085 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
23086 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
23087 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
23089 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
23090 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
23092 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
23094 * config/nds32/nds32.md: Use optimize_size in the condition for
23095 alu-shift instructions.
23097 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
23099 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
23101 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
23103 * config/nds32/nds32.md (negsi2): Refine pattern.
23105 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
23106 Chung-Ju Wu <jasonwucj@gmail.com>
23108 * config/nds32/iterators.md (shift_rotate): New code iterator.
23109 (shift): New code attribute.
23110 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
23111 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
23112 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
23113 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
23114 bit-wise operations.
23115 (andsi3, *andsi3): Ditto.
23116 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
23117 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
23118 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
23119 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
23120 nds32_ior_operand, nds32_xor_operand): New predicates.
23122 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
23124 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
23125 (addsi3, subsi3): ... this.
23127 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
23129 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
23131 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
23133 * config/nds32/nds32.md: Adjust indention.
23135 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
23137 * config/nds32/nds32.md (feature): New attribute.
23139 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
23141 * config/nds32/nds32.md (subtype): New attribute.
23143 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
23146 * config/arm/arm-builtins.c (arm_expand_builtin): Change
23147 expansion to perform a bitwise AND of the argument followed by a
23148 boolean negation of the result.
23150 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
23152 PR rtl-optimization/84878
23153 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
23154 the basic block. Assert the use reference is not artificial and that
23155 it has an associated insn.
23157 2018-04-04 Michael Matz <matz@suse.de>
23159 * builtins.c (compute_objsize): Pass correct operand
23160 to array_at_struct_end_p.
23162 2018-04-04 Richard Biener <rguenther@suse.de>
23165 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
23166 from contexts for DINFO_LEVEL_TERSE and below.
23168 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
23170 * config/nds32/nds32-doubleword.md (move_<mode>): Require
23171 resiter_operand condition.
23172 * config/nds32/nds32.md (*move<mode>): Ditto.
23174 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
23175 Monk Chiang <sh.chiang04@gmail.com>
23177 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
23179 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
23181 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
23183 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
23184 Kito Cheng <kito.cheng@gmail.com>
23186 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
23187 nds32_cond_code_str, output_cond_branch,
23188 output_cond_branch_compare_zero, nds32_expand_cbranch,
23189 nds32_expand_cstore, nds32_expand_movcc,
23190 nds32_output_cbranchsi4_equality_zero,
23191 nds32_output_cbranchsi4_equality_reg,
23192 nds32_output_cbranchsi4_equality_reg_or_const_int,
23193 nds32_output_cbranchsi4_greater_less_zero: New functions.
23194 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
23195 nds32_expand_cstore, nds32_expand_movcc,
23196 nds32_output_cbranchsi4_equality_zero,
23197 nds32_output_cbranchsi4_equality_reg,
23198 nds32_output_cbranchsi4_equality_reg_or_const_int,
23199 nds32_output_cbranchsi4_greater_less_zero): Declare.
23200 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
23201 nds32_rimm11s_operand): New predicates.
23202 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
23203 * config/nds32/nds32.md: Rewrite all the branch and conditional move
23206 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
23208 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
23209 * config/nds32/nds32.md: Ditto.
23210 * config/nds32/pipelines.md: Ditto.
23212 2018-04-04 Richard Biener <rguenther@suse.de>
23214 PR tree-optimization/85168
23215 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
23216 propagating abnormals.
23218 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
23220 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
23222 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
23223 Kito Cheng <kito.cheng@gmail.com>
23225 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
23226 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
23227 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
23228 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
23229 * config/nds32/nds32.md (sibcall_internal): New.
23230 (sibcall_register): Remove.
23231 (sibcall_immediate): Remove.
23232 (sibcall_value_internal): New.
23233 (sibcall_value_register): Remove.
23234 (sibcall_value_immediate): Remove.
23235 * config/nds32/predicates.md (nds32_general_register_operand): New.
23236 (nds32_call_address_operand): New.
23238 2018-04-03 Jakub Jelinek <jakub@redhat.com>
23240 PR rtl-optimization/85167
23241 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
23242 bb_defs if *split_p, instead preinitialize it to NULL.
23244 PR tree-optimization/85156
23245 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
23246 evaluating the argument multiple times.
23248 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
23250 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
23252 (_mm_cvtpd_ps): Likewise.
23253 (_mm_cvttpd_epi32): Likewise.
23254 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
23255 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
23256 vector, pixel, and bool following altivec.h include.
23258 2018-04-03 Martin Sebor <msebor@redhat.com>
23260 * doc/extend.texi (Common Function Attributes): Clarify.
23261 (const attribute): Likewise.
23262 (pure attribute): Likewise.
23264 2018-04-03 Jakub Jelinek <jakub@redhat.com>
23267 * config/i386/i386.c (ix86_expand_vector_set): Use
23268 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
23270 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
23272 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
23273 instructions when changing rounding bits to preserve precision bits
23274 in the x87 control word.
23276 2018-04-03 Martin Liska <mliska@suse.cz>
23278 PR tree-optimization/82491
23279 * rtl.h (strip_offset_and_add): Replace += suboffset with
23280 poly_uint64 () + suboffset.
23282 2018-03-29 Martin Liska <mliska@suse.cz>
23283 Martin Jambor <mjambor@suse.cz>
23286 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
23287 param_type is not an integral or pointer type.
23289 2018-04-03 Richard Biener <rguenther@suse.de>
23291 * sese.h (recompute_all_dominators): Remove.
23293 2018-04-02 Martin Sebor <msebor@redhat.com>
23295 * doc/invoke.texi (-Wrestrict): Fix typos.
23297 2018-04-02 Jim Wilson <jimw@sifive.com>
23299 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
23300 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
23301 (<optab>di3, <optab>si3_extend): Likewise.
23302 (<optab>si3_mask, <optab>si3_mask_1): New.
23303 (<optab>di3_mask, <optab>di3_mask_1): New.
23304 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
23305 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
23306 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
23308 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
23310 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
23313 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
23315 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
23316 (nds32_canonicalize_comparison): New function.
23318 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
23319 Kito Cheng <kito.cheng@gmail.com>
23320 Kuan-Lin Chen <kuanlinchentw@gmail.com>
23322 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
23323 * config/nds32/constants.md (unspec_volatile_element): Add
23324 UNSPEC_VOLATILE_RELAX_GROUP.
23325 * config/nds32/nds32-relax-opt.c: New file.
23326 * config/nds32/nds32-predicates.c
23327 (nds32_symbol_load_store_p): New function.
23328 * config/nds32/nds32-protos.h
23329 (nds32_symbol_load_store_p): Declare function.
23330 (make_pass_nds32_relax_opt): Declare new rtl pass function.
23331 * config/nds32/nds32.c
23332 (nds32_register_pass): New function to register pass.
23333 (nds32_register_passes): New function to register passes.
23334 * config/nds32/nds32.md (relax_group): New pattern.
23335 * config/nds32/nds32.opt (mrelax-hint): New option.
23336 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
23338 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
23340 * config/nds32/t-nds32: Modify files dependency.
23342 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
23344 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
23345 (PROFILE_HOOK): Define its implementation.
23347 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
23349 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
23350 type and 32-bit size.
23352 2018-04-01 Jakub Jelinek <jakub@redhat.com>
23354 PR middle-end/85090
23355 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
23356 (V_128_256): New mode iterator.
23357 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
23358 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
23359 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
23361 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
23362 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
23364 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
23367 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
23368 NaN inputs correctly.
23370 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
23373 * config/rs6000/vsx.md (??r): New mode attribute.
23374 (*vsx_mov<mode>_64bit): Use it.
23375 (*vsx_mov<mode>_32bit): Likewise.
23377 2018-03-30 Martin Sebor <msebor@redhat.com>
23379 PR tree-optimization/84818
23380 * builtins.c (check_access): Use warning_n.
23382 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
23385 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
23387 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
23390 2018-03-30 Julia Koval <julia.koval@intel.com>
23393 * x86-tune.def (movx, partial_reg_dependency): Enable for
23396 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
23398 PR inline-asm/84985
23399 * lra-constraints.c (process_alt_operands): Move setting
23400 this_alternative_matches below.
23402 2018-03-29 Martin Liska <mliska@suse.cz>
23405 * doc/invoke.texi: Document how LTO works with debug info.
23406 Describe auto-load support of binutils. Mention 'x86-64'
23407 as valid option value of -march option.
23409 2018-03-29 Jakub Jelinek <jakub@redhat.com>
23411 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
23414 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
23415 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
23416 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
23419 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
23422 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
23423 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
23424 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
23425 for RS6000_BTM_POWERPC64.
23426 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
23427 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
23428 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
23431 (DIVDEU): Likewise.
23433 2018-03-28 Carl Love <cel@us.ibm.com>
23436 2017-09-27 Carl Love <cel@us.ibm.com>
23438 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
23439 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
23440 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
23443 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
23445 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
23446 instead of __vector bool.
23447 (_mm_max_pu8): Likewise.
23448 (_mm_min_pi16): Likewise.
23450 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
23453 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
23454 (DIVWEUO): Likewise.
23455 (DIVDEO): Likewise.
23456 (DIVDEUO): Likewise.
23457 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
23458 DIVWEUO and DIVDEUO.
23459 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
23460 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
23461 (div_extend): Likewise.
23462 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
23464 (__builtin_divweuo): Likewise.
23465 (__builtin_divdeo): Likewise.
23466 (__builtin_divdeuo): Likewise.
23468 2018-03-28 Jakub Jelinek <jakub@redhat.com>
23471 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
23472 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
23474 PR tree-optimization/82004
23475 * gimple-match-head.c (optimize_pow_to_exp): New function.
23476 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
23477 Don't fold to exp if optimize_pow_to_exp is false.
23479 2018-03-28 Martin Liska <mliska@suse.cz>
23482 * calls.c (initialize_argument_information): Fix trailing space.
23483 * common.opt: Fix typo and provide better explanation for
23484 -fsanitize-coverage option.
23485 * config/i386/i386.opt: Fix typo.
23487 2018-03-28 Jakub Jelinek <jakub@redhat.com>
23488 Martin Liska <mliska@suse.cz>
23491 * gimplify.c (asan_poison_variable): Don't do the check for
23492 gimplify_omp_ctxp here.
23493 (gimplify_decl_expr): Do it here.
23494 (gimplify_target_expr): Likewise.
23496 2018-03-28 Martin Liska <mliska@suse.cz>
23499 * config/i386/i386.c (ix86_function_arg_advance): Do not call
23500 chkp_type_bounds_count if MPX is not enabled.
23502 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
23504 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
23506 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
23509 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
23510 function to create the function decl for complex long double
23511 multiply and divide for -mabi=ieeelongdouble.
23512 (init_float128_ieee): Call it.
23514 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
23517 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
23518 -fcf-protection=branch -mibt.
23519 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
23521 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
23524 * config/arm/arm.c (arm_valid_symbolic_address): Handle
23525 arm_word_relocations.
23527 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
23530 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
23531 extern array declarations.
23533 2018-03-27 Richard Biener <rguenther@suse.de>
23535 PR middle-end/84067
23536 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
23537 explicit single_use checks.
23539 2018-03-27 Richard Biener <rguenther@suse.de>
23541 PR tree-optimization/85082
23542 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
23545 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
23547 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
23548 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
23549 Turn on fasynchronous-unwind-tables and funwind-tables.
23551 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
23554 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
23555 (*bmi_blsr_<mode>_ccz): Ditto.
23557 2018-03-26 Tom de Vries <tom@codesourcery.com>
23559 PR tree-optimization/85063
23560 * omp-general.c (offloading_function_p): New function. Factor out
23562 * omp-offload.c (pass_omp_target_link::gate): ... here.
23563 * omp-general.h (offloading_function_p): Declare.
23564 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
23565 with attribute omp declare target for offloading functions.
23567 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
23569 PR tree-optimization/84005
23570 * tree-data-ref.h (get_base_for_alignment): Declare.
23571 * tree-data-ref.c (get_base_for_alignment_1): New function.
23572 (get_base_for_alignment): Likewise.
23573 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
23574 get_base_for_alignment to find a suitable base object, instead
23575 of always using drb->base_address.
23577 2018-03-23 Jakub Jelinek <jakub@redhat.com>
23579 PR inline-asm/85022
23580 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
23581 known size by default.
23583 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
23585 PR inline-asm/85030
23586 * lra-constraints.c (process_alt_operands): Don't match BLKmode
23587 and non BLKmode operands.
23589 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23592 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
23593 Clean up attributes.
23595 2018-03-23 Richard Biener <rguenther@suse.de>
23598 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
23599 we are going to emit early debug for LTO.
23601 2018-03-23 Jakub Jelinek <jakub@redhat.com>
23603 PR inline-asm/85034
23604 * function.c (match_asm_constraints_1): Don't optimize if input
23605 doesn't satisfy general_operand predicate for output's mode.
23607 PR inline-asm/85022
23608 * alias.c (write_dependence_p): Don't require for x_canonicalized
23609 non-VOIDmode if x has VOIDmode.
23612 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
23613 just don't try to optimize it rather than assert it never happens.
23615 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
23617 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
23618 macro expansions for definition of ST_INTERNAL_<mode> and
23619 LD_INTERNAL_<mode> builtins.
23620 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
23622 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
23624 (altivec_expand_st_builtin): Likewise.
23625 (altivec_expand_builtin): Remove calls to deleted functions.
23626 (rs6000_address_for_altivec): Delete this function.
23627 * config/rs6000/vector.md: Remove expands for
23628 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
23630 2018-03-22 Sudakshina Das <sudi.das@arm.com>
23633 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
23634 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
23635 re-computing once computed.
23636 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
23637 (arm_init_machine_status): Initialize
23638 machine->static_chain_stack_bytes.
23640 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
23643 * doc/extend.texi: Add four new prototypes for vec_ld.
23644 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
23645 definitions for more logical presentation.
23646 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
23647 entries for V1TI variants of __builtin_altivec_ld builtin.
23648 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
23649 handling of V1TI variant of LVX icode pattern.
23650 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
23651 (rs6000_gimple_fold_builtin): Likewise.
23652 (altivec_init_builtins): Add code to define
23653 __builtin_altivec_lvx_v1ti function.
23655 2018-03-22 Jakub Jelinek <jakub@redhat.com>
23657 PR inline-asm/84941
23658 * function.c (match_asm_constraints_1): Don't do the optimization
23659 if input isn't a REG, SUBREG, MEM or constant.
23661 2018-03-22 Tom de Vries <tom@codesourcery.com>
23663 PR tree-optimization/84956
23664 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
23665 bb_has_abnormal_pred.
23667 2018-03-22 Jakub Jelinek <jakub@redhat.com>
23670 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
23671 DECL_INITIAL (decl) to decl at the end.
23672 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
23673 adjust the comment.
23675 2018-03-21 Joseph Myers <joseph@codesourcery.com>
23677 * doc/extend.texi (__builtin_tgmath): Document when complex
23678 integer types are treated as _Complex _Float64.
23680 2018-03-21 Tom de Vries <tom@codesourcery.com>
23682 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
23684 2018-03-21 Jakub Jelinek <jakub@redhat.com>
23686 PR tree-optimization/84960
23687 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
23688 if it is ENTRY block, move them into single succ of ENTRY in that case.
23690 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
23692 PR tree-optimization/84811
23693 * poly-int.h (poly_span_traits): Remove the T3 parameter and
23694 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
23695 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
23696 (known_subrange_p): Update accordingly. Cast each value involved
23697 in the size comparison, rather than casting the result of the
23700 2018-03-21 Jakub Jelinek <jakub@redhat.com>
23702 PR tree-optimization/84982
23703 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
23704 by flipping the least significant bit rather than all bits from
23705 bitpos to bitpos + bitsize - 1.
23707 2018-03-21 Nathan Sidwell <nathan@acm.org>
23709 * doc/extend.texi (Deprecated Features): Remove mention of
23710 long-deleted deprecations.
23712 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
23715 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
23716 * configure: Regenerate.
23718 2018-03-21 Tom de Vries <tom@codesourcery.com>
23720 PR tree-optimization/83126
23721 * tree-parloops.c (num_phis): New function.
23722 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
23724 2018-03-21 Nathan Sidwell <nathan@acm.org>
23726 * doc/extend.texi (Deprecated Features): Update deprecated flags,
23727 mention anon-struct/union members and trailing attributes.
23729 2018-03-21 Bin Cheng <bin.cheng@arm.com>
23731 PR tree-optimization/84969
23732 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
23733 builtin memset partitions if they set different rhs values.
23735 2018-03-21 Jakub Jelinek <jakub@redhat.com>
23737 PR rtl-optimization/84989
23738 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
23739 VEC_DUPLICATE with scalar result mode.
23741 2018-03-21 Martin Liska <mliska@suse.cz>
23744 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
23745 not intended return statement.
23747 2018-03-21 Martin Liska <mliska@suse.cz>
23750 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
23751 (chkp_find_bound_slots_1): Limit number of iterations.
23753 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
23756 * Minor grammar fixes for x86 options.
23758 2018-03-20 Jakub Jelinek <jakub@redhat.com>
23761 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
23762 holding REG_CFA_RESTORE notes, instead turn them into a USE.
23764 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
23767 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
23768 (altivec_lvx_<mode>_1op): Likewise.
23769 (altivec_stvx_<mode>_2op): Likewise.
23770 (altivec_stvx_<mode>_1op): Likewise.
23771 (altivec_lvx_<VM2:mode>): New define_expand.
23772 (altivec_stvx_<VM2:mode>): Likewise.
23773 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
23774 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
23775 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
23776 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
23777 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
23778 (rs6000_gen_lvx): Likewise.
23779 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
23780 (altivec_expand_stv_builtin): Likewise.
23781 (altivec_expand_builtin): Likewise.
23782 * config/rs6000/vector.md: Likewise.
23784 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23787 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
23790 2018-03-20 Richard Biener <rguenther@suse.de>
23793 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
23794 sign-conversions as zero, fall back to standard scalar_stmt
23797 2018-03-20 Martin Liska <mliska@suse.cz>
23800 * predict.c (rebuild_frequencies): Handle case when we have
23801 PROFILE_ABSENT, but flag_guess_branch_prob is false.
23803 2018-03-20 Jakub Jelinek <jakub@redhat.com>
23806 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
23807 flag_section_anchors.
23808 * varasm.c (use_blocks_for_decl_p): Remove hack for
23809 dw2_force_const_mem.
23812 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
23814 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
23815 be created, use lowpart_subreg of operands[0] rather than operands[0]
23817 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
23818 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
23819 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
23820 and n constraint instead of aarch64_shift_imm_di and Usd.
23821 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
23822 (*aarch64_<optab>_reg_minus<mode>3): ... this.
23824 2018-03-20 Sudakshina Das <sudi.das@arm.com>
23827 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
23828 to favor GPR over NEON registers.
23829 (<shift>di3_neon): Likewise.
23831 2018-03-20 Tom de Vries <tom@codesourcery.com>
23834 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
23835 (nvptx_process_pars): Emit bar.sync asap and alap.
23837 2018-03-20 Tom de Vries <tom@codesourcery.com>
23840 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
23841 seen_label if seen_label is already set.
23843 2018-03-20 Jakub Jelinek <jakub@redhat.com>
23846 * config/i386/i386.c (fold_builtin_cpu): For features above 31
23847 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
23848 Use 1U instead of 1. Formatting fixes.
23851 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
23852 instead of TREE_TYPE (s1) for the return value.
23854 2018-03-19 Jakub Jelinek <jakub@redhat.com>
23856 PR tree-optimization/84946
23857 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
23858 bitsize + bitsize in poly_uint64 rather than poly_int64.
23861 * dwarf2asm.c: Include fold-const.c.
23862 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
23863 of decl rather than decl itself.
23865 PR rtl-optimization/84643
23866 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
23868 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
23871 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
23872 calling assemble_variable.
23874 2018-03-19 Sudakshina Das <sudi.das@arm.com>
23877 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
23878 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
23880 2018-03-19 Jim Wilson <jimw@sifive.com>
23883 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
23884 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
23885 (riscv_first_stack_step): Likewise.
23886 (riscv_option_override): Use STACK_BOUNDARY instead of
23887 MIN_STACK_BOUNDARY.
23888 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
23889 MIN_STACK_BOUNDARY.
23890 (BIGGEST_ALIGNMENT): Set to 128.
23891 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
23892 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
23895 2018-03-19 Richard Biener <rguenther@suse.de>
23897 PR tree-optimization/84933
23898 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
23899 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
23901 2018-03-19 Richard Biener <rguenther@suse.de>
23903 PR tree-optimization/84859
23904 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
23905 (cond_if_else_store_replacement): Perform sinking operation on
23906 single-store BBs regardless of MAX_STORES_TO_SINK setting.
23907 Generalize what a BB with a single eligible store is.
23909 2018-03-19 Richard Biener <rguenther@suse.de>
23911 PR tree-optimization/84929
23912 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
23913 chrec_is_positive against non-chrec arg.
23915 2018-03-19 Tamar Christina <tamar.christina@arm.com>
23918 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
23920 2018-03-18 Martin Liska <mliska@suse.cz>
23922 PR rtl-optimization/84635
23923 * regrename.c (build_def_use): Use matches_mode only when
23926 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
23928 PR tree-optimization/84913
23929 * tree-vect-loop.c (vectorizable_reduction): Don't try to
23930 vectorize chains of COND_EXPRs.
23932 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
23934 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
23936 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
23938 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
23940 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
23942 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
23944 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
23945 Kito Cheng <kito.cheng@gmail.com>
23947 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
23948 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
23949 (nds32_adjust_reg_alloc_order): New function.
23950 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
23952 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
23954 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
23955 nds32_print_operand, nds32_print_operand_address): Use
23956 HOST_WIDE_INT_PRINT_DEC instead.
23958 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
23960 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
23962 2018-03-17 Jakub Jelinek <jakub@redhat.com>
23965 * config/i386/i386.c (initial_ix86_tune_features,
23966 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
23967 unsigned long long.
23968 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
23969 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
23970 rather than 1u << ix86_tune. Formatting fix.
23971 (ix86_option_override_internal): Change ix86_arch_mask from
23972 unsigned int to unsigned HOST_WIDE_INT, initialize to
23973 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
23974 (ix86_function_specific_restore): Likewise.
23976 2018-03-16 Jakub Jelinek <jakub@redhat.com>
23979 * postreload.c (reload_combine_recognize_pattern): Perform
23980 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
23981 truncate_int_for_mode the result for the destination's mode.
23984 * hsa-gen.c (mem_type_for_type): Fix comment typo.
23985 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
23987 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
23990 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
23993 * lra-assigns.c (lra_split_hard_reg_for): Don't use
23994 regno_allocno_class_array and sorted_pseudos.
23995 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
23996 insns where regno is used.
23998 2018-03-16 Martin Liska <mliska@suse.cz>
24001 * multiple_target.c (create_dispatcher_calls): Redirect
24002 reference in the symbol table.
24004 2018-03-16 Martin Liska <mliska@suse.cz>
24007 * multiple_target.c (create_dispatcher_calls): Redirect also
24010 2018-03-16 Jakub Jelinek <jakub@redhat.com>
24014 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
24015 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
24016 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
24018 2018-03-16 Julia Koval <julia.koval@intel.com>
24020 * doc/invoke.texi (Skylake Server): Add CLWB.
24021 Cannonlake): Remove CLWB.
24023 2018-03-16 Jakub Jelinek <jakub@redhat.com>
24025 PR tree-optimization/84841
24026 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
24028 (FLOAT_ONE_CONST_TYPE): Define.
24029 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
24030 (sort_by_operand_rank): Put entries with higher constant_type last
24031 rather than first to match comments.
24033 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
24035 * config/nios2/nios2.md (movsi_internal): Fix thinko in
24038 2018-03-15 Jakub Jelinek <jakub@redhat.com>
24041 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
24042 check and use address of target always.
24044 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
24047 * config/i386/i386.c (indirect_thunk_needed): Update comments.
24048 (indirect_thunk_bnd_needed): Likewise.
24049 (indirect_thunks_used): Likewise.
24050 (indirect_thunks_bnd_used): Likewise.
24051 (indirect_return_needed): New.
24052 (indirect_return_bnd_needed): Likewise.
24053 (output_indirect_thunk_function): Add a bool argument for
24055 (output_indirect_thunk_function): Don't generate alias for
24056 function return thunk.
24057 (ix86_code_end): Call output_indirect_thunk_function to generate
24058 function return thunks.
24059 (ix86_output_function_return): Set indirect_return_bnd_needed
24060 and indirect_return_needed instead of indirect_thunk_bnd_needed
24061 and indirect_thunk_needed.
24063 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
24065 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
24066 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
24067 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
24069 2018-03-15 David Malcolm <dmalcolm@redhat.com>
24070 Paul Hua <paul.hua.gm@gmail.com>
24073 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
24075 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
24077 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
24078 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
24079 resp. SFmode cases.
24081 2018-03-15 Tamar Christina <tamar.christina@arm.com>
24084 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
24085 instead of GET_MODE_SIZE when comparing Units.
24087 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
24090 * varasm.c (hash_section): Return an unchangeble hash value
24091 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
24092 Return !aarch64_can_use_per_function_literal_pools_p ().
24094 2018-03-15 Jakub Jelinek <jakub@redhat.com>
24097 * optabs.c (emit_conditional_move): Pass address of cmode's copy
24098 rather than address of cmode as last argument to prepare_cmp_insn.
24100 2018-03-15 Julia Koval <julia.koval@intel.com>
24102 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
24103 F_AVX512VNNI, F_AVX512BITALG): New.
24105 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
24108 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
24109 insn for floating-point loads and stores.
24111 2018-03-14 Carl Love <cel@us.ibm.com>
24113 * config/rs6000/rs6000-c.c: Add macro definitions for
24114 ALTIVEC_BUILTIN_VEC_PERMXOR.
24115 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
24116 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
24117 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
24118 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
24120 * config/doc/extend.texi: Add prototypes for vec_permxor.
24122 2018-03-14 David Malcolm <dmalcolm@redhat.com>
24125 * diagnostic-show-locus.c (class layout_point): Convert m_line
24126 from int to linenum_type.
24127 (line_span::comparator): Use linenum "compare" function when
24128 comparing line numbers.
24129 (test_line_span): New function.
24130 (layout_range::contains_point): Convert param "row" from int to
24132 (layout_range::intersects_line_p): Likewise.
24133 (layout::will_show_line_p): Likewise.
24134 (layout::print_source_line): Likewise.
24135 (layout::should_print_annotation_line_p): Likewise.
24136 (layout::print_annotation_line): Likewise.
24137 (layout::print_leading_fixits): Likewise.
24138 (layout::annotation_line_showed_range_p): Likewise.
24139 (struct line_corrections): Likewise for field m_row.
24140 (line_corrections::line_corrections): Likewise for param "row".
24141 (layout::print_trailing_fixits): Likewise.
24142 (layout::get_state_at_point): Likewise.
24143 (layout::get_x_bound_for_row): Likewise.
24144 (layout::print_line): Likewise.
24145 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
24146 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
24147 * input.c (selftest::test_linenum_comparisons): New function.
24148 (selftest::input_c_tests): Call it.
24149 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
24150 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
24151 * selftest.h (ASSERT_GT): New macro.
24152 (ASSERT_GT_AT): New macro.
24153 (ASSERT_LT): New macro.
24154 (ASSERT_LT_AT): New macro.
24156 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
24158 PR rtl-optimization/84780
24159 * combine.c (distribute_links): Don't make a link based on pc_rtx.
24161 2018-03-14 Martin Liska <mliska@suse.cz>
24163 * tree.c (record_node_allocation_statistics): Use
24164 get_stats_node_kind.
24165 (get_stats_node_kind): New function extracted from
24166 record_node_allocation_statistics.
24167 (free_node): Use get_stats_node_kind.
24169 2018-03-14 Richard Biener <rguenther@suse.de>
24171 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
24172 that the value-set of ANTIC_IN doesn't grow.
24175 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
24177 (BB_VISITED_WITH_VISITED_SUCCS): New define.
24178 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
24180 2018-03-14 Julia Koval <julia.koval@intel.com>
24182 * config.gcc (icelake-client, icelake-server): New.
24184 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
24185 (initial_ix86_arch_features): Ditto.
24186 (PTA_SKYLAKE): Add SGX.
24187 (PTA_ICELAKE): Remove.
24188 (PTA_ICELAKE_CLIENT): New.
24189 (PTA_ICELAKE_SERVER): New.
24190 (ix86_option_override_internal): Split up icelake on icelake client and
24192 (get_builtin_code_for_version): Ditto.
24193 (fold_builtin_cpu): Ditto.
24194 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
24195 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
24196 * config/i386/i386.h (processor_type): Ditto.
24197 * doc/invoke.texi: Ditto.
24199 2018-03-14 Jakub Jelinek <jakub@redhat.com>
24202 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
24203 INTEGER_CST offset, add it together with bitpos / 8 and
24204 sign extend based on POINTER_SIZE.
24208 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
24211 * config/i386/constraints.md (Yc): New register constraint.
24212 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
24213 Use Yc constraint for alternative 2 of operand 0. Remove
24214 preferred_for_speed attribute.
24216 2018-03-14 Richard Biener <rguenther@suse.de>
24218 PR tree-optimization/84830
24219 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
24220 with the old one to avoid oscillations.
24222 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
24225 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
24227 (assign_by_spills): Return a flag of reload assignment failure.
24228 Do not process the reload assignment failures. Do not spill other
24229 reload pseudos if they has the same reg class. Update n if
24231 (lra_assign): Add a return arg. Set up from the result of
24232 assign_by_spills call.
24233 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
24234 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
24235 usage_insns if it is not NULL.
24236 (spill_hard_reg_in_range): New function.
24237 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
24238 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
24239 function prototypes.
24240 (lra_assign): Change prototype.
24241 * lra.c (lra): Add code to deal with fails by splitting hard reg
24244 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
24246 * config/riscv/riscv.opt (mrelax): New option.
24247 * config/riscv/riscv.c (riscv_file_start): Emit ".option
24248 "norelax" when riscv_mrelax is disabled.
24249 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
24251 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
24254 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
24255 reassociation for int modes.
24257 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
24259 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
24260 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
24262 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
24263 * config/aarch64/aarch64-sve.md
24264 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
24265 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
24266 (*extend<mode><Vwide>2): Rename to...
24267 (aarch64_sve_extend<mode><Vwide>2): ...this.
24268 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
24269 renaming the old pattern to...
24270 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
24272 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
24273 define_expand, renaming the old pattern to...
24274 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
24275 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
24276 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
24277 account when deciding which SVE instruction the optab should use.
24278 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
24280 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
24282 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
24283 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
24284 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
24285 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
24286 (tlsdesc_small_<mode>): Turn a define_expand and use
24287 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
24288 (tlsdesc_small_advsimd_<mode>): ...this.
24289 (tlsdesc_small_sve_<mode>): New pattern.
24291 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
24293 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
24294 (UNSPEC_UMUL_HIGHPART): New constants.
24295 (MUL_HIGHPART): New int iteraor.
24296 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
24297 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
24299 (*<su>mul<mode>3_highpart): New define_insn.
24301 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
24304 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
24307 2018-03-13 Martin Liska <mliska@suse.cz>
24310 * (sem_item_optimizer::sem_item_optimizer): Initialize new
24312 (sem_item_optimizer::~sem_item_optimizer): Release it.
24313 (sem_item_optimizer::merge_classes): Register variable aliases.
24314 (sem_item_optimizer::fixup_pt_set): New function.
24315 (sem_item_optimizer::fixup_points_to_sets): Likewise.
24316 * ipa-icf.h: Declare new variables and functions.
24318 2018-03-13 Jakub Jelinek <jakub@redhat.com>
24320 PR middle-end/84834
24321 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
24322 integer_pow2p@2 and test integer_pow2p in condition.
24323 (A < 0 ? C : 0): Similarly for @1.
24325 PR middle-end/84831
24326 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
24327 characters starting at p contain '\0' character, don't look beyond
24331 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
24332 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
24335 * reg-stack.c (change_stack): Change update_end var from int to
24336 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
24337 also call set_block_for_insn on the newly added insns and rescan.
24340 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
24341 on the last operand.
24344 * tree.c (stabilize_reference_1): Return save_expr (e) for
24345 STATEMENT_LIST even if it doesn't have side-effects.
24347 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
24349 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
24351 2018-03-12 Renlin Li <renlin.li@arm.com>
24353 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
24354 aarch64_output_scalar_simd_mov_immediate.
24356 2018-03-12 Martin Sebor <msebor@redhat.com>
24358 PR tree-optimization/83456
24359 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
24360 for perfectly overlapping calls to memcpy.
24361 (gimple_fold_builtin_memory_chk): Same.
24362 (gimple_fold_builtin_strcpy): Handle no-warning.
24363 (gimple_fold_builtin_stxcpy_chk): Same.
24364 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
24366 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
24368 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
24369 parameter. Use it for SFmode.
24370 (rs6000_function_arg_advance_1): Adjust.
24371 (rs6000_function_arg): Adjust.
24372 (rs6000_gimplify_va_arg): Pass false for that new parameter.
24374 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
24376 PR rtl-optimization/84169
24377 PR rtl-optimization/84780
24378 * combine.c (can_combine_p): Check for a 2-insn combination whether
24379 the destination register is used between the two insns, too.
24381 2018-03-12 Richard Biener <rguenther@suse.de>
24383 PR tree-optimization/84803
24384 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
24385 for refs DR analysis didn't process.
24387 2018-03-12 Richard Biener <rguenther@suse.de>
24389 PR tree-optimization/84777
24390 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
24391 force-vectorize loops ignore whether we are optimizing for size.
24393 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
24395 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
24396 (TARGET_MD_ASM_ADJUST): Define.
24398 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
24399 Kito Cheng <kito.cheng@gmail.com>
24400 Chung-Ju Wu <jasonwucj@gmail.com>
24402 * config/nds32/nds32.c (nds32_compute_stack_frame,
24403 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
24404 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
24405 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
24406 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
24407 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
24408 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
24409 * config/nds32/nds32.md (prologue, epilogue): Use macro
24410 NDS32_V3PUSH_AVAILABLE_P to do checking.
24412 2018-03-11 Jakub Jelinek <jakub@redhat.com>
24415 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
24416 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
24417 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
24418 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
24419 addition of most attributes on !orig_type_die or the attribute not
24420 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
24422 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
24423 Chung-Ju Wu <jasonwucj@gmail.com>
24425 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
24426 __NDS32_VH__ macro.
24427 * config/nds32/nds32.opt (mvh): New option.
24429 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
24430 Chung-Ju Wu <jasonwucj@gmail.com>
24432 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
24434 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
24435 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
24438 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
24439 Chung-Ju Wu <jasonwucj@gmail.com>
24441 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
24443 * config/nds32/nds32-multiple.md (strlensi): New pattern.
24444 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
24446 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
24447 Kito Cheng <kito.cheng@gmail.com>
24448 Chung-Ju Wu <jasonwucj@gmail.com>
24450 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
24451 UNSPEC_FFMISM and UNSPEC_FLMISM.
24452 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
24453 for ffb, ffmism and flmism.
24454 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
24455 (unspec_ffmism): Ditto.
24456 (unspec_flmism): Ditto.
24457 (nds32_expand_builtin_impl): Check if string extension is available.
24458 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
24459 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
24461 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
24464 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
24467 * lra-assigns.c (assign_by_spills): Return a flag of reload
24468 assignment failure. Do not process the reload assignment
24469 failures. Do not spill other reload pseudos if they has the same
24471 (lra_assign): Add a return arg. Set up from the result of
24472 assign_by_spills call.
24473 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
24474 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
24475 usage_insns if it is not NULL.
24476 (spill_hard_reg_in_range): New function.
24477 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
24478 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
24479 function prototypes.
24480 (lra_assign): Change prototype.
24481 * lra.c (lra): Add code to deal with fails by splitting hard reg
24484 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
24487 * config/i386/i386.opt: Replace Enforcment with Enforcement.
24489 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
24492 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
24493 (dw_val_node): Add val_symbolic_view.
24494 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
24495 (symview_upper_bound): New.
24496 (new_line_info_table): Initialize symviews_since_reset.
24497 (dwarf2out_source_line): Count symviews_since_reset and set
24498 symview_upper_bound.
24499 (dw_val_equal_p): Handle symview.
24500 (add_AT_symview): New.
24501 (print_dw_val): Handle symview.
24502 (attr_checksum, attr_checksum_ordered): Likewise.
24503 (same_dw_val_p, size_of_die): Likewise.
24504 (value_format, output_die): Likewise.
24505 (add_high_low_attributes): Use add_AT_symview for entry_view.
24506 (dwarf2out_finish): Reset symview_upper_bound, clear
24509 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
24512 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
24513 Add strict argument and use it.
24514 (rs6000_split_multireg_move): Update for new strict argument.
24515 (mem_operand_gpr): Disallow all non-offsettable addresses.
24516 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
24518 2018-03-09 Jakub Jelinek <jakub@redhat.com>
24521 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
24522 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
24523 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
24526 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
24527 decl, use remap_type if we want to use the type.
24529 2018-03-09 Martin Sebor <msebor@redhat.com>
24531 PR tree-optimization/84526
24532 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
24534 (builtin_access::generic_overlap): Be prepared to handle non-array
24537 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
24539 PR rtl-optimization/84682
24540 * lra-constraints.c (process_address_1): Check is_address flag
24541 for address constraints.
24542 (process_alt_operands): Likewise.
24543 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
24544 preprocess_constraints.
24545 * recog.h (preprocess_constraints): Add oploc parameter.
24547 * recog.c (preprocess_constraints): Test address_operand for
24548 CT_ADDRESS constraints.
24550 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
24553 * lra-assigns.c (assign_by_spills): Return a flag of reload
24554 assignment failure. Do not process the reload assignment
24555 failures. Do not spill other reload pseudos if they has the same
24557 (lra_assign): Add a return arg. Set up from the result of
24558 assign_by_spills call.
24559 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
24560 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
24561 usage_insns if it is not NULL.
24562 (spill_hard_reg_in_range): New function.
24563 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
24564 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
24565 function prototypes.
24566 (lra_assign): Change prototype.
24567 * lra.c (lra): Add code to deal with fails by splitting hard reg
24570 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
24573 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
24574 Accept complain bool parameter. Only emit errors if it is true.
24575 (arm_parse_cpu_option_name): Likewise.
24576 (arm_target_thumb_only): Adjust callers of the above.
24577 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
24578 prototype to take a default true bool parameter.
24579 (arm_parse_arch_option_name): Likewise.
24581 2018-03-09 David Malcolm <dmalcolm@redhat.com>
24582 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
24586 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
24587 * configure: Regenerate.
24588 * configure.ac ("linker --version-script option"): New.
24589 ("linker soname option"): New.
24591 2018-03-09 Richard Biener <rguenther@suse.de>
24593 PR tree-optimization/84775
24594 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
24595 immediate uses of predicate stmts and mark them modified.
24598 PR tree-optimization/84178
24599 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
24601 (version_loop_for_if_conversion): Delay update_ssa call.
24602 (tree_if_conversion): Delay update_ssa until after predicate
24605 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
24608 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
24609 when the function accesses prior frames.
24611 2018-03-08 Jakub Jelinek <jakub@redhat.com>
24614 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
24615 gen_llsym, otherwise call maybe_gen_llsym.
24617 PR inline-asm/84742
24618 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
24619 has ',' character inside of it.
24621 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
24624 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
24625 as clobbering CC_REGNUM.
24627 2018-03-08 Richard Biener <rguenther@suse.de>
24629 PR middle-end/84552
24630 * tree-scalar-evolution.c: Include tree-into-ssa.h.
24631 (follow_copies_to_constant): Do not follow SSA names registered
24634 2018-03-08 Richard Biener <rguenther@suse.de>
24636 PR tree-optimization/84178
24637 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
24639 (version_loop_for_if_conversion): Delay update_ssa call.
24640 (tree_if_conversion): Delay update_ssa until after predicate
24643 2018-03-08 David Malcolm <dmalcolm@redhat.com>
24645 PR tree-optimization/84178
24646 * tree-if-conv.c (release_bb_predicate): Remove the
24647 the assertion that the stmts have NULL use_ops.
24648 Discard the statements, asserting that they haven't
24649 yet been added to a BB.
24651 2018-03-08 Richard Biener <rguenther@suse.de>
24653 PR tree-optimization/84746
24654 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
24655 (phi_translate): Pass in destination ANTIC_OUT set.
24656 (phi_translate_1): Likewise. For a simplified result lookup
24657 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
24658 (phi_translate_set): Adjust.
24659 (do_pre_regular_insertion): Likewise.
24660 (do_pre_partial_partial_insertion): Likewise.
24662 2018-03-08 Martin Liska <mliska@suse.cz>
24664 PR gcov-profile/84735
24665 * doc/gcov.texi: Document usage of profile files.
24666 * gcov-io.h: Document changes in the format.
24668 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
24672 * dwarf2out.c (struct dw_line_info_table): Update comments for
24674 (FORCE_RESET_NEXT_VIEW): New.
24675 (FORCE_RESETTING_VIEW_P): New.
24676 (RESETTING_VIEW_P): Check for -1 too.
24677 (ZERO_VIEW_P): Likewise.
24678 (new_line_info_table): Force-reset next view.
24679 (dwarf2out_begin_function): Likewise.
24680 (dwarf2out_source_line): Simplify zero_view_p initialization.
24681 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
24682 view directly. Omit view when omitting .loc at line 0.
24684 2018-03-08 Jakub Jelinek <jakub@redhat.com>
24686 PR tree-optimization/84740
24687 * tree-switch-conversion.c (process_switch): Call build_constructors
24688 only if info.phi_count is non-zero.
24690 PR tree-optimization/84739
24691 * tree-tailcall.c (find_tail_calls): Check call arguments against
24692 DECL_ARGUMENTS (current_function_decl) rather than
24693 DECL_ARGUMENTS (func) when checking for tail recursion.
24695 2018-03-07 Jakub Jelinek <jakub@redhat.com>
24697 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
24698 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
24699 Volker Reichelt's entry and add entries for people that perform
24700 GCC fuzzy testing and report numerous bugs.
24702 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
24705 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
24706 readonly data in sdata, if that is disabled.
24707 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
24708 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
24709 -mreadonly-in-sdata option.
24711 2018-03-07 Martin Sebor <msebor@redhat.com>
24713 PR tree-optimization/84468
24714 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
24715 basic block when looking for nul assignment.
24717 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
24720 * except.h (output_function_exception_table): Adjust prototype.
24721 * except.c (output_function_exception_table): Remove FNNAME parameter
24722 and add SECTION parameter. Ouput one part of the table at a time.
24723 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
24724 the first part of the exception table and emit unwind directives.
24725 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
24726 (i386_pe_seh_cold_init): Likewise.
24727 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
24728 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
24729 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
24730 (ix86_output_call_insn): Emit a nop in one more case for SEH.
24731 * config/i386/winnt.c: Include except.h.
24732 (struct seh_frame_state): Add reg_offset, after_prologue and
24733 in_cold_section fields.
24734 (i386_pe_seh_end_prologue): Set seh->after_prologue.
24735 (i386_pe_seh_cold_init): New function.
24736 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
24737 to seh->in_cold_section.
24738 (seh_emit_push): Record the offset of the push.
24739 (seh_emit_save): Record the offet of the save.
24740 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
24741 Test seh->after_prologue to disregard the epilogue.
24742 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
24743 (i386_pe_end_cold_function): New function.
24745 2018-03-07 Jakub Jelinek <jakub@redhat.com>
24748 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
24749 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
24752 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
24754 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
24755 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
24757 PR middle-end/84723
24758 * multiple_target.c: Include tree-inline.h and intl.h.
24759 (expand_target_clones): Diagnose and fail if node->definition and
24760 !tree_versionable_function_p (node->decl).
24762 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
24764 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
24766 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
24767 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
24768 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
24770 2018-03-06 Jakub Jelinek <jakub@redhat.com>
24773 * combine.c (try_combine): Use reg_or_subregno instead of handling
24774 just paradoxical SUBREGs and REGs.
24776 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
24778 * config/arc/arc.c (arc_finalize_pic): Remove function.
24779 (arc_must_save_register): We use single base PIC register, remove
24780 checks to save/restore the PIC register.
24781 (arc_expand_prologue): Likewise.
24782 * config/arc/arc-protos.h (arc_set_default_type_attributes):
24784 (arc_verify_short): Likewise.
24785 (arc_attr_type): Likewise.
24786 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
24787 (walk_stores): Likewise.
24788 (arc_address_cost): Make it static.
24789 (arc_verify_short): Likewise.
24790 (branch_dest): Likewise.
24791 (arc_attr_type): Likewise.
24792 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
24793 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
24794 (arc_final_prescan_insn): Remove inserting the nops due to
24795 hardware hazards. It is done in reorg step.
24796 (insn_length_variant_t): Remove.
24797 (insn_length_parameters_t): Likewise.
24798 (arc_insn_length_parameters): Likewise.
24799 (arc_get_insn_variants): Likewise.
24800 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
24802 2018-03-06 Jakub Jelinek <jakub@redhat.com>
24804 PR inline-asm/84683
24805 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
24808 PR tree-optimization/84687
24809 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
24811 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
24813 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
24815 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
24816 Rename to ppc_speculation_barrier.
24817 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
24818 __builtin_ppc_speculation_barrier.
24820 2018-03-05 Jakub Jelinek <jakub@redhat.com>
24823 * combine.c (combine_simplify_rtx): Don't try to simplify if
24824 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
24827 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
24829 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
24830 to 32 bytes when compiling for POWER9.
24832 2018-03-05 Jakub Jelinek <jakub@redhat.com>
24835 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
24836 regparm >= 3 with no arg reg available also for calls with
24837 flag_force_indirect_call. Pass decl to ix86_function_regparm.
24840 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
24842 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
24844 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
24847 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
24849 2018-03-05 Richard Biener <rguenther@suse.de>
24851 PR tree-optimization/84486
24852 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
24853 When inserting a __builtin_assume_aligned call set the LHS
24854 SSA name alignment info accordingly.
24856 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
24858 PR tree-optimization/84114
24859 * config/aarch64/aarch64.c (aarch64_reassociation_width)
24860 Avoid reassociation of FLOAT_MODE addition.
24862 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
24864 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
24865 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
24866 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
24867 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
24868 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
24869 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
24870 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
24872 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
24873 __builtin_ia32_wbinvd): New builtins.
24874 (SPECIAL_ARGS2): New.
24875 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
24876 (SPECIAL_ARGS2): New.
24877 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
24878 (ix86_valid_target_attribute_inner_p): Ditto.
24879 (ix86_init_mmx_sse_builtins): Add special_args2.
24880 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
24881 TARGET_WBNOINVD_P): New.
24882 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
24883 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
24884 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
24885 * config/i386/immintrin.h (_wbinvd): New intrinsic.
24886 * config/i386/pconfigintrin.h: New file.
24887 * config/i386/wbnoinvdintrin.h: Ditto.
24888 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
24890 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
24892 2018-03-05 Richard Biener <rguenther@suse.de>
24894 PR tree-optimization/84670
24895 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
24897 (BB_VISITED_WITH_VISITED_SUCCS): New define.
24898 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
24899 (compute_antic_aux): Only assert the number of values in ANTIC_IN
24900 doesn't grow if all successors (recursively) were visited at least
24903 2018-03-05 Richard Biener <rguenther@suse.de>
24905 PR tree-optimization/84650
24906 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
24907 if executed in the loop pipeline.
24909 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
24911 * doc/configfiles.texi (Configuration Files): Move info about
24912 conditionalizing $target-protos.h to...
24913 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
24914 differs from $target-protos.h.
24916 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
24917 Chung-Ju Wu <jasonwucj@gmail.com>
24919 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
24920 * config/nds32/nds32-multiple.md (setmemsi): Define.
24921 * config/nds32/nds32-memory-manipulation.c
24922 (nds32_gen_dup_4_byte_to_word_value): New.
24923 (emit_setmem_word_loop): New.
24924 (emit_setmem_byte_loop): New.
24925 (nds32_expand_setmem_loop): New.
24926 (nds32_expand_setmem_loop_v3m): New.
24927 (nds32_expand_setmem_unroll): New.
24928 (nds32_expand_setmem): New.
24930 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
24931 Chung-Ju Wu <jasonwucj@gmail.com>
24933 * config/nds32/nds32-memory-manipulation.c
24934 (nds32_emit_load_store): New.
24935 (nds32_emit_post_inc_load_store): New.
24936 (nds32_emit_mem_move): New.
24937 (nds32_emit_mem_move_block): New.
24938 (nds32_expand_movmemsi_loop_unknown_size): New.
24939 (nds32_expand_movmemsi_loop_known_size): New.
24940 (nds32_expand_movmemsi_loop): New.
24941 (nds32_expand_movmemsi_unroll): New.
24942 (nds32_expand_movmemqi): Rename ...
24943 (nds32_expand_movmemsi): ... to this.
24944 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
24945 (movmemsi): ... to this.
24946 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
24947 (nds32_expand_movmemsi): ... to this.
24949 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
24950 Monk Chiang <sh.chiang04@gmail.com>
24951 Chung-Ju Wu <jasonwucj@gmail.com>
24953 * config/nds32/nds32-protos.h
24954 (nds32_expand_load_multiple): New arguments.
24955 (nds32_expand_store_multiple): Ditto.
24956 (nds32_valid_multiple_load_store): Rename ...
24957 (nds32_valid_multiple_load_store_p): ... to this.
24958 * config/nds32/nds32-memory-manipulation.c
24959 (nds32_expand_load_multiple): Refine implementation.
24960 (nds32_expand_store_multiple): Ditto.
24961 * config/nds32/nds32-multiple.md
24962 (load_multiple): Update nds32_expand_load_multiple interface.
24963 (store_multiple): Update nds32_expand_store_multiple interface.
24964 * config/nds32/nds32-predicates.c
24965 (nds32_valid_multiple_load_store): Rename ...
24966 (nds32_valid_multiple_load_store_p): ... to this and refine
24968 * config/nds32/predicates.md
24969 (nds32_load_multiple_and_update_address_operation): New predicate.
24970 (nds32_store_multiple_and_update_address_operation): New predicate.
24972 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
24973 Chung-Ju Wu <jasonwucj@gmail.com>
24975 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
24976 (combo): New attribute.
24977 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
24979 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
24981 * config/nds32/nds32.opt: Change -mcmodel= default value.
24983 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
24984 Monk Chiang <sh.chiang04@gmail.com>
24985 Chung-Ju Wu <jasonwucj@gmail.com>
24987 * config/nds32/constants.md (unspec_element): New enum.
24988 * config/nds32/constraints.md (Umw): New constraint.
24989 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
24990 * config/nds32/nds32-intrinsic.md: Likewise.
24991 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
24992 (nds32_valid_smw_lwm_base_p): New.
24993 (nds32_output_smw_single_word): New.
24994 (nds32_output_lmw_single_word): New.
24995 (nds32_expand_unaligned_load): New.
24996 (nds32_expand_unaligned_store): New.
24997 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
24998 (nds32_output_smw_single_word): Declare.
24999 (nds32_output_lmw_single_word): Declare.
25000 (nds32_expand_unaligned_load): Declare.
25001 (nds32_expand_unaligned_store): Declare.
25002 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
25003 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
25004 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
25005 NDS32_BUILTIN_UASTORE_DW.
25006 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
25009 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
25010 Kito Cheng <kito.cheng@gmail.com>
25011 Chung-Ju Wu <jasonwucj@gmail.com>
25013 * config/nds32/nds32-intrinsic.c
25014 (nds32_expand_builtin_null_ftype_reg): Delete.
25015 (nds32_expand_builtin_reg_ftype_imm): Ditto.
25016 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
25017 (nds32_read_argument): New.
25018 (nds32_legitimize_target): Ditto.
25019 (nds32_legitimize_argument): Ditto.
25020 (nds32_check_constant_argument): Ditto.
25021 (nds32_expand_unop_builtin): Ditto.
25022 (nds32_expand_unopimm_builtin): Ditto.
25023 (nds32_expand_binop_builtin): Ditto.
25024 (nds32_builtin_decl_impl): Ditto.
25025 (builtin_description): Ditto.
25026 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
25027 (nds32_init_builtins_impl): Ditto.
25028 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
25029 (nds32_builtin_decl): New.
25030 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
25031 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
25033 2018-03-02 Jeff Law <law@redhat.com>
25035 * reorg.c (stop_search_p): Handle DEBUG_INSN.
25036 (redundant_insn, fill_simple_delay_slots): Likewise.
25037 (fill_slots_from_thread): Likewise.
25038 * resource.c (mark_referenced_resources): Likewise.
25039 (mark_set_resources, find_dead_or_set_registers): Likewise.
25041 2018-03-02 Jakub Jelinek <jakub@redhat.com>
25043 * substring-locations.h (format_warning_va): Formatting fix for
25044 ATTRIBUTE_GCC_DIAG.
25045 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
25047 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
25048 * substring-locations.c: Include intl.h.
25049 (format_warning_va): Turned into small wrapper around
25050 format_warning_n_va, renamed to ...
25051 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
25052 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
25054 (format_warning_at_substring_n): New function.
25055 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
25056 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
25057 format_warning_at_substring with just a shorter name instead of
25058 const function pointer.
25059 (fmtwarn_n): New function.
25060 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
25061 appropriate, get rid of all the fmtstr temporaries, move conditionals
25062 with G_() wrapped string literals directly into fmtwarn arguments,
25063 cast dir.len to (int), formatting fixes.
25065 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
25067 * doc/invoke.texi: Remove "Cilk Plus" references.
25069 2018-03-02 Jakub Jelinek <jakub@redhat.com>
25070 Richard Biener <rguenther@suse.de>
25073 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
25074 for error or warning attributes if CALL_FROM_THUNK_P is set.
25077 2018-03-02 Jakub Jelinek <jakub@redhat.com>
25080 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
25081 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
25084 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
25085 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
25087 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
25088 instead of -1U in last predictors element's probability member.
25090 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
25093 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
25094 arguments if they are comparable.
25096 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
25098 PR tree-optimization/84634
25099 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
25100 masks and masked_loop_p with a single loop_masks, making sure it's
25101 null for bb vectorization.
25103 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
25105 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
25106 (vect_analyze_data_ref_access): Use loop->safe_len rather than
25107 loop->force_vectorize to check whether there is no alias.
25109 2018-03-02 Jakub Jelinek <jakub@redhat.com>
25112 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
25114 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
25116 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
25117 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
25118 instead of a loop around prev_real_insn.
25119 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
25122 PR inline-asm/84625
25123 * config/i386/i386.c (ix86_print_operand): Use conditional
25124 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
25127 2018-03-02 Richard Biener <rguenther@suse.de>
25129 PR tree-optimization/84427
25130 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
25131 (bitmap_set_subtract_values): Rewrite to handle multiple
25134 (prune_clobbered_mems): Likewise.
25135 (phi_translate): Take edge instead of pred/phiblock.
25136 (phi_translate_1): Likewise.
25137 (phi_translate_set): Likewise. Insert all translated
25138 exprs for a value into the set, keeping possibly multiple
25139 expressions per value.
25140 (compute_antic_aux): Adjust for phi_translate changes.
25141 When intersecting union the expressions and prune those
25142 not in the final value set, keeping possibly multiple
25143 expressions per value. Do not use value-insertion
25144 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
25145 all expressions. Add verification that the value-sets
25146 only shrink during iteration.
25147 (compute_partial_antic_aux): Adjust for the phi_translate changes.
25148 (do_pre_regular_insertion): Likewise.
25149 (do_pre_partial_partial_insertion): Likewise.
25151 2018-03-02 Richard Biener <rguenther@suse.de>
25154 * config/darwin.c (saved_debug_info_level): New static global.
25155 (darwin_asm_lto_start): Disable debug info generation for LTO out.
25156 (darwin_asm_lto_end): Restore debug info generation settings.
25158 2018-03-01 Martin Liska <mliska@suse.cz>
25161 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
25162 volatile arguments.
25164 2018-03-01 Richard Biener <rguenther@suse.de>
25167 * dwarf2out.c (gen_variable_die): Properly handle late VLA
25168 type annotation with LTO when debug was disabled at compile-time.
25170 2018-03-01 Matthew Fortune <mfortune@gmail.com>
25172 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
25174 (mips_final_postscan_insn): Likewise.
25176 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
25178 PR rtl-optimization/84528
25179 * alias.c (init_alias_target): Add commentary.
25180 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
25181 a unique base value if the frame pointer is not eliminated
25182 to the stack pointer.
25184 2018-03-01 Tom de Vries <tom@codesourcery.com>
25186 PR rtl-optimization/83327
25187 * lra-int.h (hard_regs_spilled_into): Declare.
25188 * lra.c (hard_regs_spilled_into): Define.
25189 (init_reg_info): Init hard_regs_spilled_into.
25190 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
25191 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
25192 (process_bb_lives): Handle hard_regs_spilled_into.
25193 (lra_create_live_ranges_1): Before doing liveness propagation, clear
25194 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
25196 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
25198 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
25199 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
25200 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
25201 * config/rs6000/aix72.h: New file.
25203 2018-02-28 Jakub Jelinek <jakub@redhat.com>
25205 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
25206 instead of warning_at with conditional singular and plural messages
25210 * stor-layout.c (update_alignment_for_field): For
25211 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
25212 && !DECL_PACKED (field), do the alignment update, just use
25213 only desired_align instead of MAX (type_align, desired_align)
25215 (place_field): Don't do known_align < desired_align handling
25216 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
25217 is non-NULL, instead do it after rli->prev_field handling and
25218 only if not within a bitfield word. For DECL_PACKED (field)
25219 use type_align of BITS_PER_UNIT.
25221 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
25223 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
25224 superfluous parentheses and trailing spaces.
25226 2018-02-28 Richard Biener <rguenther@suse.de>
25228 PR tree-optimization/84584
25229 * graphite-scop-detection.c (scop_detection::add_scop): Discard
25230 SCoPs with fake exit edge.
25232 2018-02-28 Martin Liska <mliska@suse.cz>
25235 * timevar.c (timer::print): Fix format to properly print 100%
25238 2018-02-28 Richard Biener <rguenther@suse.de>
25240 PR middle-end/84607
25241 * genmatch.c (capture_info::walk_match): Do not mark
25242 captured expressions without operands as expr_p given
25243 they act more like predicates and should be subject to
25244 "lost tail" side-effect preserving.
25246 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
25248 PR rtl-optimization/81611
25249 * auto-inc-dec.c (attempt_change): Move dead note from
25250 mem_insn if it's the next use of regno
25251 (find_address): Take address use of reg holding
25252 non-incremented value. Add parm to limit search to the named
25254 (merge_in_block): Attempt to use a mem insn that is the next
25255 use of the original regno.
25257 2018-02-27 Martin Sebor <msebor@redhat.com>
25260 * doc/invoke.texi (-Wmissing-attributes): New option.
25261 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
25263 2018-02-27 Martin Sebor <msebor@redhat.com>
25265 PR translation/84207
25266 * diagnostic-core.h (warning_n, error_n, inform_n): Change
25267 n argument to unsigned HOST_WIDE_INT.
25268 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
25269 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
25270 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
25271 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
25273 2018-02-27 Richard Biener <rguenther@suse.de>
25275 PR tree-optimization/84512
25276 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
25277 Do not use the estimate returned from record_stmt_cost for
25278 the scalar iteration cost but sum properly using add_stmt_cost.
25280 2018-02-27 Richard Biener <rguenther@suse.de>
25282 PR tree-optimization/84466
25283 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
25284 Adjust last change to less strictly validate use operands.
25286 2018-02-27 Martin Liska <mliska@suse.cz>
25288 PR gcov-profile/84548
25289 * gcov.c (process_file): Allow partial overlap and consider it
25290 also as group functions.
25291 (output_lines): Properly calculate range of lines for a group.
25293 2018-02-27 Martin Liska <mliska@suse.cz>
25295 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
25296 'ggc' suffixes. Change first column width.
25297 (timer::print): Fix formatting of the column.
25299 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
25301 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
25302 preserve inline entry blocks for the sake of debug inline
25303 entry point markers alone.
25304 (remove_unused_locals): Suggest in comments a better place to
25305 force the preservation of inline entry blocks that are
25306 otherwise unused, but do not preserve them.
25308 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
25310 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
25312 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
25315 * config/i386/constraints.md (Bs): Replace
25316 ix86_indirect_branch_register with
25317 TARGET_INDIRECT_BRANCH_REGISTER.
25319 * config/i386/i386.md (indirect_jump): Likewise.
25320 (tablejump): Likewise.
25321 (*sibcall_memory): Likewise.
25322 (*sibcall_value_memory): Likewise.
25323 Peepholes of indirect call and jump via memory: Likewise.
25324 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
25325 (*sibcall_value_GOT_32): Likewise.
25326 * config/i386/predicates.md (indirect_branch_operand): Likewise.
25327 (GOT_memory_operand): Likewise.
25328 (call_insn_operand): Likewise.
25329 (sibcall_insn_operand): Likewise.
25330 (GOT32_symbol_operand): Likewise.
25331 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
25333 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
25335 PR rtl-optimization/83496
25336 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
25337 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
25338 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
25339 redundant insn, if any.
25340 (relax_delay_slots): Likewise.
25341 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
25343 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
25345 PR tree-optimization/83965
25346 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
25347 that grouped statements are part of a reduction chain. Return
25348 true if the statement is not marked as a reduction itself but
25349 is part of a group.
25350 (vect_recog_dot_prod_pattern): Don't check whether the statement
25351 is part of a group here.
25352 (vect_recog_sad_pattern): Likewise.
25353 (vect_recog_widen_sum_pattern): Likewise.
25355 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
25358 * final.c (rest_of_clean_state): Also look for calls inside sequences.
25360 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
25363 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
25365 (ix86_output_indirect_function_return): New prototype.
25366 (ix86_split_simple_return_pop_internal): Likewise.
25367 * config/i386/i386.c (indirect_return_via_cx): New.
25368 (indirect_return_via_cx_bnd): Likewise.
25369 (indirect_thunk_name): Handle return va CX_REG.
25370 (output_indirect_thunk_function): Create alias for
25371 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
25372 (ix86_output_indirect_jmp): Remove the bool argument.
25373 (ix86_output_indirect_function_return): New function.
25374 (ix86_split_simple_return_pop_internal): Likewise.
25375 * config/i386/i386.md (*indirect_jump): Don't pass false
25376 to ix86_output_indirect_jmp.
25377 (*tablejump_1): Likewise.
25378 (simple_return_pop_internal): Change it to define_insn_and_split.
25379 Call ix86_split_simple_return_pop_internal to split it for
25380 -mfunction-return=.
25381 (simple_return_indirect_internal): Call
25382 ix86_output_indirect_function_return instead of
25383 ix86_output_indirect_jmp.
25385 2018-02-26 Jakub Jelinek <jakub@redhat.com>
25388 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
25389 memset and value initialization afterwards.
25391 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
25393 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
25395 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
25398 * common/config/aarch64/aarch64-common.c
25399 (aarch_option_optimization_table[]): Switch
25400 off fomit-frame-pointer
25402 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
25403 Chung-Ju Wu <jasonwucj@gmail.com>
25405 * config/nds32/nds32-multiple.md (load_multiple): Disallow
25407 (store_multiple): Ditto.
25409 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
25411 * config.gcc: Add --with-cpu support for nds32 target.
25412 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
25413 * config/nds32/nds32.opt: Add -mcpu= option.
25415 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
25417 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
25418 isel=yes): Warn for these deprecated options.
25420 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
25422 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
25423 ISA_2_5_MASKS_EMBEDDED.
25425 2018-02-23 Jakub Jelinek <jakub@redhat.com>
25427 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
25428 p->max as pointers rather than using iterative_hash_expr.
25430 2018-02-23 Carl Love <cel@us.ibm.com>
25432 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
25433 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
25435 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
25436 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
25437 P8V_BUILTIN_VEC_VUNSIGNED2.
25439 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
25442 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
25443 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
25445 * lra-constraints.c (curr_insn_transform): Set up
25446 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
25448 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
25449 * lra-eliminations.c (spill_pseudos): Ditto.
25450 (process_insn_for_elimination): Ditto.
25451 * lra-lives.c (reg_early_clobber_p): Use the new macros.
25452 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
25453 LRA_NON_CLOBBERED_ALT.
25455 2018-02-22 Martin Sebor <msebor@redhat.com>
25457 PR tree-optimization/84480
25458 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
25459 to maybe_diag_stxncpy_trunc. Call it.
25460 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
25461 from gimple_fold_builtin_strcpy. Print inlining stack.
25462 (handle_builtin_stxncpy): Print inlining stack.
25463 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
25465 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
25468 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
25469 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
25470 and -fcheck-pointer-bounds are used together.
25471 (indirect_thunk_prefix): New enum.
25472 (indirect_thunk_need_prefix): New function.
25473 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
25474 "_nt" instead of "_bnd" for NOTRACK prefix.
25475 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
25476 (output_indirect_thunk_function): Likewise.
25478 (ix86_code_end): Update output_indirect_thunk_function calls.
25479 (ix86_output_indirect_branch_via_reg): Replace
25480 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
25481 (ix86_output_indirect_branch_via_push): Likewise.
25482 (ix86_output_function_return): Likewise.
25483 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
25484 incompatible with -fcf-protection=branch and
25485 -fcheck-pointer-bounds.
25487 2018-02-22 Steve Ellcey <sellcey@cavium.com>
25490 * config/aarch64/aarch64.c (aarch64_print_address_internal):
25491 Change gcc_assert call to output_operand_lossage.
25493 2018-02-22 Steve Ellcey <sellcey@cavium.com>
25495 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
25497 2018-02-22 DJ Delorie <dj@redhat.com>
25498 Sebastian Perta <sebastian.perta@renesas.com>
25499 Oleg Endo <olegendo@gcc.gnu.org>
25501 * config/rx/rx.c (rx_rtx_costs): New function.
25502 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
25504 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
25506 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
25508 2018-02-22 Martin Liska <mliska@suse.cz>
25511 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
25512 Add "native" as a possible value.
25514 2018-02-22 Martin Liska <mliska@suse.cz>
25517 * config/i386/i386.c (ix86_option_override_internal):
25518 Add "native" as a possible value for -march and -mtune.
25520 2018-02-22 Jakub Jelinek <jakub@redhat.com>
25523 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
25524 to all type variants.
25526 PR tree-optimization/84503
25527 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
25528 width as info->bitpos + info->bitsize - start.
25529 (merged_store_group::merge_overlapping): Simplify width computation.
25530 (check_no_overlap): New function.
25531 (imm_store_chain_info::try_coalesce_bswap): Compute expected
25532 start + width and last_order of the group, fail if check_no_overlap
25534 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
25535 to group if check_no_overlap fails.
25537 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
25539 * config/rs6000/altivec.md: Delete contraint arguments to
25540 define_expand, define_split, and define_peephole2, and in
25541 define_insn_and_split if always unused.
25542 * config/rs6000/darwin.md: Ditto.
25543 * config/rs6000/dfp.md: Ditto.
25544 * config/rs6000/rs6000.md: Ditto.
25545 * config/rs6000/sync.md: Ditto.
25546 * config/rs6000/vector.md: Ditto.
25547 * config/rs6000/vsx.md: Ditto.
25549 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
25551 * config/rs6000/altivec.md: Write output control strings as braced
25552 blocks instead of double-quoted strings.
25553 * config/rs6000/darwin.md: Ditto.
25554 * config/rs6000/rs6000.md: Ditto.
25555 * config/rs6000/vector.md: Ditto.
25556 * config/rs6000/vsx.md: Ditto.
25558 2018-02-21 Jason Merrill <jason@redhat.com>
25560 PR c++/84314 - ICE with templates and fastcall attribute.
25561 * attribs.c (build_type_attribute_qual_variant): Remove assert.
25563 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
25565 * ipa-cp.c (determine_versionability): Fix comment typos.
25567 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
25570 * ipa-cp.c (determine_versionability): Do not version functions caling
25573 2018-02-21 Martin Liska <mliska@suse.cz>
25576 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
25577 Add "native" as a possible value.
25578 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
25579 the macro when native cpu detection is available.
25581 2018-02-21 Martin Liska <mliska@suse.cz>
25584 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
25585 Add "native" as a possible value.
25586 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
25587 when native cpu detection is available.
25589 2018-02-21 Jakub Jelinek <jakub@redhat.com>
25590 Martin Sebor <msebor@redhat.com>
25592 PR tree-optimization/84478
25593 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
25595 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
25596 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
25597 support which is conservatively correct, for 2 only stay conservative
25598 for maxlen. Formatting and comment capitalization fixes. Add STRICT
25599 argument to the 2 argument get_range_strlen, adjust 6 arg
25600 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
25602 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
25603 (gimple_fold_builtin_strlen): Pass true as last argument to
25606 2018-02-20 Martin Sebor <msebor@redhat.com>
25608 PR middle-end/84095
25609 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
25610 (builtin_memref::set_base_and_offset): Same. Handle inner references.
25611 (builtin_memref::builtin_memref): Factor out parts into
25612 set_base_and_offset and call it.
25614 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
25616 PR middle-end/84406
25617 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
25618 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
25619 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
25620 search at the associated MODE_INT.
25622 2018-02-20 Jeff Law <law@redhat.com>
25624 PR middle-end/82123
25625 PR tree-optimization/81592
25626 PR middle-end/79257
25627 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
25628 for range data rather than using global data.
25629 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
25630 range data rather than using global data.
25631 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
25632 pass it to children as needed.
25633 (struct directive::fmtresult): Similarly.
25634 (struct directive::set_width): Similarly.
25635 (struct directive::set_precision): Similarly.
25636 (format_integer, format_directive, parse_directive): Similarly.
25637 (format_none): Accept unnamed vr_values parameter.
25638 (format_percent, format_floating, format_character): Similarly.
25639 (format_string, format_plain): Similarly.
25640 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
25641 the EVRP range analyzer for range data rather than using global data.
25642 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
25643 gimple-ssa-evrp-analyze.h
25644 (class sprintf_dom_walker): Add after_dom_children member function.
25645 Add evrp_range_analyzer member.
25646 (sprintf_dom_walker::before_dom_children): Call into the EVRP
25647 range analyzer as needed.
25648 (sprintf_dom_walker::after_dom_children): New member function.
25649 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
25651 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
25652 (evrp_range_analyzer::pop_to_marker): Likewise.
25654 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
25656 PR tree-optimization/84419
25657 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
25658 with the required type if its current type is compatible but
25661 2018-02-20 Jakub Jelinek <jakub@redhat.com>
25663 PR middle-end/82004
25664 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
25665 after vectorization.
25667 2018-02-20 Martin Liska <mliska@suse.cz>
25670 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
25671 possible values if we don't have a hint.
25673 2018-02-20 Martin Liska <mliska@suse.cz>
25677 * final.c (shorten_branches): Build align_tab array with one
25679 * opts.c (finish_options): Add alignment option limit check.
25680 (MAX_CODE_ALIGN): Likewise.
25681 (MAX_CODE_ALIGN_VALUE): Likewise.
25682 * doc/invoke.texi: Document maximum allowed option value for
25683 all -falign-* options.
25685 2018-02-19 Jakub Jelinek <jakub@redhat.com>
25688 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
25689 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
25690 * var-tracking.c (emit_note_insn_var_location): Remove all references
25691 to NOTE_INSN_CALL_ARG_LOCATION.
25692 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
25693 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
25694 Use copy_rtx_if_shared.
25695 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
25696 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
25697 (dwarf2out_var_location): Remove handling of
25698 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
25700 * final.c (final_scan_insn): Remove all references to
25701 NOTE_INSN_CALL_ARG_LOCATION.
25702 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
25703 before dumping final insns.
25704 * except.c (emit_note_eh_region_end): Remove all references to
25705 NOTE_INSN_CALL_ARG_LOCATION.
25706 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
25707 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
25708 * config/arc/arc.c (hwloop_optimize): Likewise.
25709 * config/arm/arm.c (create_fix_barrier): Likewise.
25710 * config/s390/s390.c (s390_chunkify_start): Likewise.
25711 * config/sh/sh.c (find_barrier): Likewise.
25712 * config/i386/i386.c (rest_of_insert_endbranch,
25713 ix86_seh_fixup_eh_fallthru): Likewise.
25714 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
25715 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
25716 * config/frv/frv.c (frv_function_prologue): Likewise.
25717 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
25719 (note_outside_basic_block_p): Remove all references to
25720 NOTE_INSN_CALL_ARG_LOCATION.
25721 * gengtype.c (adjust_field_rtx_def): Likewise.
25722 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
25724 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
25725 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
25728 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
25731 PR tree-optimization/84452
25732 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
25733 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
25736 2018-02-19 Martin Liska <mliska@suse.cz>
25739 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
25741 2018-02-19 Martin Liska <mliska@suse.cz>
25742 Richard Sandiford <richard.sandiford@linaro.org>
25744 PR tree-optimization/82491
25745 * gimple-fold.c (get_base_constructor): Make earlier bail out
25748 2018-02-19 Carl Love <cel@us.ibm.com>
25750 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
25751 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
25753 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
25754 P8V_BUILTIN_VEC_NEG.
25756 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
25758 * config/rl78/rl78.md (movdf): New define expand.
25760 2018-02-19 Martin Liska <mliska@suse.cz>
25763 * doc/invoke.texi: Fix typo.
25764 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
25766 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
25768 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
25769 handle rs6000_single_float and rs6000_double_float specially for
25772 2018-02-16 Jeff Law <law@redhat.com>
25774 * config/rx/rx.c (add_pop_cfi_notes): New function.;
25775 (pop_regs): Use it.
25777 2018-02-16 Jakub Jelinek <jakub@redhat.com>
25780 * ipa-inline.c (inline_small_functions): Fix a typo.
25782 2018-02-16 Nathan Sidwell <nathan@acm.org>
25784 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
25786 2018-02-16 Carl Love <cel@us.ibm.com>
25788 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
25789 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
25790 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
25791 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
25792 expansion to P8V_BUILTIN_VEC_FLOAT2.
25794 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
25796 PR rtl-optimization/70023
25797 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
25798 src_regno into account.
25800 2018-02-16 Carl Love <cel@us.ibm.com>
25802 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
25803 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
25804 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
25805 * config/rs6000/rs6000.c: Remove case statements for
25806 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
25807 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
25808 and P9V_BUILTIN_VEC_VINSERT4B.
25809 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
25810 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
25811 * config/rs6000/vsx.md:
25812 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
25815 2018-02-16 Carl Love <cel@us.ibm.com>
25817 * config/rs6000/altivec.h: Add builtin names vec_extract4b
25819 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
25821 * config/rs6000/rs6000-c.c: Add the definitions for
25822 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
25823 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
25824 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
25825 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
25826 definition for insert4b and define insn *insert3b_internal.
25827 * doc/extend.texi: Add documentation for vec_extract4b.
25829 2018-02-16 Nathan Sidwell <nathan@acm.org>
25831 * doc/extend.texi (Backwards Compatibility): Mention friend
25832 injection. Note for-scope is deprecated.
25833 * doc/invoke.texi (-ffriend-injection): Deprecate.
25835 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
25837 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
25838 that moved to I2, also allow destinations that are a paradoxical
25839 subreg (instead of a normal reg).
25841 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
25844 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
25847 2018-02-16 Richard Biener <rguenther@suse.de>
25849 PR tree-optimization/84037
25850 PR tree-optimization/84016
25852 * config/i386/i386.c (ix86_builtin_vectorization_cost):
25853 Adjust vec_construct for the fact we need additional higher latency
25854 128bit inserts for AVX256 and AVX512 vector builds.
25855 (ix86_add_stmt_cost): Scale vector construction cost for
25858 2018-02-16 Richard Biener <rguenther@suse.de>
25860 PR tree-optimization/84417
25861 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
25862 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
25863 (non_rewritable_lvalue_p): Likewise, use poly-ints.
25865 2018-02-16 Martin Liska <mliska@suse.cz>
25868 * internal-fn.def (ASAN_CHECK): Set proper flags.
25869 (ASAN_MARK): Likewise.
25871 2018-02-16 Julia Koval <julia.koval@intel.com>
25873 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
25874 from PTA_CANNONLAKE.
25876 2018-02-16 Jakub Jelinek <jakub@redhat.com>
25879 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
25880 Use ++iter rather than iter++ for std::list iterators.
25881 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
25882 defer deleting them until all nodes in the forest are processed. Do
25883 free even leaf nodes. Change to_process into auto_vec.
25886 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
25887 * vec.h (vec_default_construct): Use memset instead of placement new
25888 if BROKEN_VALUE_INITIALIZATION is defined.
25889 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
25890 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
25893 PR rtl-optimization/83723
25894 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
25895 * lra.c (lra_substitute_pseudo): Likewise. If true, use
25896 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
25898 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
25900 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
25902 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
25904 PR rtl-optimization/81443
25905 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
25906 from inner REGs to paradoxical SUBREGs.
25908 2018-02-16 Richard Biener <rguenther@suse.de>
25910 PR tree-optimization/84399
25911 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
25912 For operands we can analyze at their definition make sure we can
25913 analyze them at each use as well.
25915 2018-02-16 Richard Biener <rguenther@suse.de>
25917 PR tree-optimization/84190
25918 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
25919 volatile accesses if the decl isn't volatile.
25921 2018-02-15 Jason Merrill <jason@redhat.com>
25923 PR c++/84314 - ICE with templates and fastcall attribute.
25924 * attribs.c (build_type_attribute_qual_variant): Don't clobber
25925 TYPE_CANONICAL on an existing type.
25927 2018-02-15 Jakub Jelinek <jakub@redhat.com>
25929 PR tree-optimization/84383
25930 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
25931 dstoff nor call operand_equal_p if dstbase is NULL.
25933 PR tree-optimization/84334
25934 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
25935 also a CONSTANT_CLASS_P, punt.
25937 2018-02-14 Jim Wilson <jimw@sifive.com>
25939 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
25940 first SMALL_OPERAND check. New local min_second_step. Move assert
25941 to where locals are set. Add TARGET_RVC support.
25942 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
25944 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
25946 * doc/invoke.texi: Correct -Wformat-overflow code sample.
25948 2018-02-14 Martin Sebor <msebor@redhat.com>
25950 PR tree-optimization/83698
25951 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
25952 arrays constrain the offset range to their bounds.
25953 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
25954 (builtin_access::overlap): Avoid setting the size of overlap if it's
25956 (maybe_diag_overlap): Also consider arrays when deciding what values
25957 of offsets to include in diagnostics.
25959 2018-02-14 Martin Sebor <msebor@redhat.com>
25962 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
25963 that correspond to the kind of a declaration.
25965 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
25968 * config/pa/pa.md: Load address of PIC label using the linkage table
25969 if the label is nonlocal.
25971 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
25973 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
25974 warning message if user requests -maltivec=be.
25975 * doc/invoke.texi: Document deprecation of -maltivec=be.
25977 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
25980 * config/rs6000/rs6000-c.c: Update definitions for
25981 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
25982 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
25984 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
25987 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
25988 add _get_ssp intrinsics. Remove argument from
25989 __builtin_ia32_rdssp[d|q].
25990 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
25991 * config/i386/i386-builtin.def: Remove argument from
25992 __builtin_ia32_rdssp[d|q].
25993 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
25994 ix86_expand_special_args_builtin for _rdssp[d|q].
25995 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
25996 Clear register before usage.
25997 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
25998 Add documentation for new _get_ssp and _inc_ssp intrinsics.
26000 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
26002 PR tree-optimization/84357
26003 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
26004 operand 1 of an ARRAY_REF too.
26006 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
26009 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
26010 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
26012 (set_of_reg): New struct.
26013 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
26014 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
26015 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
26017 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
26018 Split into bitclr, bitset, bitinvert patterns if appropriate.
26019 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
26020 use rx_fuse_in_memory_bitop.
26021 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
26022 to named insn, correct maximum insn length.
26024 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
26027 * machmode.def: Define a complex mode for PARTIAL_INT.
26028 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
26030 * doc/rtl.texi: Document CSPImode.
26031 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
26033 (msp430_hard_regno_nregs_with_padding): Likewise.
26035 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
26038 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
26040 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
26042 PR rtl-optimization/84169
26043 * combine.c (try_combine): New variable split_i2i3. Set it to true if
26044 we generated a parallel as new i3 and we split that to new i2 and i3
26045 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
26046 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
26047 those to i2, not i1. Partially rewrite this scan code.
26049 2018-02-13 Jakub Jelinek <jakub@redhat.com>
26052 * stor-layout.c (place_field): For variable length fields, adjust
26053 offset_align afterwards not just based on the field's alignment,
26054 but also on the size.
26056 PR middle-end/84309
26057 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
26058 of exps and logs in the use_exp2 case.
26060 2018-02-13 Jeff Law <law@redhat.com>
26062 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
26063 entry for "vector".
26065 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
26068 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
26072 * common.opt (gas-loc-support, gas-locview-support): New.
26073 (ginline-points, ginternal-reset-location-views): New.
26074 * doc/invoke.texi: Document them. Use @itemx where intended.
26075 (gvariable-location-views): Adjust.
26076 * target.def (reset_location_view): New.
26077 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
26078 (TARGET_RESET_LOCATION_VIEW): New.
26079 * doc/tm.texi: Rebuilt.
26080 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
26081 (dwarf2out_default_as_locview_support): New.
26082 (output_asm_line_debug_info): Use option variables.
26083 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
26084 (output_loc_list): Likewise.
26085 (add_high_low_attributes): Check option variables.
26086 Don't output entry view attribute in strict mode.
26087 (gen_inlined_subroutine_die): Check option variables.
26088 (dwarf2out_inline_entry): Likewise.
26089 (init_sections_and_labels): Likewise.
26090 (dwarf2out_early_finish): Likewise.
26091 (maybe_reset_location_view): New, from...
26092 (dwarf2out_var_location): ... here. Call it.
26093 * debug.h (dwarf2out_default_as_loc_support): Declare.
26094 (dwarf2out_default_as_locview_support): Declare.
26095 * hooks.c (hook_int_rtx_insn_0): New.
26096 * hooks.h (hook_int_rtx_insn_0): Declare.
26097 * toplev.c (process_options): Take -gas-loc-support and
26098 -gas-locview-support from dwarf2out. Enable
26099 -gvariable-location-views by default only with locview
26100 assembler support. Enable -ginternal-reset-location-views by
26101 default only if the target defines the corresponding hook.
26102 Enable -ginline-points by default if location views are
26103 enabled; force it disabled if statement frontiers are
26105 * tree-inline.c (expand_call_inline): Check option variables.
26106 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
26108 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
26110 PR tree-optimization/84321
26111 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
26112 handling. Also check whether the anti-range contains any values
26113 that satisfy the mask; switch to a VR_RANGE if not.
26115 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
26118 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
26120 2018-02-13 Martin Jambor <mjambor@suse.cz>
26123 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
26124 of call statements, also set location of a load to a temporary.
26126 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
26128 * config/rl78/rl78.c (add_vector_labels): New function.
26129 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
26130 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
26131 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
26132 which checks that no arguments are passed.
26133 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
26134 * doc/extend.texi: Documentation for the new attribute.
26136 2018-02-13 Andreas Schwab <schwab@suse.de>
26138 * config/riscv/linux.h (CPP_SPEC): Define.
26140 2018-02-13 Jakub Jelinek <jakub@redhat.com>
26143 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
26144 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
26145 OPTION_MASK_ISA_AES as first argument to def_builtin_const
26146 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
26147 instead of OPTION_MASK_ISA_PCLMUL as first argument to
26148 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
26149 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
26150 temporarily for AES and PCLMUL builtins.
26152 PR tree-optimization/84339
26153 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
26154 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
26157 PR middle-end/84309
26158 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
26159 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
26160 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
26162 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
26164 * omp-simd-clone.h: New file.
26165 * omp-simd-clone.c: Include omp-simd-clone.h.
26166 (expand_simd_clones): No longer static.
26167 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
26168 cgraph.h and omp-simd-clone.h.
26169 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
26170 (vect_recog_widen_shift_pattern): Formatting fix.
26171 (vect_pattern_recog_1): Don't check optab for calls.
26174 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
26175 operands[2] into a REG before using gen_lowpart on it.
26177 2018-02-12 Jeff Law <law@redhat.com>
26180 * config/sh/sh.c (find_barrier): Consider a sibling call
26183 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
26184 successfully back substituting a reg.
26186 2018-02-12 Richard Biener <rguenther@suse.de>
26188 PR tree-optimization/84037
26189 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
26190 parameter, move visited init to caller.
26191 (vect_slp_analyze_operations): Separate cost from validity
26192 check, initialize visited once for all instances.
26193 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
26195 * tree-vect-stmts.c (vect_model_simple_cost): Make early
26197 (vect_model_promotion_demotion_cost): Likewise.
26198 (vectorizable_bswap): Guard cost modeling with !slp_node
26199 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
26201 (vectorizable_call): Likewise.
26202 (vectorizable_conversion): Likewise.
26203 (vectorizable_assignment): Likewise.
26204 (vectorizable_shift): Likewise.
26205 (vectorizable_operation): Likewise.
26206 (vectorizable_store): Likewise.
26207 (vectorizable_load): Likewise.
26208 (vectorizable_condition): Likewise.
26209 (vectorizable_comparison): Likewise.
26211 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
26214 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
26215 (ASAN_MARK): Fix fnspec to account for return value, change pointer
26216 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
26218 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
26220 PR middle-end/83665
26221 * params.def (inline-min-speedup): Increase from 8 to 15.
26222 (max-inline-insns-auto): Decrease from 40 to 30.
26223 * ipa-split.c (consider_split): Add some buffer for function to
26224 be considered inlining candidate.
26225 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
26228 2018-02-12 Richard Biener <rguenther@suse.de>
26230 PR tree-optimization/84037
26231 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
26232 matched stmts if we cannot swap the non-matched ones.
26234 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
26236 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
26237 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
26238 _mm_maskz_scalef_round_ss): New intrinsics.
26239 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
26240 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
26241 __builtin_ia32_scalefss_round): Remove.
26242 (__builtin_ia32_scalefsd_mask_round,
26243 __builtin_ia32_scalefss_mask_round): New intrinsics.
26244 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
26245 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
26246 ((match_operand:VF_128 2 "<round_nimm_predicate>"
26247 "<round_constraint>")): Changed to ...
26248 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
26249 "<round_scalar_constraint>")): ... this.
26250 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
26251 %0, %1, %2<round_op3>}"): Changed to ...
26252 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
26253 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
26254 %2<round_scalar_mask_op3>}"): ... this.
26255 * config/i386/subst.md (round_scalar_nimm_predicate): New.
26257 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
26259 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
26260 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
26261 (_mm_maskz_sqrt_round_ss): New intrinsics.
26262 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
26263 (__builtin_ia32_sqrtsd_mask_round)
26264 (__builtin_ia32_sqrtss_mask_round): New builtins.
26265 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
26266 (__builtin_ia32_sqrtss_round): Remove.
26267 (__builtin_ia32_sqrtsd_mask_round)
26268 (__builtin_ia32_sqrtss_mask_round): New builtins.
26269 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
26270 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
26271 ((match_operand:VF_128 1 "vector_operand"
26272 "xBm,<round_constraint>")): Changed to ...
26273 ((match_operand:VF_128 1 "vector_operand"
26274 "xBm,<round_scalar_constraint>")): ... this.
26275 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
26276 %0, %2, %<iptr>1<round_op3>}): Changed to ...
26277 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
26278 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
26279 %<iptr>1<round_scalar_mask_op3>}): ... this.
26280 ((set_attr "prefix" "<round_prefix>")): Changed to ...
26281 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
26283 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
26286 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
26287 Cast vec_cmpeq result to correct type.
26288 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
26289 Cast vec_cmpgt result to correct type.
26291 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
26293 * final.c (final_scan_insn_1): Renamed from...
26294 (final_scan_insn): ... this. New wrapper, to recover
26295 seen from the outermost call in recursive ones.
26296 * config/sparc/sparc.c (output_return): Drop seen from call.
26297 (output_sibcall): Likewise.
26298 * config/visium/visium.c (output_branch): Likewise.
26300 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
26302 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
26305 2018-02-10 Alan Modra <amodra@gmail.com>
26308 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
26309 Specify LR as an input.
26311 2018-02-10 Jakub Jelinek <jakub@redhat.com>
26314 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
26315 remove_member_access_dummy_vars): New functions.
26316 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
26317 lower_omp_1, execute_lower_omp): Use them.
26319 PR rtl-optimization/84308
26320 * shrink-wrap.c (spread_components): Release todo vector.
26322 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
26324 PR rtl-optimization/57193
26325 * ira-color.c (struct allocno_color_data): Add member
26326 conflict_allocno_hard_prefs.
26327 (update_conflict_allocno_hard_prefs): New.
26328 (bucket_allocno_compare_func): Add a preference based on
26329 conflict_allocno_hard_prefs.
26330 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
26331 (color_allocnos): Remove a dead code. Initiate
26332 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
26334 2018-02-09 Jakub Jelinek <jakub@redhat.com>
26337 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
26338 constraint from =wa to wa. Avoid a subreg on the output operand,
26339 instead use a pseudo and subreg it in a move.
26340 (p9_xxbrd_<mode>): Changed to ...
26341 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
26342 (p9_xxbrd_v2df): New expander.
26343 (p9_xxbrw_<mode>): Changed to ...
26344 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
26345 (p9_xxbrw_v4sf): New expander.
26347 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
26349 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
26351 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
26354 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
26355 multiply in 32-bit mode.
26356 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
26357 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
26360 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
26362 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
26363 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
26364 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
26365 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
26367 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
26370 * dwarf2out.c (is_trivial_indirect_ref): New function.
26371 (dwarf2out_late_global_decl): Do not generate a location
26372 attribute for variables that have a non-trivial DECL_VALUE_EXPR
26373 and that are not defined in the current unit.
26375 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
26377 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
26378 instead of a libcall for UNORDERED.
26380 2018-02-09 Tamar Christina <tamar.christina@arm.com>
26383 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
26384 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
26386 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
26389 * config/s390/s390.c (s390_set_current_function): Invoke
26390 s390_indirect_branch_settings also if fndecl didn't change.
26392 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
26394 * config/rs6000/rs6000.md (blockage): Set length to zero.
26396 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
26398 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
26400 2018-02-09 Jakub Jelinek <jakub@redhat.com>
26403 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
26404 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
26408 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
26409 PARALLEL incoming that failed vt_get_decl_and_offset check.
26411 PR middle-end/84237
26412 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
26413 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
26415 (get_variable_section): For decls in named .bss* sections pass true as
26416 second argument to bss_initializer_p.
26418 2018-02-09 Marek Polacek <polacek@redhat.com>
26419 Jakub Jelinek <jakub@redhat.com>
26422 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
26423 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
26424 Sync some changes from cxx_fold_indirect_ref.
26426 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
26428 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
26430 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
26431 (BLOCK_INLINE_ENTRY_LABEL): New.
26432 (dwarf2out_var_location): Disregard inline entry markers.
26433 (inline_entry_data): New struct.
26434 (inline_entry_data_hasher): New hashtable type.
26435 (inline_entry_data_hasher::hash): New.
26436 (inline_entry_data_hasher::equal): New.
26437 (inline_entry_data_table): New variable.
26438 (add_high_low_attributes): Add DW_AT_entry_pc and
26439 DW_AT_GNU_entry_view attributes if a pending entry is found
26440 in inline_entry_data_table. Add old entry_pc attribute only
26441 if debug nonbinding markers are disabled.
26442 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
26443 markers are enabled.
26444 (block_within_block_p, dwarf2out_inline_entry): New.
26445 (dwarf2out_finish): Check that no entries remained in
26446 inline_entry_data_table.
26447 * final.c (reemit_insn_block_notes): Handle inline entry notes.
26448 (final_scan_insn, notice_source_line): Likewise.
26449 (rest_of_clean_state): Skip inline entry markers.
26450 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
26452 * gimple.c (gimple_build_debug_inline_entry): New.
26453 * gimple.h (enum gimple_debug_subcode): Add
26454 GIMPLE_DEBUG_INLINE_ENTRY.
26455 (gimple_build_debug_inline_entry): Declare.
26456 (gimple_debug_inline_entry_p): New.
26457 (gimple_debug_nonbind_marker_p): Adjust.
26458 * insn-notes.def (INLINE_ENTRY): New.
26459 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
26460 inline entry marker notes.
26461 (print_insn): Likewise.
26462 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
26463 (INSN_DEBUG_MARKER_KIND): Likewise.
26464 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
26465 * tree-inline.c (expand_call_inline): Build and insert
26466 debug_inline_entry stmt.
26467 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
26468 inline entry blocks early, if nonbind markers are enabled.
26469 (dump_scope_block): Dump fragment info.
26470 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
26471 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
26472 (gimple_build_debug_inline_entry): New.
26473 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
26474 Enable/disable inline entry points too.
26475 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
26476 (DEBUG_INSN): Describe inline entry markers.
26478 * common.opt (gvariable-location-views): New.
26479 (gvariable-location-views=incompat5): New.
26480 * config.in: Rebuilt.
26481 * configure: Rebuilt.
26482 * configure.ac: Test assembler for view support.
26483 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
26484 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
26485 * dwarf2out.c (var_loc_view): New typedef.
26486 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
26487 (dwarf2out_locviews_in_attribute): New.
26488 (dwarf2out_locviews_in_loclist): New.
26489 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
26490 (enum dw_line_info_opcode): Add LI_adv_address.
26491 (struct dw_line_info_table): Add view.
26492 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
26493 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
26494 (zero_view_p): New variable.
26495 (ZERO_VIEW_P): New macro.
26496 (output_asm_line_debug_info): New.
26497 (struct var_loc_node): Add view.
26498 (add_AT_view_list, AT_loc_list): New.
26499 (add_var_loc_to_decl): Add view param. Test it against last.
26500 (new_loc_list): Add view params. Record them.
26501 (AT_loc_list_ptr): Handle loc and view lists.
26502 (view_list_to_loc_list_val_node): New.
26503 (print_dw_val): Handle dw_val_class_view_list.
26504 (size_of_die): Likewise.
26505 (value_format): Likewise.
26506 (loc_list_has_views): New.
26507 (gen_llsym): Set vl_symbol too.
26508 (maybe_gen_llsym, skip_loc_list_entry): New.
26509 (dwarf2out_maybe_output_loclist_view_pair): New.
26510 (output_loc_list): Output view list or entries too.
26511 (output_view_list_offset): New.
26512 (output_die): Handle dw_val_class_view_list.
26513 (output_dwarf_version): New.
26514 (output_compilation_unit_header): Use it.
26515 (output_skeleton_debug_sections): Likewise.
26516 (output_rnglists, output_line_info): Likewise.
26517 (output_pubnames, output_aranges): Update version comments.
26518 (output_one_line_info_table): Output view numbers in asm comments.
26519 (dw_loc_list): Determine current endview, pass it to new_loc_list.
26520 Call maybe_gen_llsym.
26521 (loc_list_from_tree_1): Adjust.
26522 (add_AT_location_description): Create view list attribute if
26523 needed, check it's absent otherwise.
26524 (convert_cfa_to_fb_loc_list): Adjust.
26525 (maybe_emit_file): Call output_asm_line_debug_info for test.
26526 (dwarf2out_var_location): Reset views as needed. Precompute
26527 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
26528 attribute. Set view.
26529 (new_line_info_table): Reset next view.
26530 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
26531 (dwarf2out_source_line): Likewise. Output view resets and labels to
26532 the assembler, or select appropriate line info opcodes.
26533 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
26534 (optimize_string_length): Catch it. Adjust.
26535 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
26536 dw_val_class_view_list, and remove it if no longer needed.
26537 (hash_loc_list): Hash view numbers.
26538 (loc_list_hasher::equal): Compare them.
26539 (optimize_location_lists): Check whether a view list symbol is
26540 needed, and whether the locview attribute is present, and
26541 whether they match. Remove the locview attribute if no longer
26543 (index_location_lists): Call skip_loc_list_entry for test.
26544 (dwarf2out_finish): Call output_asm_line_debug_info for test.
26545 Use output_dwarf_version.
26546 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
26547 (struct dw_val_node): Add val_view_list.
26548 * final.c (SEEN_NEXT_VIEW): New.
26549 (set_next_view_needed): New.
26550 (clear_next_view_needed): New.
26551 (maybe_output_next_view): New.
26552 (final_start_function): Rename to...
26553 (final_start_function_1): ... this. Take pointer to FIRST,
26554 add SEEN parameter. Emit param bindings in the initial view.
26555 (final_start_function): Reintroduce SEEN-less interface.
26556 (final): Rename to...
26557 (final_1): ... this. Take SEEN parameter. Output final pending
26558 next view at the end.
26559 (final): Reintroduce seen-less interface.
26560 (final_scan_insn): Output pending next view before switching
26561 sections or ending a block. Mark the next view as needed when
26562 outputting variable locations. Notify debug backend of section
26563 changes, and of location view changes.
26564 (rest_of_handle_final): Adjust.
26565 * toplev.c (process_options): Autodetect value for debug variable
26566 location views option. Warn on incompat5 without -gdwarf-5.
26567 * doc/invoke.texi (gvariable-location-views): New.
26568 (gvariable-location-views=incompat5): New.
26569 (gno-variable-location-views): New.
26571 2018-02-08 David Malcolm <dmalcolm@redhat.com>
26573 PR tree-optimization/84136
26574 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
26575 that the result of find_edge is non-NULL.
26577 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
26580 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
26581 storing integer register in SImode. Fix cost of 256 and 512
26582 byte aligned SSE register store.
26584 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
26586 * config/i386/i386.c (ix86_multiplication_cost): Fix
26587 multiplication cost for TARGET_AVX512DQ.
26589 2018-02-08 Marek Polacek <polacek@redhat.com>
26591 PR tree-optimization/84238
26592 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
26595 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
26597 PR tree-optimization/84265
26598 * tree-vect-stmts.c (vectorizable_store): Don't treat
26599 VMAT_CONTIGUOUS accesses as grouped.
26600 (vectorizable_load): Likewise.
26602 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
26604 PR tree-optimization/81635
26605 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
26606 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
26607 (test_round_for_mask): New functions.
26608 (wide_int_cc_tests): Call test_round_for_mask.
26609 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
26610 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
26611 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
26612 range returned by get_range_info.
26614 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
26617 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
26618 * symtab.c: Include builtins.h
26619 (symtab_node::output_to_lto_symbol_table_p): Move here
26620 from lto-streamer-out.c:output_symbol_p.
26621 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
26622 (output_symbol_p): Move all logic to symtab.c
26623 (produce_symtab): Update.
26625 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
26627 * config/s390/s390-opts.h (enum indirect_branch): Define.
26628 * config/s390/s390-protos.h (s390_return_addr_from_memory)
26629 (s390_indirect_branch_via_thunk)
26630 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
26631 (enum s390_indirect_branch_type): Define.
26632 * config/s390/s390.c (struct s390_frame_layout, struct
26633 machine_function): Remove.
26634 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
26635 (indirect_branch_table_label_no, indirect_branch_table_name):
26637 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
26638 (enum s390_indirect_branch_option): Define.
26639 (s390_return_addr_from_memory): New function.
26640 (s390_handle_string_attribute): New function.
26641 (s390_attribute_table): Add new attribute handler.
26642 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
26643 (s390_indirect_branch_via_thunk): New function.
26644 (s390_indirect_branch_via_inline_thunk): New function.
26645 (s390_function_ok_for_sibcall): When jumping via thunk disallow
26646 sibling call optimization for non z10 compiles.
26647 (s390_emit_call): Force indirect branch target to be a single
26648 register. Add r1 clobber for non-z10 compiles.
26649 (s390_emit_epilogue): Emit return jump via return_use expander.
26650 (s390_reorg): Handle JUMP_INSNs as execute targets.
26651 (s390_option_override_internal): Perform validity checks for the
26652 new command line options.
26653 (s390_indirect_branch_attrvalue): New function.
26654 (s390_indirect_branch_settings): New function.
26655 (s390_set_current_function): Invoke s390_indirect_branch_settings.
26656 (s390_output_indirect_thunk_function): New function.
26657 (s390_code_end): Implement target hook.
26658 (s390_case_values_threshold): Implement target hook.
26659 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
26661 * config/s390/s390.h (struct s390_frame_layout)
26662 (struct machine_function): Move here from s390.c.
26663 (TARGET_INDIRECT_BRANCH_NOBP_RET)
26664 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
26665 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
26666 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
26667 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
26668 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
26669 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
26670 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
26671 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
26672 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
26673 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
26674 (mnemonic attribute): Add values which aren't recognized
26676 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
26677 pattern for branch conversion. Fix mnemonic attribute.
26678 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
26679 indirect branch via thunk if requested.
26680 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
26681 ("*indirect_jump"): Disable for branch conversion using out of
26683 ("indirect_jump_via_thunk<mode>_z10")
26684 ("indirect_jump_via_thunk<mode>")
26685 ("indirect_jump_via_inlinethunk<mode>_z10")
26686 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
26687 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
26688 ("casesi_jump_via_inlinethunk<mode>_z10")
26689 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
26690 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
26691 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
26692 ("*indirect2_jump"): Disable for branch conversion.
26693 ("casesi_jump"): Turn into expander and expand patterns for branch
26695 ("return_use"): New expander.
26696 ("*return"): Emit return via thunk and rename it to ...
26697 ("*return<mode>"): ... this one.
26698 * config/s390/s390.opt: Add new options and and enum for the
26701 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
26703 * lra-constraints.c (match_reload): Unconditionally use
26704 gen_lowpart_SUBREG, rather than selecting between that
26705 and equivalent gen_rtx_SUBREG code.
26707 2018-02-08 Richard Biener <rguenther@suse.de>
26709 PR tree-optimization/84233
26710 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
26711 changed flag instead of boguously re-using phi_inserted.
26713 2018-02-08 Martin Jambor <mjambor@suse.cz>
26715 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
26716 static local variables.
26718 2018-02-08 Richard Biener <rguenther@suse.de>
26720 PR tree-optimization/84278
26721 * tree-vect-stmts.c (vectorizable_store): When looking for
26722 smaller vector types to perform grouped strided loads/stores
26723 make sure the mode is supported by the target.
26724 (vectorizable_load): Likewise.
26726 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
26728 * config/aarch64/aarch64.c (aarch64_components_for_bb):
26729 Increase LDP/STP opportunities by adding adjacent callee-saves.
26731 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
26733 PR rtl-optimization/84068
26734 PR rtl-optimization/83459
26735 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
26737 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
26739 PR tree-optimization/84224
26740 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
26741 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
26742 non-zero arguments.
26744 2018-02-07 Iain Sandoe <iain@codesourcery.com>
26747 * config/rs6000/altivec.md (*restore_world): Remove LR use.
26748 * config/rs6000/predicates.md (restore_world_operation): Adjust op
26749 count, remove one USE.
26751 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
26753 * doc/install.texi (Configuration): Document the
26754 --with-long-double-format={ibm,ieee} PowerPC configuration
26758 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
26759 Convert from define_expand to be define_insn_and_split. Rework
26760 float/double/_Float128 conversions to QI/HI/SImode to work with
26761 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
26762 conversions to QI/HImode types did a store and then a load to
26763 truncate the value. For conversions to VSX registers, don't split
26764 the insn, instead emit the code directly. Use the code iterator
26765 any_fix to combine signed and unsigned conversions.
26766 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
26767 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
26768 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
26769 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
26770 (fix_<mode>di2_hw): Likewise.
26771 (fixuns_<mode>di2_hw): Likewise.
26772 (fix_<mode>si2_hw): Likewise.
26773 (fixuns_<mode>si2_hw): Likewise.
26774 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
26775 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
26776 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
26777 fix<uns>_trunc<SFDF:mode>si2_p8.
26778 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
26779 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
26780 (fix<uns>_<mode>_mem): Likewise.
26781 (fctiw<u>z_<mode>_mem): Likewise.
26782 (fix<uns>_<mode>_mem): Likewise.
26783 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
26784 the register allocator from doing a direct move to the GPRs to do
26785 a store, and instead use the ISA 3.0 store byte/half-word from
26786 vector register instruction. For IEEE 128-bit floating point,
26787 also optimize stores of 32-bit ints.
26788 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
26790 2018-02-07 Alan Hayward <alan.hayward@arm.com>
26792 * genextract.c (push_pathstr_operand): New function to support
26794 (walk_rtx): Call push_pathstr_operand.
26795 (print_path): Support [a-zA-Z].
26797 2018-02-07 Richard Biener <rguenther@suse.de>
26799 PR tree-optimization/84037
26800 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
26801 (cse_and_gimplify_to_preheader): Declare.
26802 (vect_get_place_in_interleaving_chain): Likewise.
26803 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
26805 (_loop_vec_info::~_loop_vec_info): Delete it.
26806 (cse_and_gimplify_to_preheader): New function.
26807 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
26808 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
26809 (vectorizable_load): Likewise. For grouped stores always base
26810 the IV on the first element.
26811 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
26812 condition before gimplifying.
26814 2018-02-07 Jakub Jelinek <jakub@redhat.com>
26816 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
26817 *DIV_EXPR and *MOD_EXPR.
26819 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
26822 * config/i386/i386.c (ix86_option_override_internal): Mask out
26823 the CF_SET bit when checking -fcf-protection.
26825 2018-02-07 Tom de Vries <tom@codesourcery.com>
26828 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
26831 2018-02-07 Richard Biener <rguenther@suse.de>
26833 PR tree-optimization/84204
26834 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
26837 PR tree-optimization/84205
26838 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
26839 special-case isl_ast_op_zdiv_r.
26841 PR tree-optimization/84223
26842 * graphite-scop-detection.c (gather_bbs::before_dom_children):
26843 Only add conditions from within the region.
26844 (gather_bbs::after_dom_children): Adjust.
26846 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
26849 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
26850 * config/avr/avr.md: Only post-reload split REG-REG moves if
26851 either register is GENERAL_REG_P.
26853 2018-02-07 Jakub Jelinek <jakub@redhat.com>
26855 PR tree-optimization/84235
26856 * tree-ssa-scopedtables.c
26857 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
26858 if the subtraction is performed in floating point type where NaNs are
26859 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
26860 build 1. Formatting fix.
26862 2018-02-06 Jakub Jelinek <jakub@redhat.com>
26865 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
26866 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
26867 and skip it regardless of bb boundaries. Use CALL_P macro,
26868 don't test INSN_P (insn) together with CALL_P or JUMP_P check
26869 unnecessarily, formatting fix.
26871 2018-02-06 Michael Collison <michael.collison@arm.com>
26873 * config/arm/thumb2.md:
26874 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
26875 (*thumb_mov_notscc): Ditto.
26877 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
26880 * config/rs6000/rs6000.md (su code attribute): Use "u" for
26881 unsigned_fix, not "s".
26883 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
26885 * configure.ac (gcc_fn_eh_frame_ro): New function.
26886 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
26887 correct .eh_frame permissions.
26888 * configure: Regenerate.
26890 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
26892 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
26893 irrelevant options.
26895 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
26897 * config/rs6000/rs6000.c (rs6000_option_override_internal):
26898 Display warning message for -mno-speculate-indirect-jumps.
26900 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
26902 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
26904 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
26906 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
26908 PR tree-optimization/84225
26909 * tree-eh.c (find_trapping_overflow): Only call
26910 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
26912 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
26915 * config/i386/i386.c: Reimplement the check of possible options
26916 -mibt/-mshstk conbination. Change error messages.
26917 * doc/invoke.texi: Fix a typo: remove extra '='.
26919 2018-02-06 Marek Polacek <polacek@redhat.com>
26921 PR tree-optimization/84228
26922 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
26924 2018-02-06 Tamar Christina <tamar.christina@arm.com>
26927 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
26928 emitted arch directives.
26929 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
26930 __ARM_FEATURE_COPROC before changing architectures.
26932 2018-02-06 Richard Biener <rguenther@suse.de>
26934 * config/i386/i386.c (print_reg): Fix typo.
26935 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
26937 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
26939 * configure: Regenerate.
26941 2018-02-05 Martin Sebor <msebor@redhat.com>
26943 PR tree-optimization/83369
26944 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
26947 2018-02-05 Martin Liska <mliska@suse.cz>
26949 * doc/invoke.texi: Cherry-pick upstream r323995.
26951 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
26953 * ira.c (ira_init_register_move_cost): Adjust comment.
26955 2018-02-05 Martin Liska <mliska@suse.cz>
26957 PR gcov-profile/84137
26958 * doc/gcov.texi: Fix typo in documentation.
26960 2018-02-05 Martin Liska <mliska@suse.cz>
26962 PR gcov-profile/83879
26963 * doc/gcov.texi: Document necessity of --dynamic-list-data when
26964 using dlopen functionality.
26966 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
26968 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
26969 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
26970 _mm_maskz_range_ss, _mm_mask_range_round_ss,
26971 _mm_maskz_range_round_ss): New intrinsics.
26972 (__builtin_ia32_rangesd128_round)
26973 (__builtin_ia32_rangess128_round): Remove.
26974 (__builtin_ia32_rangesd128_mask_round,
26975 __builtin_ia32_rangess128_mask_round): New builtins.
26976 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
26977 __builtin_ia32_rangess128_round): Remove.
26978 (__builtin_ia32_rangesd128_mask_round,
26979 __builtin_ia32_rangess128_mask_round): New builtins.
26980 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
26981 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
26982 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
26983 "<round_saeonly_constraint>")): Changed to ...
26984 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
26985 "<round_saeonly_scalar_constraint>")): ... this.
26986 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
26987 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
26988 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
26989 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
26990 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
26992 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
26994 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
26996 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
26997 Remove all values except native, 8540 and 8548.
26999 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
27001 * config/i386/i386.c (ix86_output_function_return): Pass
27002 INVALID_REGNUM, instead of -1, as invalid register number to
27003 indirect_thunk_name and output_indirect_thunk.
27005 2018-02-02 Julia Koval <julia.koval@intel.com>
27007 * config.gcc: Add -march=icelake.
27008 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
27009 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
27010 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
27011 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
27012 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
27013 (processor_target_table): Add icelake.
27014 (ix86_option_override_internal): Handle new PTAs.
27015 (get_builtin_code_for_version): Handle icelake.
27016 (M_INTEL_COREI7_ICELAKE): New.
27017 (fold_builtin_cpu): Handle icelake.
27018 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
27019 * doc/invoke.texi: Add -march=icelake.
27021 2018-02-02 Julia Koval <julia.koval@intel.com>
27023 * config/i386/i386.c (ix86_option_override_internal): Change flags type
27024 to wide_int_bitmask.
27025 * wide-int-bitmask.h: New.
27027 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
27030 * config/i386/i386.md: Replace Pmode with word_mode in
27031 builtin_setjmp_setup and builtin_longjmp to support x32.
27033 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
27037 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
27039 (rs6000_supported_cpu_names): New static variable.
27040 (linux_cpu_translation_table): Likewise.
27041 (elf_platform) <cpu>: Define new static variable and use it.
27042 Translate kernel AT_PLATFORM name to canonical name if needed.
27043 Error if platform name is unknown.
27045 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
27048 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
27050 2018-02-01 Jeff Law <law@redhat.com>
27053 * config/i386/i386.c (release_scratch_register_on_entry): Add new
27054 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
27055 the scratch if RELEASE_VIA_POP is false.
27056 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
27057 If we have to save a temporary register, decrement SIZE appropriately.
27058 Pass new arguments to release_scratch_register_on_entry.
27059 (ix86_adjust_stack_and_probe): Likewise.
27060 (ix86_emit_probe_stack_range): Pass new arguments to
27061 release_scratch_register_on_entry.
27063 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
27065 PR rtl-optimization/84157
27066 * combine.c (change_zero_ext): Use REG_P predicate in
27067 front of HARD_REGISTER_P predicate.
27069 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
27071 * config/avr/avr.c (avr_option_override): Move disabling of
27072 -fdelete-null-pointer-checks to...
27073 * common/config/avr/avr-common.c (avr_option_optimization_table):
27076 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
27078 PR tree-optimization/81635
27079 * tree-data-ref.c (split_constant_offset_1): For types that
27080 wrap on overflow, try to use range info to prove that wrapping
27083 2018-02-01 Renlin Li <renlin.li@arm.com>
27086 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
27087 TAILCALL_ADDR_REGS.
27088 (aarch64_register_move_cost): Likewise.
27089 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
27090 TAILCALL_ADDR_REGS.
27091 (REG_CLASS_NAMES): Likewise.
27092 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
27093 TAILCALL_ADDR_REGS. Remove IP registers.
27094 * config/aarch64/aarch64.md (Ucs): Update register constraint.
27096 2018-02-01 Richard Biener <rguenther@suse.de>
27098 * domwalk.h (dom_walker::dom_walker): Add additional constructor
27099 for specifying RPO order and allow NULL for that.
27100 * domwalk.c (dom_walker::dom_walker): Likewise.
27101 (dom_walker::walk): Handle NULL RPO order.
27102 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
27104 (rewrite_update_dom_walker): Likewise.
27105 (mark_def_dom_walker): Likewise.
27107 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
27109 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
27110 (aarch64_maybe_expand_sve_subreg_move): Declare.
27111 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
27112 * config/aarch64/predicates.md (aarch64_any_register_operand): New
27114 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
27115 that are semantically a reverse operation.
27116 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
27117 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
27118 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
27120 (aarch64_can_change_mode_class): For big-endian, forbid changes
27121 between two SVE modes if they have different element sizes.
27123 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
27125 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
27126 the TImode handling for big-endian targets.
27128 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
27130 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
27131 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
27133 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
27134 Remove BSWAP handing for big-endian targets and use the form of
27135 LD1RQ appropariate for the mode.
27137 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
27139 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
27140 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
27141 duplicated element.
27143 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
27146 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
27147 check for operands that need to go through aarch64_sve_reload_be.
27149 2018-02-01 Jakub Jelinek <jakub@redhat.com>
27151 PR tree-optimization/81661
27152 PR tree-optimization/84117
27153 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
27154 * tree-eh.c: Include gimplify.h.
27155 (find_trapping_overflow, replace_trapping_overflow,
27156 rewrite_to_non_trapping_overflow): New functions.
27157 * tree-vect-loop.c: Include tree-eh.h.
27158 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
27159 * tree-data-ref.c: Include tree-eh.h.
27160 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
27162 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
27164 PR rtl-optimization/84123
27165 * combine.c (change_zero_ext): Check if hard register satisfies
27166 can_change_dest_mode before calling gen_lowpart_SUBREG.
27168 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
27171 * ira.c (ira_init_register_move_cost): Remove assert.
27173 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
27175 PR rtl-optimization/84071
27176 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
27177 * doc/tm.texi: Regenerate.
27179 2018-01-31 Richard Biener <rguenther@suse.de>
27181 PR tree-optimization/84132
27182 * tree-data-ref.c (analyze_miv_subscript): Properly
27183 check whether evolution_function_is_affine_multivariate_p
27184 before calling gcd_of_steps_may_divide_p.
27186 2018-01-31 Julia Koval <julia.koval@intel.com>
27189 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
27190 * config/i386/i386.md (rdpid_rex64) New.
27191 (rdpid): Make 32bit only.
27193 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
27196 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
27197 an IDENTIFIER_NODE for FUNCTION_TYPE's.
27199 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
27202 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
27204 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
27206 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
27208 PR rtl-optimization/84071
27209 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
27210 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
27212 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
27214 * config/arc/arc.c (arc_handle_aux_attribute): New function.
27215 (arc_attribute_table): Add 'aux' attribute.
27216 (arc_in_small_data_p): Consider aux like variables.
27217 (arc_is_aux_reg_p): New function.
27218 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
27219 (arc_get_aux_arg): New function.
27220 (prepare_move_operands): Handle aux-register access.
27221 (arc_handle_aux_attribute): New function.
27222 * doc/extend.texi (ARC Variable attributes): Add subsection.
27224 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
27226 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
27227 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
27228 (arc_attribute_table): Add 'uncached' attribute.
27229 (arc_print_operand): Print '.di' flag for uncached memory
27231 (arc_in_small_data_p): Do not consider for small data the uncached
27233 (arc_is_uncached_mem_p): New function.
27234 * config/arc/predicates.md (compact_store_memory_operand): Check
27235 for uncached memory accesses.
27236 (nonvol_nonimm_operand): Likewise.
27237 * doc/extend.texi (ARC Type Attribute): New subsection.
27239 2018-01-31 Jakub Jelinek <jakub@redhat.com>
27242 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
27243 falign-loops=): Add Optimization flag.
27245 2018-01-30 Jeff Law <law@redhat.com>
27248 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
27249 INT_REGISTERS_SAVED. Check it prior to calling
27250 get_scratch_register_on_entry.
27251 (ix86_adjust_stack_and_probe): Similarly.
27252 (ix86_emit_probe_stack_range): Similarly.
27253 (ix86_expand_prologue): Corresponding changes.
27255 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
27258 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
27259 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
27261 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
27264 * lra-constraints.c (curr_insn_transform): Process AND in the
27267 2018-01-30 Jakub Jelinek <jakub@redhat.com>
27269 PR rtl-optimization/83986
27270 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
27271 dependence against last_pending_memory_flush in addition to
27272 pending_jump_insns.
27274 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
27276 PR tree-optimization/81611
27277 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
27280 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
27283 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
27286 2018-01-30 Richard Biener <rguenther@suse.de>
27287 Jakub Jelinek <jakub@redhat.com>
27289 PR tree-optimization/84111
27290 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
27291 inner loops added during recursion, as they don't have up-to-date
27294 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
27297 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
27298 (can_inline_edge_by_limits_p): ... here.
27299 (can_early_inline_edge_p, check_callers,
27300 update_caller_keys, update_callee_keys, recursive_inlining,
27301 add_new_edges_to_heap, speculation_useful_p,
27302 inline_small_functions,
27303 inline_small_functions, flatten_function,
27304 inline_to_all_callers_1): Update.
27306 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
27308 * profile-count.c (profile_count::combine_with_ipa_count): Handle
27311 2018-01-30 Richard Biener <rguenther@suse.de>
27313 PR tree-optimization/83008
27314 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
27315 invariant and constant vector uses in stmts when they need
27316 more than one stmt.
27318 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
27321 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
27322 * configure: Regenerate.
27324 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
27326 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
27328 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
27329 Use gen_rtx_REG rather than gen_lowpart.
27331 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
27333 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
27334 rather than 0 when creating partial subregs.
27336 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
27338 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
27341 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
27344 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
27345 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
27346 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
27347 flags. This restores the settings used before the 2017-07-24.
27348 Turning off pre increment/decrement/modify allows IVOPTS to
27349 optimize DF/SF loops where the index is an int.
27351 2018-01-29 Richard Biener <rguenther@suse.de>
27352 Kelvin Nilsen <kelvin@gcc.gnu.org>
27355 * tree-vect-stmts.c (vectorizable_call): Don't call
27356 targetm.vectorize_builtin_md_vectorized_function if callee is
27359 2018-01-22 Carl Love <cel@us.ibm.com>
27361 * doc/extend.tex: Fix typo in second arg in
27362 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
27364 2018-01-29 Richard Biener <rguenther@suse.de>
27366 PR tree-optimization/84086
27367 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
27368 (flush_ssaname_freelist): When SSA names were released reset
27369 the SCEV hash table.
27371 2018-01-29 Richard Biener <rguenther@suse.de>
27373 PR tree-optimization/84057
27374 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
27375 removed paths when removing edges.
27377 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
27379 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
27380 -mfunction-return=@var{choice}.
27382 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
27384 PR diagnostic/84034
27385 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
27386 Handle CR like TAB.
27387 (layout::print_source_line): Likewise.
27388 (test_get_line_width_without_trailing_whitespace): Add test cases.
27390 2018-01-27 Jakub Jelinek <jakub@redhat.com>
27392 PR middle-end/84040
27393 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
27396 2018-01-26 Jim Wilson <jimw@sifive.com>
27398 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
27400 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
27403 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
27405 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
27406 and CMP + SUB-immediate -> SUBS.
27408 2018-01-26 Martin Sebor <msebor@redhat.com>
27410 PR tree-optimization/83896
27411 * tree-ssa-strlen.c (get_string_len): Rename...
27412 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
27413 Avoid assuming length is constant.
27414 (handle_char_store): Use HOST_WIDE_INT for string length.
27416 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
27419 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
27420 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
27422 2018-01-26 Richard Biener <rguenther@suse.de>
27424 PR rtl-optimization/84003
27425 * dse.c (record_store): Only record redundant stores when
27426 the earlier store aliases at least all accesses the later one does.
27428 2018-01-26 Jakub Jelinek <jakub@redhat.com>
27430 PR rtl-optimization/83985
27431 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
27432 REG_CFA_RESTORE insns.
27433 (delete_unmarked_insns): Don't ignore separate shrink wrapping
27434 REG_CFA_RESTORE insns here.
27437 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
27438 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
27440 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
27442 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
27443 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
27444 (arc_init): Likewise.
27445 (arc_override_options): Likewise.
27446 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
27448 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
27450 * config/arc/arc.h (TARGET_DBNZ): Define.
27451 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
27452 properly set the tune attribute.
27453 (dbnz): Use TARGET_DBNZ guard.
27454 * config/arc/arc.opt (mtune): Add core3 option.
27456 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
27458 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
27459 recognize new pic like addresses.
27460 (arc_delegitimize_address): Clean up.
27462 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
27464 * config/arc/arc-arches.def: Option mrf16 valid for all
27466 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
27467 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
27468 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
27469 * config/arc/arc-tables.opt: Regenerate.
27470 * config/arc/arc.c (arc_conditional_register_usage): Handle
27471 reduced register file case.
27472 (arc_file_start): Set must have build attributes.
27473 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
27474 mrf16 option value.
27475 * config/arc/arc.opt (mrf16): Add new option.
27476 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
27477 * config/arc/genmultilib.awk: Handle new mrf16 option.
27478 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
27479 * config/arc/t-multilib: Regenerate.
27480 * doc/invoke.texi (ARC Options): Document mrf16 option.
27482 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
27484 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
27485 * config/arc/arc.c (arc_handle_secure_attribute): New function.
27486 (arc_attribute_table): Add 'secure_call' attribute.
27487 (arc_print_operand): Print secure call operand.
27488 (arc_function_ok_for_sibcall): Don't optimize tail calls when
27490 (arc_is_secure_call_p): New function. * config/arc/arc.md
27491 (call_i): Add support for sjli instruction.
27492 (call_value_i): Likewise.
27493 * config/arc/constraints.md (Csc): New constraint.
27495 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
27496 John Eric Martin <John.Martin@emmicro-us.com>
27498 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
27499 * config/arc/arc.c (_arc_jli_section): New struct.
27500 (arc_jli_section): New type.
27501 (rc_jli_sections): New static variable.
27502 (arc_handle_jli_attribute): New function.
27503 (arc_attribute_table): Add jli_always and jli_fixed attribute.
27504 (arc_file_end): New function.
27505 (TARGET_ASM_FILE_END): Define.
27506 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
27507 (arc_add_jli_section): New function.
27508 (jli_call_scan): Likewise.
27509 (arc_reorg): Call jli_call_scan.
27510 (arc_output_addsi): Remove 'S' from printing asm operand.
27511 (arc_is_jli_call_p): New function.
27512 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
27514 (movhi_insn): Likewise.
27515 (movsi_insn): Likewise.
27516 (movsi_set_cc_insn): Likewise.
27517 (loadqi_update): Likewise.
27518 (load_zeroextendqisi_update): Likewise.
27519 (load_signextendqisi_update): Likewise.
27520 (loadhi_update): Likewise.
27521 (load_zeroextendhisi_update): Likewise.
27522 (load_signextendhisi_update): Likewise.
27523 (loadsi_update): Likewise.
27524 (loadsf_update): Likewise.
27525 (movsicc_insn): Likewise.
27526 (bset_insn): Likewise.
27527 (bxor_insn): Likewise.
27528 (bclr_insn): Likewise.
27529 (bmsk_insn): Likewise.
27530 (bicsi3_insn): Likewise.
27531 (cmpsi_cc_c_insn): Likewise.
27532 (movsi_ne): Likewise.
27533 (movsi_cond_exec): Likewise.
27534 (clrsbsi2): Likewise.
27535 (norm_f): Likewise.
27545 (call_i): Remove 'S' asm letter, add jli instruction.
27546 (call_value_i): Likewise.
27547 * config/arc/arc.op (mjli-always): New option.
27548 * config/arc/constraints.md (Cji): New constraint.
27549 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
27551 (subsf3_fpx): Likewise.
27552 (mulsf3_fpx): Likewise.
27553 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
27555 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
27556 function attrbutes.
27557 * doc/invoke.texi (ARC): Document mjli-always option.
27559 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
27561 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
27562 avoid addition with 0 and use incw and decw where possible.
27564 2018-01-26 Richard Biener <rguenther@suse.de>
27566 PR tree-optimization/81082
27567 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
27568 association if it requires casting to unsigned.
27569 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
27570 from fold_plusminus_mult_expr to catch important cases late when
27571 range info is available.
27573 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
27575 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
27576 * configure.ac (hidden_linkonce): New test.
27577 * configure: Regenerate.
27578 * config.in: Regenerate.
27580 2018-01-26 Julia Koval <julia.koval@intel.com>
27582 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
27583 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
27584 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
27585 _mm_mask_bitshuffle_epi64_mask): Fix type.
27586 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
27587 USI_FTYPE_V4DI_V4DI_USI): Remove.
27588 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
27589 __builtin_ia32_vpshufbitqmb256_mask,
27590 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
27591 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
27592 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
27594 2018-01-26 Alan Modra <amodra@gmail.com>
27597 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
27598 UNSPEC_VBPERMQ. Sort other unspecs.
27600 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
27602 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
27604 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
27606 PR middle-end/83055
27607 * predict.c (drop_profile): Do not push/pop cfun; update also
27609 (handle_missing_profiles): Fix logic looking for zero profiles.
27611 2018-01-25 Jakub Jelinek <jakub@redhat.com>
27613 PR middle-end/83977
27614 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
27615 on functions with #pragma omp declare simd or functions with simd
27617 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
27618 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
27619 Remove trailing \n from warning_at calls.
27621 2018-01-25 Tom de Vries <tom@codesourcery.com>
27624 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
27625 for neutered workers.
27627 2018-01-24 Joseph Myers <joseph@codesourcery.com>
27630 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
27631 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
27633 2018-01-24 Jeff Law <law@redhat.com>
27636 * i386.c (get_probe_interval): Move to earlier point.
27637 (ix86_compute_frame_layout): If -fstack-clash-protection and
27638 the frame is larger than the probe interval, then use pushes
27639 to save registers rather than reg->mem moves.
27640 (ix86_expand_prologue): Remove conditional for int_registers_saved
27643 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
27646 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
27647 min/max for never referenced object.
27649 2018-01-24 Jakub Jelinek <jakub@redhat.com>
27651 PR middle-end/83977
27652 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
27654 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
27655 attributes from DECL_ATTRIBUTES (decl) without affecting
27656 DECL_ATTRIBUTES (current_function_decl).
27657 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
27658 functions with non-NULL DECL_ABSTRACT_ORIGIN.
27660 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
27662 PR tree-optimization/83979
27663 * fold-const.c (fold_comparison): Use constant_boolean_node
27664 instead of boolean_{true,false}_node.
27666 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
27668 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
27671 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
27673 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
27674 Simplify the clause that sets the length attribute.
27675 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
27676 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
27677 clause that sets the length attribute.
27678 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
27680 2018-01-24 Tom de Vries <tom@codesourcery.com>
27683 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
27684 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
27685 Add strict parameter.
27686 (prevent_branch_around_nothing): Insert dummy insn between branch to
27687 label and label with no ptx insn inbetween.
27688 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
27690 2018-01-24 Tom de Vries <tom@codesourcery.com>
27693 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
27694 for neutered threads in warp.
27695 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
27697 2018-01-24 Richard Biener <rguenther@suse.de>
27699 PR tree-optimization/83176
27700 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
27703 2018-01-24 Richard Biener <rguenther@suse.de>
27705 PR tree-optimization/82819
27706 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
27707 code generating pluses that are no-ops in the target precision.
27709 2018-01-24 Richard Biener <rguenther@suse.de>
27711 PR middle-end/84000
27712 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
27714 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
27716 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
27717 to merge probabilities.
27718 * predict.c (probably_never_executed): Also mark as cold functions
27719 with global 0 profile and guessed local profile.
27720 * profile-count.c (profile_probability::combine_with_count): New
27722 * profile-count.h (profile_probability::operator*,
27723 profile_probability::operator*=, profile_probability::operator/,
27724 profile_probability::operator/=): Reduce precision to adjusted
27725 and set value to guessed on contradictory divisions.
27726 (profile_probability::combine_with_freq): Remove.
27727 (profile_probability::combine_wiht_count): Declare.
27728 (profile_count::force_nonzero):: Set to adjusted.
27729 (profile_count::probability_in):: Set quality to adjusted.
27730 * tree-ssa-tail-merge.c (replace_block_by): Use
27731 combine_with_count.
27733 2018-01-23 Andrew Waterman <andrew@sifive.com>
27734 Jim Wilson <jimw@sifive.com>
27736 * config/riscv/riscv.c (riscv_stack_boundary): New.
27737 (riscv_option_override): Set riscv_stack_boundary. Handle
27738 riscv_preferred_stack_boundary_arg.
27739 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
27740 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
27741 (STACK_BOUNDARY): Set to riscv_stack_boundary.
27742 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
27743 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
27744 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
27746 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
27749 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
27750 of struct ix86_frame.
27751 (ix86_expand_epilogue): Likewise. Add a local variable for
27752 the reg_save_offset field in struct ix86_frame.
27754 2018-01-23 Bin Cheng <bin.cheng@arm.com>
27756 PR tree-optimization/82604
27757 * tree-loop-distribution.c (enum partition_kind): New enum item
27758 PKIND_PARTIAL_MEMSET.
27759 (partition_builtin_p): Support above new enum item.
27760 (generate_code_for_partition): Ditto.
27761 (compute_access_range): Differentiate cases that equality can be
27762 proven at all loops, the innermost loops or no loops.
27763 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
27764 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
27765 (finalize_partitions, distribute_loop): Don't fuse partition of
27766 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
27767 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
27768 parloop is enabled.
27770 2018-01-23 Martin Liska <mliska@suse.cz>
27772 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
27773 order to ignore the predictor.
27774 (PRED_POLYMORPHIC_CALL): Likewise.
27775 (PRED_RECURSIVE_CALL): Likewise.
27777 2018-01-23 Martin Liska <mliska@suse.cz>
27779 * tree-profile.c (tree_profiling): Print function header to
27780 aware reader which function we are working on.
27781 * value-prof.c (gimple_find_values_to_profile): Do not print
27782 not interesting value histograms.
27784 2018-01-23 Martin Liska <mliska@suse.cz>
27786 * profile-count.h (enum profile_quality): Add
27787 profile_uninitialized as the first value. Do not number values
27788 as they are zero based.
27789 (profile_count::verify): Update sanity check.
27790 (profile_probability::verify): Likewise.
27792 2018-01-23 Nathan Sidwell <nathan@acm.org>
27794 * doc/invoke.texi (ffor-scope): Deprecate.
27796 2018-01-23 David Malcolm <dmalcolm@redhat.com>
27798 PR tree-optimization/83510
27799 * domwalk.c (set_all_edges_as_executable): New function.
27800 (dom_walker::dom_walker): Convert bool param
27801 "skip_unreachable_blocks" to enum reachability. Move setup of
27802 edge flags to set_all_edges_as_executable and only do it when
27803 reachability is REACHABLE_BLOCKS.
27804 * domwalk.h (enum dom_walker::reachability): New enum.
27805 (dom_walker::dom_walker): Convert bool param
27806 "skip_unreachable_blocks" to enum reachability.
27807 (set_all_edges_as_executable): New decl.
27808 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
27809 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
27811 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
27812 but converting true to REACHABLE_BLOCKS.
27813 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
27815 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
27816 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
27817 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
27819 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
27820 if check_all_array_refs will be called.
27822 2018-01-23 David Malcolm <dmalcolm@redhat.com>
27824 * tree.c (selftest::test_location_wrappers): Add more test
27827 2018-01-23 David Malcolm <dmalcolm@redhat.com>
27829 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
27830 (selftest::test_bit_in_range): Likewise.
27832 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
27835 * doc/sourcebuild.texi (vect_float): Say that the selector
27836 only describes the situation when -funsafe-math-optimizations is on.
27837 (vect_float_strict): Document.
27839 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
27841 PR tree-optimization/83965
27842 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
27843 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
27844 instead of checking only for a reduction.
27845 (vect_recog_widen_sum_pattern): Likewise.
27847 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
27849 * predict.c (probably_never_executed): Only use precise profile info.
27850 (compute_function_frequency): Skip after inlining hack since we now
27851 have quality checking.
27853 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
27855 * profile-count.h (profile_probability::very_unlikely,
27856 profile_probability::unlikely, profile_probability::even): Set
27857 precision to guessed.
27859 2018-01-23 Richard Biener <rguenther@suse.de>
27861 PR tree-optimization/83963
27862 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
27863 Properly terminate dominator walk when crossing the exit edge not
27864 when visiting its source block.
27866 2018-01-23 Jakub Jelinek <jakub@redhat.com>
27869 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
27870 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
27872 2018-01-22 Jakub Jelinek <jakub@redhat.com>
27874 PR tree-optimization/83957
27875 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
27876 semicolon after for body surrounded by braces.
27878 PR tree-optimization/83081
27879 * profile-count.h (profile_probability::split): New method.
27880 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
27881 Use profile_probability::split.
27882 (do_compare_rtx_and_jump): Fix adjustment of probabilities
27883 when splitting a single conditional jump into 2.
27885 2018-01-22 David Malcolm <dmalcolm@redhat.com>
27887 PR tree-optimization/69452
27888 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
27891 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
27893 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
27894 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
27895 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
27897 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
27899 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
27901 * config/rl78/rl78.md (movdi): New define_expand.
27902 * config/rl78/rl78.c (rl78_split_movdi): New function.
27904 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
27907 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
27909 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
27910 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
27911 128-bit to produce an UNSPEC move to get the double word with the
27912 signbit and then a shift directly to do signbit.
27913 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
27914 implementation with a new version that just does either a direct
27915 move or a regular move. Move memory interface to separate insns.
27916 Move insns so they are next to the expander.
27917 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
27918 with signbit move. Split big and little endian case.
27919 (signbit<mode>2_dm_mem_le): Likewise.
27920 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
27921 (signbit<mode>2_dm2): Likewise.
27923 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
27925 * config/rl78/rl78.md (anddi3): New define_expand.
27927 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
27929 * config/rl78/rl78.md (umindi3): New define_expand.
27931 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
27933 * config/rl78/rl78.md (smindi3): New define_expand.
27935 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
27937 * config/rl78/rl78.md (smaxdi3): New define_expand.
27939 2018-01-22 Carl Love <cel@us.ibm.com>
27941 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
27942 LVX_V1TI): Add macro expansion.
27943 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
27944 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
27945 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
27946 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
27947 Change check to determine if the instruction is a byte reversing
27948 entry. Fix typo in comment.
27949 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
27950 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
27951 Add def_builtin calls for new builtins.
27952 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
27953 Add define_insn expansion.
27955 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
27957 * config/rl78/rl78.md (umaxdi3): New define_expand.
27959 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
27961 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
27962 for non-QImode registers.
27964 2018-01-22 Richard Biener <rguenther@suse.de>
27966 PR tree-optimization/83963
27967 * graphite-scop-detection.c (scop_detection::get_sese): Delay
27968 including the loop exit block.
27969 (scop_detection::merge_sese): Likewise.
27970 (scop_detection::add_scop): Do it here instead.
27972 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
27974 * doc/sourcebuild.texi (arm_softfloat): Document.
27976 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
27979 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
27980 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
27981 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
27983 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
27984 David Edelsohn <dje.gcc@gmail.com>
27987 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
27988 Change "crset eq" to "crset 2".
27989 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
27990 (*call_indirect_aix<mode>_nospec): Likewise.
27991 (*call_value_indirect_aix<mode>_nospec): Likewise.
27992 (*call_indirect_elfv2<mode>_nospec): Likewise.
27993 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
27994 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
27995 change assembly output from . to $.
27996 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
27997 (indirect_jump<mode>_nospec): Change assembly output from . to $.
27998 (*tablejump<mode>_internal1_nospec): Likewise.
28000 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
28003 * config/sh/sh_optimize_sett_clrt.cc:
28004 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
28006 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
28008 PR tree-optimization/83940
28009 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
28010 offset_dt to vect_constant_def rather than vect_unknown_def_type.
28011 (vect_check_load_store_mask): Add a mask_dt_out parameter and
28012 use it to pass back the definition type.
28013 (vect_check_store_rhs): Likewise rhs_dt_out.
28014 (vect_build_gather_load_calls): Add a mask_dt argument and use
28015 it instead of a call to vect_is_simple_use.
28016 (vectorizable_store): Update calls to vect_check_load_store_mask
28017 and vect_check_store_rhs. Use the dt returned by the latter instead
28018 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
28019 instead of calls to vect_is_simple_use. Pass the scalar rather
28020 than the vector operand to vect_is_simple_use when handling
28021 second and subsequent copies of an rhs value.
28022 (vectorizable_load): Update calls to vect_check_load_store_mask
28023 and vect_build_gather_load_calls. Use the cached mask_dt and
28024 gs_info.offset_dt instead of calls to vect_is_simple_use.
28026 2018-01-20 Jakub Jelinek <jakub@redhat.com>
28028 PR middle-end/83945
28029 * tree-emutls.c: Include gimplify.h.
28030 (lower_emutls_2): New function.
28031 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
28032 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
28033 it before further processing.
28036 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
28037 UINTVAL (trueop1) instead of INTVAL (op1).
28039 2018-01-19 Jakub Jelinek <jakub@redhat.com>
28043 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
28044 INCOMING_FRAME_SP_OFFSET if not defined.
28045 (scan_trace): Add ENTRY argument. If true and
28046 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
28047 emit a note to adjust the CFA offset.
28048 (create_cfi_notes): Adjust scan_trace callers.
28049 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
28050 INCOMING_FRAME_SP_OFFSET in the CIE.
28051 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
28052 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
28054 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
28055 * doc/tm.texi: Regenerated.
28057 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
28059 PR rtl-optimization/83147
28060 * lra-constraints.c (remove_inheritance_pseudos): Use
28061 lra_substitute_pseudo_within_insn.
28063 2018-01-19 Tom de Vries <tom@codesourcery.com>
28064 Cesar Philippidis <cesar@codesourcery.com>
28067 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
28069 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
28072 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
28073 spaces for function labels.
28075 2018-01-19 Martin Liska <mliska@suse.cz>
28077 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
28078 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
28079 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
28080 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
28081 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
28082 (PRED_CONST_RETURN): Change from 69 to 65.
28083 (PRED_NULL_RETURN): Change from 91 to 71.
28084 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
28085 (PRED_LOOP_GUARD): Change from 66 to 73.
28087 2018-01-19 Martin Liska <mliska@suse.cz>
28089 * predict.c (predict_insn_def): Add new assert.
28090 (struct branch_predictor): Change type to signed integer.
28091 (test_prediction_value_range): Amend test to cover
28092 PROB_UNINITIALIZED.
28093 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
28094 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
28095 (PRED_LOOP_ITERATIONS_MAX): Likewise.
28096 (PRED_LOOP_IV_COMPARE): Likewise.
28097 * predict.h (PROB_UNINITIALIZED): Define new constant.
28099 2018-01-19 Martin Liska <mliska@suse.cz>
28101 * predict.c (dump_prediction): Add new format for
28102 analyze_brprob.py script which is enabled with -details
28104 * profile-count.h (precise_p): New function.
28106 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
28108 PR tree-optimization/83922
28109 * tree-vect-loop.c (vect_verify_full_masking): Return false if
28110 there are no statements that need masking.
28111 (vect_active_double_reduction_p): New function.
28112 (vect_analyze_loop_operations): Use it when handling phis that
28113 are not in the loop header.
28115 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
28117 PR tree-optimization/83914
28118 * tree-vect-loop.c (vectorizable_induction): Don't convert
28119 init_expr or apply the peeling adjustment for inductions
28120 that are nested within the vectorized loop.
28122 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
28124 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
28127 2018-01-18 Jakub Jelinek <jakub@redhat.com>
28131 * function.h (gimplify_parameters): Add gimple_seq * argument.
28132 * function.c: Include gimple.h and options.h.
28133 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
28134 for the added local temporaries if needed.
28135 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
28136 if there are any parameter cleanups, wrap whole body into a
28137 try/finally with the cleanups.
28139 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
28142 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
28143 Use GET_MODE_CLASS for scalar floating point.
28145 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
28149 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
28150 Fix call of call_cgraph_insertion_hooks.
28152 2018-01-18 Martin Sebor <msebor@redhat.com>
28154 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
28156 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
28159 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
28162 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
28165 * common.opt: (-ffile-prefix-map): New option.
28166 * opts.c (common_handle_option): Defer it.
28167 * opts-global.c (handle_common_deferred_options): Handle it.
28168 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
28169 * file-prefix-map.h: New file.
28170 (remap_debug_filename, add_debug_prefix_map): ...here.
28171 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
28172 * final.c (debug_prefix_map, add_debug_prefix_map
28173 remap_debug_filename): Move to...
28174 * file-prefix-map.c: New file.
28175 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
28176 generalize, get rid of alloca(), use strrchr() instead of strchr().
28177 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
28178 Implement in terms of add_prefix_map().
28179 (remap_macro_filename, remap_debug_filename): Implement in term of
28181 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
28182 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
28183 * dbxout.c: Include file-prefix-map.h.
28184 * varasm.c: Likewise.
28185 * vmsdbgout.c: Likewise.
28186 * xcoffout.c: Likewise.
28187 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
28188 * doc/cppopts.texi (-fmacro-prefix-map): Document.
28189 * doc/invoke.texi (-ffile-prefix-map): Document.
28190 (-fdebug-prefix-map): Update description.
28192 2018-01-18 Martin Liska <mliska@suse.cz>
28194 * config/i386/i386.c (indirect_thunk_name): Document that also
28196 (output_indirect_thunk): Document why both instructions
28197 (pause and lfence) are generated.
28199 2018-01-18 Richard Biener <rguenther@suse.de>
28201 PR tree-optimization/83887
28202 * graphite-scop-detection.c
28203 (scop_detection::get_nearest_dom_with_single_entry): Remove.
28204 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
28205 (scop_detection::merge_sese): Re-implement with a flood-fill
28206 algorithm that properly finds a SESE region if it exists.
28208 2018-01-18 Jakub Jelinek <jakub@redhat.com>
28211 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
28212 pointer_diff optimizations use view_convert instead of convert.
28214 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
28216 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
28217 Generate different code for -mno-speculate-indirect-jumps.
28218 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
28219 (*call_indirect_aix<mode>): Disable for
28220 -mno-speculate-indirect-jumps.
28221 (*call_indirect_aix<mode>_nospec): New define_insn.
28222 (*call_value_indirect_aix<mode>): Disable for
28223 -mno-speculate-indirect-jumps.
28224 (*call_value_indirect_aix<mode>_nospec): New define_insn.
28225 (*sibcall_nonlocal_sysv<mode>): Generate different code for
28226 -mno-speculate-indirect-jumps.
28227 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
28229 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
28231 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
28232 long double type, set the flags for noting the default long double
28233 type, even if we don't pass or return a long double type.
28235 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
28238 * ipa-inline.c (flatten_function): Do not overwrite final inlining
28241 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
28243 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
28244 support for merge[hl].
28245 (fold_mergehl_helper): New helper function.
28246 (tree-vector-builder.h): New #include for tree_vector_builder usage.
28247 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
28248 (altivec_vmrglw_direct): Add xxmrglw insn.
28250 2018-01-17 Andrew Waterman <andrew@sifive.com>
28252 * config/riscv/riscv.c (riscv_conditional_register_usage): If
28253 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
28255 2018-01-17 David Malcolm <dmalcolm@redhat.com>
28258 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
28259 call the lto_location_cache before reading the
28260 DECL_SOURCE_LOCATION of the types.
28262 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
28263 Richard Sandiford <richard.sandiford@linaro.org>
28265 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
28266 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
28267 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
28268 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
28269 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
28271 * config/aarch64/constraints.md (aarch64_movti_operand):
28273 * config/aarch64/predicates.md (Uti): Add new constraint.
28275 2018-01-17 Carl Love <cel@us.ibm.com>
28277 * config/rs6000/vsx.md (define_expand xl_len_r,
28278 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
28279 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
28281 (define_expand, define_insn): Move the shift left from the
28282 define_insn to the define_expand for lxvl and stxvl instructions.
28283 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
28284 and XL_LEN_R definitions to PURE.
28286 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
28288 * config/i386/i386.c (indirect_thunk_name): Declare regno
28289 as unsigned int. Compare regno with INVALID_REGNUM.
28290 (output_indirect_thunk): Ditto.
28291 (output_indirect_thunk_function): Ditto.
28292 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
28293 in the call to output_indirect_thunk_function.
28295 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
28297 PR middle-end/83884
28298 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
28299 rather than the size of inner_type to determine the stack slot size
28300 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
28302 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
28305 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
28308 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
28310 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
28311 endian Linux systems to optionally enable multilibs for selecting
28312 the long double type if the user configured an explicit type.
28313 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
28314 have no long double multilibs if not defined.
28315 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
28316 warn if the user used -mabi={ieee,ibm}longdouble and we built
28317 multilibs for long double.
28318 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
28319 appropriate multilib option.
28320 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
28322 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
28323 for building long double multilibs.
28324 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
28326 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
28328 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
28331 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
28333 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
28336 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
28339 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
28342 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
28344 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
28345 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
28347 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
28349 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
28350 different rtl trees depending on TARGET_64BIT.
28351 (rs6000_gen_lvx): Likewise.
28353 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
28355 * config/visium/visium.md (nop): Tweak comment.
28356 (hazard_nop): Likewise.
28358 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
28360 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
28361 -mspeculate-indirect-jumps.
28362 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
28363 for -mno-speculate-indirect-jumps.
28364 (*call_indirect_elfv2<mode>_nospec): New define_insn.
28365 (*call_value_indirect_elfv2<mode>): Disable for
28366 -mno-speculate-indirect-jumps.
28367 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
28368 (indirect_jump): Emit different RTL for
28369 -mno-speculate-indirect-jumps.
28370 (*indirect_jump<mode>): Disable for
28371 -mno-speculate-indirect-jumps.
28372 (*indirect_jump<mode>_nospec): New define_insn.
28373 (tablejump): Emit different RTL for
28374 -mno-speculate-indirect-jumps.
28375 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
28376 (tablejumpsi_nospec): New define_expand.
28377 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
28378 (tablejumpdi_nospec): New define_expand.
28379 (*tablejump<mode>_internal1): Disable for
28380 -mno-speculate-indirect-jumps.
28381 (*tablejump<mode>_internal1_nospec): New define_insn.
28382 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
28385 2018-01-16 Artyom Skrobov tyomitch@gmail.com
28387 * caller-save.c (insert_save): Drop unnecessary parameter. All
28390 2018-01-16 Jakub Jelinek <jakub@redhat.com>
28391 Richard Biener <rguenth@suse.de>
28394 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
28395 return early, inline manually is_gimple_sizepos. Make sure if we
28396 call gimplify_expr we don't end up with a gimple constant.
28397 * tree.c (variably_modified_type_p): Don't return true for
28398 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
28399 * gimplify.h (is_gimple_sizepos): Remove.
28401 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
28403 PR tree-optimization/83857
28404 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
28405 vectorizable_live_operation for pure SLP statements.
28406 (vectorizable_live_operation): Handle PHIs.
28408 2018-01-16 Richard Biener <rguenther@suse.de>
28410 PR tree-optimization/83867
28411 * tree-vect-stmts.c (vect_transform_stmt): Precompute
28412 nested_in_vect_loop_p since the scalar stmt may get invalidated.
28414 2018-01-16 Jakub Jelinek <jakub@redhat.com>
28417 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
28418 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
28419 If off is not INTEGER_CST, issue a may not be aligned warning
28420 rather than isn't aligned. Use isn%'t rather than isn't.
28421 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
28423 <case MULT_EXPR>: Improve the case when bottom and one of the
28424 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
28425 operand, in that case check if the other operand is multiple of
28426 bottom divided by the INTEGER_CST operand.
28428 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
28431 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
28432 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
28433 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
28434 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
28435 * config/pa/pa.c (pa_function_arg_advance): Likewise.
28436 (pa_function_arg, pa_arg_partial_bytes): Likewise.
28437 (pa_function_arg_size): New function.
28439 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
28441 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
28442 in a separate statement.
28444 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
28446 PR tree-optimization/83847
28447 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
28448 group gathers and scatters.
28450 2018-01-16 Jakub Jelinek <jakub@redhat.com>
28452 PR rtl-optimization/86620
28453 * params.def (max-sched-ready-insns): Bump minimum value to 1.
28455 PR rtl-optimization/83213
28456 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
28457 to last if both are JUMP_INSNs.
28459 PR tree-optimization/83843
28460 * gimple-ssa-store-merging.c
28461 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
28462 store_immediate_info for bswap/nop orig_stores.
28464 2018-01-15 Andrew Waterman <andrew@sifive.com>
28466 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
28468 <UDIV>: Increase cost if !TARGET_DIV.
28470 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
28472 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
28473 (define_attr "cr_logical_3op"): New.
28474 (cceq_ior_compare): Adjust.
28475 (cceq_ior_compare_complement): Adjust.
28476 (*cceq_rev_compare): Adjust.
28477 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
28478 (is_cracked_insn): Adjust.
28479 (insn_must_be_first_in_group): Adjust.
28480 * config/rs6000/40x.md: Adjust.
28481 * config/rs6000/440.md: Adjust.
28482 * config/rs6000/476.md: Adjust.
28483 * config/rs6000/601.md: Adjust.
28484 * config/rs6000/603.md: Adjust.
28485 * config/rs6000/6xx.md: Adjust.
28486 * config/rs6000/7450.md: Adjust.
28487 * config/rs6000/7xx.md: Adjust.
28488 * config/rs6000/8540.md: Adjust.
28489 * config/rs6000/cell.md: Adjust.
28490 * config/rs6000/e300c2c3.md: Adjust.
28491 * config/rs6000/e500mc.md: Adjust.
28492 * config/rs6000/e500mc64.md: Adjust.
28493 * config/rs6000/e5500.md: Adjust.
28494 * config/rs6000/e6500.md: Adjust.
28495 * config/rs6000/mpc.md: Adjust.
28496 * config/rs6000/power4.md: Adjust.
28497 * config/rs6000/power5.md: Adjust.
28498 * config/rs6000/power6.md: Adjust.
28499 * config/rs6000/power7.md: Adjust.
28500 * config/rs6000/power8.md: Adjust.
28501 * config/rs6000/power9.md: Adjust.
28502 * config/rs6000/rs64.md: Adjust.
28503 * config/rs6000/titan.md: Adjust.
28505 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
28507 * config/i386/predicates.md (indirect_branch_operand): Rewrite
28508 ix86_indirect_branch_register logic.
28510 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
28512 * config/i386/constraints.md (Bs): Update
28513 ix86_indirect_branch_register check. Don't check
28514 ix86_indirect_branch_register with GOT_memory_operand.
28516 * config/i386/predicates.md (GOT_memory_operand): Don't check
28517 ix86_indirect_branch_register here.
28518 (GOT32_symbol_operand): Likewise.
28520 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
28522 * config/i386/predicates.md (constant_call_address_operand):
28523 Rewrite ix86_indirect_branch_register logic.
28524 (sibcall_insn_operand): Likewise.
28526 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
28528 * config/i386/constraints.md (Bs): Replace
28529 ix86_indirect_branch_thunk_register with
28530 ix86_indirect_branch_register.
28532 * config/i386/i386.md (indirect_jump): Likewise.
28533 (tablejump): Likewise.
28534 (*sibcall_memory): Likewise.
28535 (*sibcall_value_memory): Likewise.
28536 Peepholes of indirect call and jump via memory: Likewise.
28537 * config/i386/i386.opt: Likewise.
28538 * config/i386/predicates.md (indirect_branch_operand): Likewise.
28539 (GOT_memory_operand): Likewise.
28540 (call_insn_operand): Likewise.
28541 (sibcall_insn_operand): Likewise.
28542 (GOT32_symbol_operand): Likewise.
28544 2018-01-15 Jakub Jelinek <jakub@redhat.com>
28546 PR middle-end/83837
28547 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
28548 type rather than type addr's type points to.
28549 (expand_omp_atomic_mutex): Likewise.
28550 (expand_omp_atomic): Likewise.
28552 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
28555 * config/i386/i386.c (output_indirect_thunk_function): Use
28556 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
28557 for __x86_return_thunk.
28559 2018-01-15 Richard Biener <rguenther@suse.de>
28561 PR middle-end/83850
28562 * expmed.c (extract_bit_field_1): Fix typo.
28564 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
28567 * config/arm/iterators.md (VF): New mode iterator.
28568 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
28569 Remove integer-related logic from pattern.
28570 (neon_vabd<mode>_3): Likewise.
28572 2018-01-15 Jakub Jelinek <jakub@redhat.com>
28574 PR middle-end/82694
28575 * common.opt (fstrict-overflow): No longer an alias.
28576 (fwrapv-pointer): New option.
28577 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
28578 also for pointer types based on flag_wrapv_pointer.
28579 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
28580 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
28581 opts->x_flag_wrapv got set.
28582 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
28583 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
28584 POINTER_TYPE_OVERFLOW_UNDEFINED.
28585 * match.pd: Likewise in address comparison pattern.
28586 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
28588 2018-01-15 Richard Biener <rguenther@suse.de>
28591 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
28592 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
28593 Reset type names to their identifier if their TYPE_DECL doesn't
28594 have linkage (and thus is used for ODR and devirt).
28595 (save_debug_info_for_decl): Remove.
28596 (save_debug_info_for_type): Likewise.
28597 (add_tree_to_fld_list): Adjust.
28598 * tree-pretty-print.c (dump_generic_node): Make dumping of
28599 type names more robust.
28601 2018-01-15 Richard Biener <rguenther@suse.de>
28603 * BASE-VER: Bump to 8.0.1.
28605 2018-01-14 Martin Sebor <msebor@redhat.com>
28608 * builtins.c (check_access): Avoid warning when the no-warning bit
28611 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
28613 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
28614 * ira-color (allocno_hard_regs_compare): Likewise.
28616 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
28619 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
28620 Use .pushsection/.popsection.
28622 2018-01-14 Martin Sebor <msebor@redhat.com>
28625 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
28627 2018-01-14 Jakub Jelinek <jakub@redhat.com>
28629 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
28630 entry from extra_headers.
28631 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
28632 extra_headers, make the list bitwise identical to the i?86-*-* one.
28634 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
28636 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
28637 -mcmodel=large with -mindirect-branch=thunk,
28638 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
28639 -mfunction-return=thunk-extern.
28640 * doc/invoke.texi: Document -mcmodel=large is incompatible with
28641 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
28642 -mfunction-return=thunk and -mfunction-return=thunk-extern.
28644 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
28646 * config/i386/i386.c (print_reg): Print the name of the full
28647 integer register without '%'.
28648 (ix86_print_operand): Handle 'V'.
28649 * doc/extend.texi: Document 'V' modifier.
28651 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
28653 * config/i386/constraints.md (Bs): Disallow memory operand for
28654 -mindirect-branch-register.
28656 * config/i386/predicates.md (indirect_branch_operand): Likewise.
28657 (GOT_memory_operand): Likewise.
28658 (call_insn_operand): Likewise.
28659 (sibcall_insn_operand): Likewise.
28660 (GOT32_symbol_operand): Likewise.
28661 * config/i386/i386.md (indirect_jump): Call convert_memory_address
28662 for -mindirect-branch-register.
28663 (tablejump): Likewise.
28664 (*sibcall_memory): Likewise.
28665 (*sibcall_value_memory): Likewise.
28666 Disallow peepholes of indirect call and jump via memory for
28667 -mindirect-branch-register.
28668 (*call_pop): Replace m with Bw.
28669 (*call_value_pop): Likewise.
28670 (*sibcall_pop_memory): Replace m with Bs.
28671 * config/i386/i386.opt (mindirect-branch-register): New option.
28672 * doc/invoke.texi: Document -mindirect-branch-register option.
28674 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
28676 * config/i386/i386-protos.h (ix86_output_function_return): New.
28677 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
28678 set function_return_type.
28679 (indirect_thunk_name): Add ret_p to indicate thunk for function
28681 (output_indirect_thunk_function): Pass false to
28682 indirect_thunk_name.
28683 (ix86_output_indirect_branch_via_reg): Likewise.
28684 (ix86_output_indirect_branch_via_push): Likewise.
28685 (output_indirect_thunk_function): Create alias for function
28686 return thunk if regno < 0.
28687 (ix86_output_function_return): New function.
28688 (ix86_handle_fndecl_attribute): Handle function_return.
28689 (ix86_attribute_table): Add function_return.
28690 * config/i386/i386.h (machine_function): Add
28691 function_return_type.
28692 * config/i386/i386.md (simple_return_internal): Use
28693 ix86_output_function_return.
28694 (simple_return_internal_long): Likewise.
28695 * config/i386/i386.opt (mfunction-return=): New option.
28696 (indirect_branch): Mention -mfunction-return=.
28697 * doc/extend.texi: Document function_return function attribute.
28698 * doc/invoke.texi: Document -mfunction-return= option.
28700 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
28702 * config/i386/i386-opts.h (indirect_branch): New.
28703 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
28704 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
28705 with local indirect jump when converting indirect call and jump.
28706 (ix86_set_indirect_branch_type): New.
28707 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
28708 (indirectlabelno): New.
28709 (indirect_thunk_needed): Likewise.
28710 (indirect_thunk_bnd_needed): Likewise.
28711 (indirect_thunks_used): Likewise.
28712 (indirect_thunks_bnd_used): Likewise.
28713 (INDIRECT_LABEL): Likewise.
28714 (indirect_thunk_name): Likewise.
28715 (output_indirect_thunk): Likewise.
28716 (output_indirect_thunk_function): Likewise.
28717 (ix86_output_indirect_branch_via_reg): Likewise.
28718 (ix86_output_indirect_branch_via_push): Likewise.
28719 (ix86_output_indirect_branch): Likewise.
28720 (ix86_output_indirect_jmp): Likewise.
28721 (ix86_code_end): Call output_indirect_thunk_function if needed.
28722 (ix86_output_call_insn): Call ix86_output_indirect_branch if
28724 (ix86_handle_fndecl_attribute): Handle indirect_branch.
28725 (ix86_attribute_table): Add indirect_branch.
28726 * config/i386/i386.h (machine_function): Add indirect_branch_type
28727 and has_local_indirect_jump.
28728 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
28730 (tablejump): Likewise.
28731 (*indirect_jump): Use ix86_output_indirect_jmp.
28732 (*tablejump_1): Likewise.
28733 (simple_return_indirect_internal): Likewise.
28734 * config/i386/i386.opt (mindirect-branch=): New option.
28735 (indirect_branch): New.
28738 (thunk-inline): Likewise.
28739 (thunk-extern): Likewise.
28740 * doc/extend.texi: Document indirect_branch function attribute.
28741 * doc/invoke.texi: Document -mindirect-branch= option.
28743 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
28746 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
28748 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
28750 * ipa-inline.c (want_inline_small_function_p): Return false if
28751 inlining has already failed with CIF_FINAL_ERROR.
28752 (update_caller_keys): Call want_inline_small_function_p before
28754 (update_callee_keys): Likewise.
28756 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
28758 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
28760 (rs6000_quadword_masked_address_p): Likewise.
28761 (quad_aligned_load_p): Likewise.
28762 (quad_aligned_store_p): Likewise.
28763 (const_load_sequence_p): Add comment to describe the outer-most loop.
28764 (mimic_memory_attributes_and_flags): New function.
28765 (rs6000_gen_stvx): Likewise.
28766 (replace_swapped_aligned_store): Likewise.
28767 (rs6000_gen_lvx): Likewise.
28768 (replace_swapped_aligned_load): Likewise.
28769 (replace_swapped_load_constant): Capitalize argument name in
28770 comment describing this function.
28771 (rs6000_analyze_swaps): Add a third pass to search for vector loads
28772 and stores that access quad-word aligned addresses and replace
28773 with stvx or lvx instructions when appropriate.
28774 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
28775 New function prototype.
28776 (rs6000_quadword_masked_address_p): Likewise.
28777 (rs6000_gen_lvx): Likewise.
28778 (rs6000_gen_stvx): Likewise.
28779 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
28780 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
28781 when memory address is aligned.
28782 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
28783 this split to select lvx instruction when memory address is aligned.
28784 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
28785 instruction when memory address is aligned.
28786 (*vsx_le_perm_load_v16qi): Likewise.
28787 (four unnamed splitters): Modify to select the stvx instruction
28788 when memory is aligned.
28790 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
28792 * predict.c (determine_unlikely_bbs): Handle correctly BBs
28793 which appears in the queue multiple times.
28795 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28796 Alan Hayward <alan.hayward@arm.com>
28797 David Sherwood <david.sherwood@arm.com>
28799 * tree-vectorizer.h (vec_lower_bound): New structure.
28800 (_loop_vec_info): Add check_nonzero and lower_bounds.
28801 (LOOP_VINFO_CHECK_NONZERO): New macro.
28802 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
28803 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
28804 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
28805 fields. Make seg_len the distance travelled, not including the
28807 (dr_direction_indicator): Declare.
28808 (dr_zero_step_indicator): Likewise.
28809 (dr_known_forward_stride_p): Likewise.
28810 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
28812 (runtime_alias_check_p): Allow runtime alias checks with
28814 (operator ==): Compare access_size and align.
28815 (prune_runtime_alias_test_list): Rework for new distinction between
28816 the access_size and seg_len.
28817 (create_intersect_range_checks_index): Likewise. Cope with polynomial
28819 (get_segment_min_max): New function.
28820 (create_intersect_range_checks): Use it.
28821 (dr_step_indicator): New function.
28822 (dr_direction_indicator): Likewise.
28823 (dr_zero_step_indicator): Likewise.
28824 (dr_known_forward_stride_p): Likewise.
28825 * tree-loop-distribution.c (data_ref_segment_size): Return
28826 DR_STEP * (niters - 1).
28827 (compute_alias_check_pairs): Update call to the dr_with_seg_len
28829 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
28830 (vect_preserves_scalar_order_p): New function, split out from...
28831 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
28832 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
28833 (vect_vfa_access_size): New function.
28834 (vect_vfa_align): Likewise.
28835 (vect_compile_time_alias): Take access_size_a and access_b arguments.
28836 (dump_lower_bound): New function.
28837 (vect_check_lower_bound): Likewise.
28838 (vect_small_gap_p): Likewise.
28839 (vectorizable_with_step_bound_p): Likewise.
28840 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
28841 depencies if the vectorization factor is 1. Convert the checks
28842 for nonzero steps into checks on the bounds of DR_STEP. Try using
28843 a bunds check for variable steps if the minimum required step is
28844 relatively small. Update calls to the dr_with_seg_len
28845 constructor and to vect_compile_time_alias.
28846 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
28848 (vect_loop_versioning): Call it.
28849 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
28851 (vect_estimate_min_profitable_iters): Account for any bounds checks.
28853 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28854 Alan Hayward <alan.hayward@arm.com>
28855 David Sherwood <david.sherwood@arm.com>
28857 * doc/sourcebuild.texi (vect_scatter_store): Document.
28858 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
28860 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
28862 * genopinit.c (main): Add supports_vec_scatter_store and
28863 supports_vec_scatter_store_cached to target_optabs.
28864 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
28865 IFN_MASK_SCATTER_STORE.
28866 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
28868 * internal-fn.h (internal_store_fn_p): Declare.
28869 (internal_fn_stored_value_index): Likewise.
28870 * internal-fn.c (scatter_store_direct): New macro.
28871 (expand_scatter_store_optab_fn): New function.
28872 (direct_scatter_store_optab_supported_p): New macro.
28873 (internal_store_fn_p): New function.
28874 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
28875 IFN_MASK_SCATTER_STORE.
28876 (internal_fn_mask_index): Likewise.
28877 (internal_fn_stored_value_index): New function.
28878 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
28879 for scatter stores.
28880 * optabs-query.h (supports_vec_scatter_store_p): Declare.
28881 * optabs-query.c (supports_vec_scatter_store_p): New function.
28882 * tree-vectorizer.h (vect_get_store_rhs): Declare.
28883 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
28884 true for scatter stores.
28885 (vect_gather_scatter_fn_p): Handle scatter stores too.
28886 (vect_check_gather_scatter): Consider using scatter stores if
28887 supports_vec_scatter_store_p.
28888 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
28889 scatter stores too.
28890 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
28891 internal_fn_stored_value_index.
28892 (check_load_store_masking): Handle scatter stores too.
28893 (vect_get_store_rhs): Make public.
28894 (vectorizable_call): Use internal_store_fn_p.
28895 (vectorizable_store): Handle scatter store internal functions.
28896 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
28897 when deciding whether the end of the group has been reached.
28898 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
28899 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
28900 (mask_scatter_store<mode>): New insns.
28902 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28903 Alan Hayward <alan.hayward@arm.com>
28904 David Sherwood <david.sherwood@arm.com>
28906 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
28907 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
28908 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
28910 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
28911 Use vect_truncate_gather_scatter_offset if we can't treat the
28912 operation as a normal gather load or scatter store.
28913 (get_group_load_store_type): Take the gather_scatter_info
28914 as argument. Try using a gather load or scatter store for
28915 single-element groups.
28916 (get_load_store_type): Update calls to get_group_load_store_type
28917 and vect_use_strided_gather_scatters_p.
28919 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28920 Alan Hayward <alan.hayward@arm.com>
28921 David Sherwood <david.sherwood@arm.com>
28923 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
28924 optional tree argument.
28925 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
28927 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
28928 but continue to use the current value as a fallback.
28929 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
28930 to compare the updates.
28931 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
28932 (get_load_store_type): Use it when handling a strided access.
28933 (vect_get_strided_load_store_ops): New function.
28934 (vect_get_data_ptr_increment): Likewise.
28935 (vectorizable_load): Handle strided gather loads. Always pass
28936 a step to vect_create_data_ref_ptr and bump_vector_ptr.
28938 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28939 Alan Hayward <alan.hayward@arm.com>
28940 David Sherwood <david.sherwood@arm.com>
28942 * doc/md.texi (gather_load@var{m}): Document.
28943 (mask_gather_load@var{m}): Likewise.
28944 * genopinit.c (main): Add supports_vec_gather_load and
28945 supports_vec_gather_load_cached to target_optabs.
28946 * optabs-tree.c (init_tree_optimization_optabs): Use
28947 ggc_cleared_alloc to allocate target_optabs.
28948 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
28949 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
28951 * internal-fn.h (internal_load_fn_p): Declare.
28952 (internal_gather_scatter_fn_p): Likewise.
28953 (internal_fn_mask_index): Likewise.
28954 (internal_gather_scatter_fn_supported_p): Likewise.
28955 * internal-fn.c (gather_load_direct): New macro.
28956 (expand_gather_load_optab_fn): New function.
28957 (direct_gather_load_optab_supported_p): New macro.
28958 (direct_internal_fn_optab): New function.
28959 (internal_load_fn_p): Likewise.
28960 (internal_gather_scatter_fn_p): Likewise.
28961 (internal_fn_mask_index): Likewise.
28962 (internal_gather_scatter_fn_supported_p): Likewise.
28963 * optabs-query.c (supports_at_least_one_mode_p): New function.
28964 (supports_vec_gather_load_p): Likewise.
28965 * optabs-query.h (supports_vec_gather_load_p): Declare.
28966 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
28967 and memory_type field.
28968 (NUM_PATTERNS): Bump to 15.
28969 * tree-vect-data-refs.c: Include internal-fn.h.
28970 (vect_gather_scatter_fn_p): New function.
28971 (vect_describe_gather_scatter_call): Likewise.
28972 (vect_check_gather_scatter): Try using internal functions for
28973 gather loads. Recognize existing calls to a gather load function.
28974 (vect_analyze_data_refs): Consider using gather loads if
28975 supports_vec_gather_load_p.
28976 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
28977 (vect_get_gather_scatter_offset_type): Likewise.
28978 (vect_convert_mask_for_vectype): Likewise.
28979 (vect_add_conversion_to_patterm): Likewise.
28980 (vect_try_gather_scatter_pattern): Likewise.
28981 (vect_recog_gather_scatter_pattern): New pattern recognizer.
28982 (vect_vect_recog_func_ptrs): Add it.
28983 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
28984 internal_fn_mask_index and internal_gather_scatter_fn_p.
28985 (check_load_store_masking): Take the gather_scatter_info as an
28986 argument and handle gather loads.
28987 (vect_get_gather_scatter_ops): New function.
28988 (vectorizable_call): Check internal_load_fn_p.
28989 (vectorizable_load): Likewise. Handle gather load internal
28991 (vectorizable_store): Update call to check_load_store_masking.
28992 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
28993 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
28994 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
28995 (aarch64_gather_scale_operand_d): New predicates.
28996 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
28997 (mask_gather_load<mode>): New insns.
28999 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29000 Alan Hayward <alan.hayward@arm.com>
29001 David Sherwood <david.sherwood@arm.com>
29003 * optabs.def (fold_left_plus_optab): New optab.
29004 * doc/md.texi (fold_left_plus_@var{m}): Document.
29005 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
29006 * internal-fn.c (fold_left_direct): Define.
29007 (expand_fold_left_optab_fn): Likewise.
29008 (direct_fold_left_optab_supported_p): Likewise.
29009 * fold-const-call.c (fold_const_fold_left): New function.
29010 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
29011 * tree-parloops.c (valid_reduction_p): New function.
29012 (gather_scalar_reductions): Use it.
29013 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
29014 (vect_finish_replace_stmt): Declare.
29015 * tree-vect-loop.c (fold_left_reduction_fn): New function.
29016 (needs_fold_left_reduction_p): New function, split out from...
29017 (vect_is_simple_reduction): ...here. Accept reductions that
29018 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
29019 (vect_force_simple_reduction): Also store the reduction type in
29020 the assignment's STMT_VINFO_REDUC_TYPE.
29021 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
29022 (merge_with_identity): New function.
29023 (vect_expand_fold_left): Likewise.
29024 (vectorize_fold_left_reduction): Likewise.
29025 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
29026 scalar phi in place for it. Check for target support and reject
29027 cases that would reassociate the operation. Defer the transform
29028 phase to vectorize_fold_left_reduction.
29029 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
29030 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
29031 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
29033 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29035 * tree-if-conv.c (predicate_mem_writes): Remove redundant
29036 call to ifc_temp_var.
29038 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29039 Alan Hayward <alan.hayward@arm.com>
29040 David Sherwood <david.sherwood@arm.com>
29042 * target.def (legitimize_address_displacement): Take the original
29043 offset as a poly_int.
29044 * targhooks.h (default_legitimize_address_displacement): Update
29046 * targhooks.c (default_legitimize_address_displacement): Likewise.
29047 * doc/tm.texi: Regenerate.
29048 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
29049 as an argument, moving assert of ad->disp == ad->disp_term to...
29050 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
29051 Try calling targetm.legitimize_address_displacement before expanding
29052 the address rather than afterwards, and adjust for the new interface.
29053 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
29054 Match the new hook interface. Handle SVE addresses.
29055 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
29056 new hook interface.
29058 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29060 * Makefile.in (OBJS): Add early-remat.o.
29061 * target.def (select_early_remat_modes): New hook.
29062 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
29063 * doc/tm.texi: Regenerate.
29064 * targhooks.h (default_select_early_remat_modes): Declare.
29065 * targhooks.c (default_select_early_remat_modes): New function.
29066 * timevar.def (TV_EARLY_REMAT): New timevar.
29067 * passes.def (pass_early_remat): New pass.
29068 * tree-pass.h (make_pass_early_remat): Declare.
29069 * early-remat.c: New file.
29070 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
29072 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
29074 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29075 Alan Hayward <alan.hayward@arm.com>
29076 David Sherwood <david.sherwood@arm.com>
29078 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
29079 vfm1 with a bound_epilog parameter.
29080 (vect_do_peeling): Update calls accordingly, and move the prologue
29081 call earlier in the function. Treat the base bound_epilog as 0 for
29082 fully-masked loops and retain vf - 1 for other loops. Add 1 to
29083 this base when peeling for gaps.
29084 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
29085 with fully-masked loops.
29086 (vect_estimate_min_profitable_iters): Handle the single peeled
29087 iteration in that case.
29089 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29090 Alan Hayward <alan.hayward@arm.com>
29091 David Sherwood <david.sherwood@arm.com>
29093 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
29094 single-element interleaving even if the size is not a power of 2.
29095 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
29096 accesses for single-element interleaving if the group size is
29099 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29100 Alan Hayward <alan.hayward@arm.com>
29101 David Sherwood <david.sherwood@arm.com>
29103 * doc/md.texi (fold_extract_last_@var{m}): Document.
29104 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
29105 * optabs.def (fold_extract_last_optab): New optab.
29106 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
29107 * internal-fn.c (fold_extract_direct): New macro.
29108 (expand_fold_extract_optab_fn): Likewise.
29109 (direct_fold_extract_optab_supported_p): Likewise.
29110 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
29111 * tree-vect-loop.c (vect_model_reduction_cost): Handle
29112 EXTRACT_LAST_REDUCTION.
29113 (get_initial_def_for_reduction): Do not create an initial vector
29114 for EXTRACT_LAST_REDUCTION reductions.
29115 (vectorizable_reduction): Leave the scalar phi in place for
29116 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
29117 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
29118 epilogue code for EXTRACT_LAST_REDUCTION and defer the
29119 transform phase to vectorizable_condition.
29120 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
29122 (vect_finish_stmt_generation): ...here.
29123 (vect_finish_replace_stmt): New function.
29124 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
29125 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
29127 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
29129 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29130 Alan Hayward <alan.hayward@arm.com>
29131 David Sherwood <david.sherwood@arm.com>
29133 * doc/md.texi (extract_last_@var{m}): Document.
29134 * optabs.def (extract_last_optab): New optab.
29135 * internal-fn.def (EXTRACT_LAST): New internal function.
29136 * internal-fn.c (cond_unary_direct): New macro.
29137 (expand_cond_unary_optab_fn): Likewise.
29138 (direct_cond_unary_optab_supported_p): Likewise.
29139 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
29140 loops using EXTRACT_LAST.
29141 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
29142 (extract_last_<mode>): ...this optab.
29143 (vec_extract<mode><Vel>): Update accordingly.
29145 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29146 Alan Hayward <alan.hayward@arm.com>
29147 David Sherwood <david.sherwood@arm.com>
29149 * target.def (empty_mask_is_expensive): New hook.
29150 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
29151 * doc/tm.texi: Regenerate.
29152 * targhooks.h (default_empty_mask_is_expensive): Declare.
29153 * targhooks.c (default_empty_mask_is_expensive): New function.
29154 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
29155 if the target says that empty masks are expensive.
29156 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
29158 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
29160 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29161 Alan Hayward <alan.hayward@arm.com>
29162 David Sherwood <david.sherwood@arm.com>
29164 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
29165 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
29166 (vect_use_loop_mask_for_alignment_p): New function.
29167 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
29168 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
29169 niters_skip argument. Make sure that the first niters_skip elements
29170 of the first iteration are inactive.
29171 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
29172 Update call to vect_set_loop_masks_directly.
29173 (get_misalign_in_elems): New function, split out from...
29174 (vect_gen_prolog_loop_niters): ...here.
29175 (vect_update_init_of_dr): Take a code argument that specifies whether
29176 the adjustment should be added or subtracted.
29177 (vect_update_init_of_drs): Likewise.
29178 (vect_prepare_for_masked_peels): New function.
29179 (vect_do_peeling): Skip prologue peeling if we're using a mask
29180 instead. Update call to vect_update_inits_of_drs.
29181 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
29183 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
29184 alignment. Do not include the number of peeled iterations in
29185 the minimum threshold in that case.
29186 (vectorizable_induction): Adjust the start value down by
29187 LOOP_VINFO_MASK_SKIP_NITERS iterations.
29188 (vect_transform_loop): Call vect_prepare_for_masked_peels.
29189 Take the number of skipped iterations into account when calculating
29191 * tree-vect-stmts.c (vect_gen_while_not): New function.
29193 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29194 Alan Hayward <alan.hayward@arm.com>
29195 David Sherwood <david.sherwood@arm.com>
29197 * doc/sourcebuild.texi (vect_fully_masked): Document.
29198 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
29199 default value to 0.
29200 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
29202 (vect_analyze_loop_2): ...here. Don't check the vectorization
29203 factor against the number of loop iterations if the loop is
29206 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29207 Alan Hayward <alan.hayward@arm.com>
29208 David Sherwood <david.sherwood@arm.com>
29210 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
29211 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
29212 (dump_groups): Update accordingly.
29213 (iv_use::mem_type): New member variable.
29214 (address_p): New function.
29215 (record_use): Add a mem_type argument and initialize the new
29217 (record_group_use): Add a mem_type argument. Use address_p.
29218 Remove obsolete null checks of base_object. Update call to record_use.
29219 (find_interesting_uses_op): Update call to record_group_use.
29220 (find_interesting_uses_cond): Likewise.
29221 (find_interesting_uses_address): Likewise.
29222 (get_mem_type_for_internal_fn): New function.
29223 (find_address_like_use): Likewise.
29224 (find_interesting_uses_stmt): Try find_address_like_use before
29225 calling find_interesting_uses_op.
29226 (addr_offset_valid_p): Use the iv mem_type field as the type
29227 of the addressed memory.
29228 (add_autoinc_candidates): Likewise.
29229 (get_address_cost): Likewise.
29230 (split_small_address_groups_p): Use address_p.
29231 (split_address_groups): Likewise.
29232 (add_iv_candidate_for_use): Likewise.
29233 (autoinc_possible_for_pair): Likewise.
29234 (rewrite_groups): Likewise.
29235 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
29236 (determine_group_iv_cost): Update after split of USE_ADDRESS.
29237 (get_alias_ptr_type_for_ptr_address): New function.
29238 (rewrite_use_address): Rewrite address uses in calls that were
29239 identified by find_address_like_use.
29241 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29242 Alan Hayward <alan.hayward@arm.com>
29243 David Sherwood <david.sherwood@arm.com>
29245 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
29247 * gimple-expr.h (is_gimple_addressable: Likewise.
29248 * gimple-expr.c (is_gimple_address): Likewise.
29249 * internal-fn.c (expand_call_mem_ref): New function.
29250 (expand_mask_load_optab_fn): Use it.
29251 (expand_mask_store_optab_fn): Likewise.
29253 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29254 Alan Hayward <alan.hayward@arm.com>
29255 David Sherwood <david.sherwood@arm.com>
29257 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
29258 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
29259 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
29260 (cond_umax@var{mode}): Document.
29261 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
29262 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
29263 (cond_umin_optab, cond_umax_optab): New optabs.
29264 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
29265 (COND_IOR, COND_XOR): New internal functions.
29266 * internal-fn.h (get_conditional_internal_fn): Declare.
29267 * internal-fn.c (cond_binary_direct): New macro.
29268 (expand_cond_binary_optab_fn): Likewise.
29269 (direct_cond_binary_optab_supported_p): Likewise.
29270 (get_conditional_internal_fn): New function.
29271 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
29272 Cope with reduction statements that are vectorized as calls rather
29274 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
29275 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
29276 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
29277 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
29278 (UNSPEC_COND_EOR): New unspecs.
29279 (optab): Add mappings for them.
29280 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
29281 (sve_int_op, sve_fp_op): New int attributes.
29283 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29284 Alan Hayward <alan.hayward@arm.com>
29285 David Sherwood <david.sherwood@arm.com>
29287 * optabs.def (while_ult_optab): New optab.
29288 * doc/md.texi (while_ult@var{m}@var{n}): Document.
29289 * internal-fn.def (WHILE_ULT): New internal function.
29290 * internal-fn.h (direct_internal_fn_supported_p): New override
29291 that takes two types as argument.
29292 * internal-fn.c (while_direct): New macro.
29293 (expand_while_optab_fn): New function.
29294 (convert_optab_supported_p): Likewise.
29295 (direct_while_optab_supported_p): New macro.
29296 * wide-int.h (wi::udiv_ceil): New function.
29297 * tree-vectorizer.h (rgroup_masks): New structure.
29298 (vec_loop_masks): New typedef.
29299 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
29300 and fully_masked_p.
29301 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
29302 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
29303 (vect_max_vf): New function.
29304 (slpeel_make_loop_iterate_ntimes): Delete.
29305 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
29306 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
29307 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
29308 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
29309 internal-fn.h, stor-layout.h and optabs-query.h.
29310 (vect_set_loop_mask): New function.
29311 (add_preheader_seq): Likewise.
29312 (add_header_seq): Likewise.
29313 (interleave_supported_p): Likewise.
29314 (vect_maybe_permute_loop_masks): Likewise.
29315 (vect_set_loop_masks_directly): Likewise.
29316 (vect_set_loop_condition_masked): Likewise.
29317 (vect_set_loop_condition_unmasked): New function, split out from
29318 slpeel_make_loop_iterate_ntimes.
29319 (slpeel_make_loop_iterate_ntimes): Rename to..
29320 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
29321 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
29322 (vect_do_peeling): Update call accordingly.
29323 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
29325 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
29326 mask_compare_type, can_fully_mask_p and fully_masked_p.
29327 (release_vec_loop_masks): New function.
29328 (_loop_vec_info): Use it to free the loop masks.
29329 (can_produce_all_loop_masks_p): New function.
29330 (vect_get_max_nscalars_per_iter): Likewise.
29331 (vect_verify_full_masking): Likewise.
29332 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
29333 retries, and free the mask rgroups before retrying. Check loop-wide
29334 reasons for disallowing fully-masked loops. Make the final decision
29335 about whether use a fully-masked loop or not.
29336 (vect_estimate_min_profitable_iters): Do not assume that peeling
29337 for the number of iterations will be needed for fully-masked loops.
29338 (vectorizable_reduction): Disable fully-masked loops.
29339 (vectorizable_live_operation): Likewise.
29340 (vect_halve_mask_nunits): New function.
29341 (vect_double_mask_nunits): Likewise.
29342 (vect_record_loop_mask): Likewise.
29343 (vect_get_loop_mask): Likewise.
29344 (vect_transform_loop): Handle the case in which the final loop
29345 iteration might handle a partial vector. Call vect_set_loop_condition
29346 instead of slpeel_make_loop_iterate_ntimes.
29347 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
29348 (check_load_store_masking): New function.
29349 (prepare_load_store_mask): Likewise.
29350 (vectorizable_store): Handle fully-masked loops.
29351 (vectorizable_load): Likewise.
29352 (supportable_widening_operation): Use vect_halve_mask_nunits for
29354 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
29355 (vect_gen_while): New function.
29356 * config/aarch64/aarch64.md (umax<mode>3): New expander.
29357 (aarch64_uqdec<mode>): New insn.
29359 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29360 Alan Hayward <alan.hayward@arm.com>
29361 David Sherwood <david.sherwood@arm.com>
29363 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
29364 (reduc_xor_scal_optab): New optabs.
29365 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
29366 (reduc_xor_scal_@var{m}): Document.
29367 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
29368 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
29369 internal functions.
29370 * fold-const-call.c (fold_const_call): Handle them.
29371 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
29372 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
29373 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
29374 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
29375 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
29376 (UNSPEC_XORV): New unspecs.
29377 (optab): Add entries for them.
29378 (BITWISEV): New int iterator.
29379 (bit_reduc_op): New int attributes.
29381 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29382 Alan Hayward <alan.hayward@arm.com>
29383 David Sherwood <david.sherwood@arm.com>
29385 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
29386 * internal-fn.def (VEC_SHL_INSERT): New internal function.
29387 * optabs.def (vec_shl_insert_optab): New optab.
29388 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
29389 (duplicate_and_interleave): Likewise.
29390 * tree-vect-loop.c: Include internal-fn.h.
29391 (neutral_op_for_slp_reduction): New function, split out from
29392 get_initial_defs_for_reduction.
29393 (get_initial_def_for_reduction): Handle option 2 for variable-length
29394 vectors by loading the neutral value into a vector and then shifting
29395 the initial value into element 0.
29396 (get_initial_defs_for_reduction): Replace the code argument with
29397 the neutral value calculated by neutral_op_for_slp_reduction.
29398 Use gimple_build_vector for constant-length vectors.
29399 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
29400 but the first group_size elements have a neutral value.
29401 Use duplicate_and_interleave otherwise.
29402 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
29403 Update call to get_initial_defs_for_reduction. Handle SLP
29404 reductions for variable-length vectors by creating one vector
29405 result for each scalar result, with the elements associated
29406 with other scalar results stubbed out with the neutral value.
29407 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
29408 Require IFN_VEC_SHL_INSERT for double reductions on
29409 variable-length vectors, or SLP reductions that have
29410 a neutral value. Require can_duplicate_and_interleave_p
29411 support for variable-length unchained SLP reductions if there
29412 is no neutral value, such as for MIN/MAX reductions. Also require
29413 the number of vector elements to be a multiple of the number of
29414 SLP statements when doing variable-length unchained SLP reductions.
29415 Update call to vect_create_epilog_for_reduction.
29416 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
29417 and remove initial values.
29418 (duplicate_and_interleave): Make public.
29419 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
29420 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
29422 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29423 Alan Hayward <alan.hayward@arm.com>
29424 David Sherwood <david.sherwood@arm.com>
29426 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
29427 (can_duplicate_and_interleave_p): New function.
29428 (vect_get_and_check_slp_defs): Take the vector of statements
29429 rather than just the current one. Remove excess parentheses.
29430 Restriction rejectinon of vect_constant_def and vect_external_def
29431 for variable-length vectors to boolean types, or types for which
29432 can_duplicate_and_interleave_p is false.
29433 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
29434 (duplicate_and_interleave): New function.
29435 (vect_get_constant_vectors): Use gimple_build_vector for
29436 constant-length vectors and suitable variable-length constant
29437 vectors. Use duplicate_and_interleave for other variable-length
29438 vectors. Don't defer the update when inserting new statements.
29440 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29441 Alan Hayward <alan.hayward@arm.com>
29442 David Sherwood <david.sherwood@arm.com>
29444 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
29445 min_profitable_iters doesn't go negative.
29447 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29448 Alan Hayward <alan.hayward@arm.com>
29449 David Sherwood <david.sherwood@arm.com>
29451 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
29452 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
29453 * optabs.def (vec_mask_load_lanes_optab): New optab.
29454 (vec_mask_store_lanes_optab): Likewise.
29455 * internal-fn.def (MASK_LOAD_LANES): New internal function.
29456 (MASK_STORE_LANES): Likewise.
29457 * internal-fn.c (mask_load_lanes_direct): New macro.
29458 (mask_store_lanes_direct): Likewise.
29459 (expand_mask_load_optab_fn): Handle masked operations.
29460 (expand_mask_load_lanes_optab_fn): New macro.
29461 (expand_mask_store_optab_fn): Handle masked operations.
29462 (expand_mask_store_lanes_optab_fn): New macro.
29463 (direct_mask_load_lanes_optab_supported_p): Likewise.
29464 (direct_mask_store_lanes_optab_supported_p): Likewise.
29465 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
29467 (vect_load_lanes_supported): Likewise.
29468 * tree-vect-data-refs.c (strip_conversion): New function.
29469 (can_group_stmts_p): Likewise.
29470 (vect_analyze_data_ref_accesses): Use it instead of checking
29471 for a pair of assignments.
29472 (vect_store_lanes_supported): Take a masked_p parameter.
29473 (vect_load_lanes_supported): Likewise.
29474 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
29475 vect_store_lanes_supported and vect_load_lanes_supported.
29476 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
29477 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
29478 parameter. Don't allow gaps for masked accesses.
29479 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
29480 and vect_load_lanes_supported.
29481 (get_load_store_type): Take a masked_p parameter and update
29482 call to get_group_load_store_type.
29483 (vectorizable_store): Update call to get_load_store_type.
29484 Handle IFN_MASK_STORE_LANES.
29485 (vectorizable_load): Update call to get_load_store_type.
29486 Handle IFN_MASK_LOAD_LANES.
29488 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29489 Alan Hayward <alan.hayward@arm.com>
29490 David Sherwood <david.sherwood@arm.com>
29492 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
29494 * config/aarch64/aarch64-protos.h
29495 (aarch64_sve_struct_memory_operand_p): Declare.
29496 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
29497 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
29498 (VPRED, vpred): Handle SVE structure modes.
29499 * config/aarch64/constraints.md (Utx): New constraint.
29500 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
29501 (aarch64_sve_struct_nonimmediate_operand): New predicates.
29502 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
29503 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
29504 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
29505 structure modes. Split into pieces after RA.
29506 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
29507 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
29509 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
29510 SVE structure modes.
29511 (aarch64_classify_address): Likewise.
29512 (sizetochar): Move earlier in file.
29513 (aarch64_print_operand): Handle SVE register lists.
29514 (aarch64_array_mode): New function.
29515 (aarch64_sve_struct_memory_operand_p): Likewise.
29516 (TARGET_ARRAY_MODE): Redefine.
29518 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29519 Alan Hayward <alan.hayward@arm.com>
29520 David Sherwood <david.sherwood@arm.com>
29522 * target.def (array_mode): New target hook.
29523 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
29524 * doc/tm.texi: Regenerate.
29525 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
29526 * hooks.c (hook_optmode_mode_uhwi_none): New function.
29527 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
29528 targetm.array_mode.
29529 * stor-layout.c (mode_for_array): Likewise. Support polynomial
29532 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29533 Alan Hayward <alan.hayward@arm.com>
29534 David Sherwood <david.sherwood@arm.com>
29536 * fold-const.c (fold_binary_loc): Check the argument types
29537 rather than the result type when testing for a vector operation.
29539 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29541 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
29542 * doc/tm.texi: Regenerate.
29544 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29545 Alan Hayward <alan.hayward@arm.com>
29546 David Sherwood <david.sherwood@arm.com>
29548 * doc/invoke.texi (-msve-vector-bits=): Document new option.
29549 (sve): Document new AArch64 extension.
29550 * doc/md.texi (w): Extend the description of the AArch64
29551 constraint to include SVE vectors.
29552 (Upl, Upa): Document new AArch64 predicate constraints.
29553 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
29555 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
29556 (msve-vector-bits=): New option.
29557 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
29558 SVE when these are disabled.
29559 (sve): New extension.
29560 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
29561 modes. Adjust their number of units based on aarch64_sve_vg.
29562 (MAX_BITSIZE_MODE_ANY_MODE): Define.
29563 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
29564 aarch64_addr_query_type.
29565 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
29566 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
29567 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
29568 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
29569 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
29570 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
29571 (aarch64_simd_imm_zero_p): Delete.
29572 (aarch64_check_zero_based_sve_index_immediate): Declare.
29573 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
29574 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
29575 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
29576 (aarch64_sve_float_mul_immediate_p): Likewise.
29577 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
29578 rather than an rtx.
29579 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
29580 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
29581 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
29582 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
29583 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
29584 (aarch64_regmode_natural_size): Likewise.
29585 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
29586 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
29588 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
29589 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
29590 for VG and the SVE predicate registers.
29591 (V_ALIASES): Add a "z"-prefixed alias.
29592 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
29593 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
29594 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
29595 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
29596 (REG_CLASS_NAMES): Add entries for them.
29597 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
29598 and the predicate registers.
29599 (aarch64_sve_vg): Declare.
29600 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
29601 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
29602 (REGMODE_NATURAL_SIZE): Define.
29603 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
29605 * config/aarch64/aarch64.c: Include cfgrtl.h.
29606 (simd_immediate_info): Add a constructor for series vectors,
29607 and an associated step field.
29608 (aarch64_sve_vg): New variable.
29609 (aarch64_dbx_register_number): Handle VG and the predicate registers.
29610 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
29611 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
29612 (VEC_ANY_DATA, VEC_STRUCT): New constants.
29613 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
29614 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
29615 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
29616 (aarch64_get_mask_mode): New functions.
29617 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
29618 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
29619 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
29620 predicate modes and predicate registers. Explicitly restrict
29621 GPRs to modes of 16 bytes or smaller. Only allow FP registers
29622 to store a vector mode if it is recognized by
29623 aarch64_classify_vector_mode.
29624 (aarch64_regmode_natural_size): New function.
29625 (aarch64_hard_regno_caller_save_mode): Return the original mode
29627 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
29628 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
29629 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
29630 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
29632 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
29633 does not overlap dest if the function is frame-related. Handle
29635 (aarch64_split_add_offset): New function.
29636 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
29637 them aarch64_add_offset.
29638 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
29639 and update call to aarch64_sub_sp.
29640 (aarch64_add_cfa_expression): New function.
29641 (aarch64_expand_prologue): Pass extra temporary registers to the
29642 functions above. Handle the case in which we need to emit new
29643 DW_CFA_expressions for registers that were originally saved
29644 relative to the stack pointer, but now have to be expressed
29645 relative to the frame pointer.
29646 (aarch64_output_mi_thunk): Pass extra temporary registers to the
29648 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
29649 IP0 and IP1 values for SVE frames.
29650 (aarch64_expand_vec_series): New function.
29651 (aarch64_expand_sve_widened_duplicate): Likewise.
29652 (aarch64_expand_sve_const_vector): Likewise.
29653 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
29654 Handle SVE constants. Use emit_move_insn to move a force_const_mem
29655 into the register, rather than emitting a SET directly.
29656 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
29657 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
29658 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
29659 (offset_9bit_signed_scaled_p): New functions.
29660 (aarch64_replicate_bitmask_imm): New function.
29661 (aarch64_bitmask_imm): Use it.
29662 (aarch64_cannot_force_const_mem): Reject expressions involving
29663 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
29664 (aarch64_classify_index): Handle SVE indices, by requiring
29665 a plain register index with a scale that matches the element size.
29666 (aarch64_classify_address): Handle SVE addresses. Assert that
29667 the mode of the address is VOIDmode or an integer mode.
29668 Update call to aarch64_classify_symbol.
29669 (aarch64_classify_symbolic_expression): Update call to
29670 aarch64_classify_symbol.
29671 (aarch64_const_vec_all_in_range_p): New function.
29672 (aarch64_print_vector_float_operand): Likewise.
29673 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
29674 "vN" for FP registers with SVE modes. Handle (const ...) vectors
29675 and the FP immediates 1.0 and 0.5.
29676 (aarch64_print_address_internal): Handle SVE addresses.
29677 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
29678 (aarch64_regno_regclass): Handle predicate registers.
29679 (aarch64_secondary_reload): Handle big-endian reloads of SVE
29681 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
29682 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
29683 (aarch64_convert_sve_vector_bits): New function.
29684 (aarch64_override_options): Use it to handle -msve-vector-bits=.
29685 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
29686 rather than an rtx.
29687 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
29688 Handle SVE vector and predicate modes. Accept VL-based constants
29689 that need only one temporary register, and VL offsets that require
29690 no temporary registers.
29691 (aarch64_conditional_register_usage): Mark the predicate registers
29692 as fixed if SVE isn't available.
29693 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
29694 Return true for SVE vector and predicate modes.
29695 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
29696 rather than an unsigned int. Handle SVE modes.
29697 (aarch64_preferred_simd_mode): Update call accordingly. Handle
29699 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
29701 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
29702 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
29703 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
29704 (aarch64_sve_float_mul_immediate_p): New functions.
29705 (aarch64_sve_valid_immediate): New function.
29706 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
29707 Explicitly reject structure modes. Check for INDEX constants.
29708 Handle PTRUE and PFALSE constants.
29709 (aarch64_check_zero_based_sve_index_immediate): New function.
29710 (aarch64_simd_imm_zero_p): Delete.
29711 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
29712 vector modes. Accept constants in the range of CNT[BHWD].
29713 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
29714 ask for an Advanced SIMD mode.
29715 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
29716 (aarch64_simd_vector_alignment): Handle SVE predicates.
29717 (aarch64_vectorize_preferred_vector_alignment): New function.
29718 (aarch64_simd_vector_alignment_reachable): Use it instead of
29720 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
29721 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
29723 (MAX_VECT_LEN): Delete.
29724 (expand_vec_perm_d): Add a vec_flags field.
29725 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
29726 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
29727 (aarch64_evpc_ext): Don't apply a big-endian lane correction
29729 (aarch64_evpc_rev): Rename to...
29730 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
29731 (aarch64_evpc_rev_global): New function.
29732 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
29733 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
29735 (aarch64_evpc_sve_tbl): New function.
29736 (aarch64_expand_vec_perm_const_1): Update after rename of
29737 aarch64_evpc_rev. Handle SVE permutes too, trying
29738 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
29739 than aarch64_evpc_tbl.
29740 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
29741 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
29742 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
29743 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
29744 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
29745 (aarch64_expand_sve_vcond): New functions.
29746 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
29747 of aarch64_vector_mode_p.
29748 (aarch64_dwarf_poly_indeterminate_value): New function.
29749 (aarch64_compute_pressure_classes): Likewise.
29750 (aarch64_can_change_mode_class): Likewise.
29751 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
29752 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
29753 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
29754 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
29755 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
29756 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
29757 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
29758 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
29760 (Dn, Dl, Dr): Accept const as well as const_vector.
29761 (Dz): Likewise. Compare against CONST0_RTX.
29762 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
29763 of "vector" where appropriate.
29764 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
29765 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
29766 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
29767 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
29768 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
29769 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
29770 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
29771 (v_int_equiv): Extend to SVE modes.
29772 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
29774 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
29775 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
29776 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
29777 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
29778 (SVE_COND_FP_CMP): New int iterators.
29779 (perm_hilo): Handle the new unpack unspecs.
29780 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
29782 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
29783 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
29784 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
29785 (aarch64_equality_operator, aarch64_constant_vector_operand)
29786 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
29787 (aarch64_sve_nonimmediate_operand): Likewise.
29788 (aarch64_sve_general_operand): Likewise.
29789 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
29790 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
29791 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
29792 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
29793 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
29794 (aarch64_sve_float_arith_immediate): Likewise.
29795 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
29796 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
29797 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
29798 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
29799 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
29800 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
29801 (aarch64_sve_float_arith_operand): Likewise.
29802 (aarch64_sve_float_arith_with_sub_operand): Likewise.
29803 (aarch64_sve_float_mul_operand): Likewise.
29804 (aarch64_sve_vec_perm_operand): Likewise.
29805 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
29806 (aarch64_mov_operand): Accept const_poly_int and const_vector.
29807 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
29808 as well as const_vector.
29809 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
29810 in file. Use CONST0_RTX and CONSTM1_RTX.
29811 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
29812 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
29813 Use aarch64_simd_imm_zero.
29814 * config/aarch64/aarch64-sve.md: New file.
29815 * config/aarch64/aarch64.md: Include it.
29816 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
29817 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
29818 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
29819 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
29820 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
29821 (sve): New attribute.
29822 (enabled): Disable instructions with the sve attribute unless
29824 (movqi, movhi): Pass CONST_POLY_INT operaneds through
29825 aarch64_expand_mov_immediate.
29826 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
29827 CNT[BHSD] immediates.
29828 (movti): Split CONST_POLY_INT moves into two halves.
29829 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
29830 Split additions that need a temporary here if the destination
29831 is the stack pointer.
29832 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
29833 (*add<mode>3_poly_1): New instruction.
29834 (set_clobber_cc): New expander.
29836 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29838 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
29839 parameter and use it instead of GET_MODE_SIZE (innermode). Use
29840 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
29841 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
29842 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
29843 Change innermode from fixed_mode_size to machine_mode.
29844 (simplify_subreg): Update call accordingly. Handle a constant-sized
29845 subreg of a variable-length CONST_VECTOR.
29847 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29848 Alan Hayward <alan.hayward@arm.com>
29849 David Sherwood <david.sherwood@arm.com>
29851 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
29852 (add_offset_to_base): New function, split out from...
29853 (create_mem_ref): ...here. When handling a scale other than 1,
29854 check first whether the address is valid without the offset.
29855 Add it into the base if so, leaving the index and scale as-is.
29857 2018-01-12 Jakub Jelinek <jakub@redhat.com>
29860 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
29861 fold_for_warn before checking if arg2 is INTEGER_CST.
29863 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
29865 * config/rs6000/predicates.md (load_multiple_operation): Delete.
29866 (store_multiple_operation): Delete.
29867 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
29868 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
29869 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
29870 guarded by TARGET_STRING.
29871 (rs6000_output_load_multiple): Delete.
29872 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
29873 OPTION_MASK_STRING / TARGET_STRING handling.
29874 (print_operand) <'N', 'O'>: Add comment that these are unused now.
29875 (const rs6000_opt_masks) <"string">: Change mask to 0.
29876 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
29877 (MASK_STRING): Delete.
29878 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
29880 (load_multiple): Delete.
29887 (store_multiple): Delete.
29894 (movmemsi_8reg): Delete.
29895 (corresponding unnamed define_insn): Delete.
29896 (movmemsi_6reg): Delete.
29897 (corresponding unnamed define_insn): Delete.
29898 (movmemsi_4reg): Delete.
29899 (corresponding unnamed define_insn): Delete.
29900 (movmemsi_2reg): Delete.
29901 (corresponding unnamed define_insn): Delete.
29902 (movmemsi_1reg): Delete.
29903 (corresponding unnamed define_insn): Delete.
29904 * config/rs6000/rs6000.opt (mno-string): New.
29905 (mstring): Replace by deprecation warning stub.
29906 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
29908 2018-01-12 Jakub Jelinek <jakub@redhat.com>
29910 * regrename.c (regrename_do_replace): If replacing the same
29911 reg multiple times, try to reuse last created gen_raw_REG.
29914 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
29915 main to workaround a bug in GDB.
29917 2018-01-12 Tom de Vries <tom@codesourcery.com>
29920 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
29922 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
29924 PR rtl-optimization/80481
29925 * ira-color.c (get_cap_member): New function.
29926 (allocnos_conflict_by_live_ranges_p): Use it.
29927 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
29928 (setup_slot_coalesced_allocno_live_ranges): Ditto.
29930 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
29933 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
29934 (*saddl_se_1): Ditto.
29935 (*ssubsi_1): Ditto.
29936 (*ssubl_se_1): Ditto.
29938 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
29940 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
29941 rather than wi::to_widest for DR_INITs.
29942 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
29943 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
29944 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
29946 (vect_analyze_group_access_1): Note that here.
29948 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
29950 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
29951 polynomial type sizes.
29953 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
29955 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
29956 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
29957 (gimple_add_tmp_var): Likewise.
29959 2018-01-12 Martin Liska <mliska@suse.cz>
29961 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
29962 (gimple_alloc_sizes): Likewise.
29963 (dump_gimple_statistics): Use PRIu64 in printf format.
29964 * gimple.h: Change uint64_t to int.
29966 2018-01-12 Martin Liska <mliska@suse.cz>
29968 * tree-core.h: Use uint64_t instead of int.
29969 * tree.c (tree_node_counts): Likewise.
29970 (tree_node_sizes): Likewise.
29971 (dump_tree_statistics): Use PRIu64 in printf format.
29973 2018-01-12 Martin Liska <mliska@suse.cz>
29975 * Makefile.in: As qsort_chk is implemented in vec.c, add
29976 vec.o to linkage of gencfn-macros.
29977 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
29978 passing the info to record_node_allocation_statistics.
29979 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
29981 * ggc-common.c (struct ggc_usage): Add operator== and use
29982 it in operator< and compare function.
29983 * mem-stats.h (struct mem_usage): Likewise.
29984 * vec.c (struct vec_usage): Remove operator< and compare
29985 function. Can be simply inherited.
29987 2018-01-12 Martin Jambor <mjambor@suse.cz>
29990 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
29991 * tree-ssa-math-opts.c: Include domwalk.h.
29992 (convert_mult_to_fma_1): New function.
29993 (fma_transformation_info): New type.
29994 (fma_deferring_state): Likewise.
29995 (cancel_fma_deferring): New function.
29996 (result_of_phi): Likewise.
29997 (last_fma_candidate_feeds_initial_phi): Likewise.
29998 (convert_mult_to_fma): Added deferring logic, split actual
29999 transformation to convert_mult_to_fma_1.
30000 (math_opts_dom_walker): New type.
30001 (math_opts_dom_walker::after_dom_children): New method, body moved
30002 here from pass_optimize_widening_mul::execute, added deferring logic
30004 (pass_optimize_widening_mul::execute): Moved most of code to
30005 math_opts_dom_walker::after_dom_children.
30006 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
30007 * config/i386/i386.c (ix86_option_override_internal): Added
30008 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
30010 2018-01-12 Richard Biener <rguenther@suse.de>
30013 * dwarf2out.c (gen_variable_die): Do not reset old_die for
30014 inline instance vars.
30016 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
30019 * config/rx/rx.c (rx_is_restricted_memory_address):
30020 Handle SUBREG case.
30022 2018-01-12 Richard Biener <rguenther@suse.de>
30024 PR tree-optimization/80846
30025 * target.def (split_reduction): New target hook.
30026 * targhooks.c (default_split_reduction): New function.
30027 * targhooks.h (default_split_reduction): Declare.
30028 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
30029 target requests first reduce vectors by combining low and high
30031 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
30032 (get_vectype_for_scalar_type_and_size): Export.
30033 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
30034 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
30035 * doc/tm.texi: Regenerate.
30036 * config/i386/i386.c (ix86_split_reduction): Implement
30037 TARGET_VECTORIZE_SPLIT_REDUCTION.
30039 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
30042 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
30043 in PIC mode except for TARGET_VXWORKS_RTP.
30044 * config/sparc/sparc.c: Include cfgrtl.h.
30045 (TARGET_INIT_PIC_REG): Define.
30046 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
30047 (sparc_pic_register_p): New predicate.
30048 (sparc_legitimate_address_p): Use it.
30049 (sparc_legitimize_pic_address): Likewise.
30050 (sparc_delegitimize_address): Likewise.
30051 (sparc_mode_dependent_address_p): Likewise.
30052 (gen_load_pcrel_sym): Remove 4th parameter.
30053 (load_got_register): Adjust call to above. Remove obsolete stuff.
30054 (sparc_expand_prologue): Do not call load_got_register here.
30055 (sparc_flat_expand_prologue): Likewise.
30056 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
30057 (sparc_use_pseudo_pic_reg): New function.
30058 (sparc_init_pic_reg): Likewise.
30059 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
30060 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
30062 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
30064 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
30065 Add item for branch_cost.
30067 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
30069 PR rtl-optimization/83565
30070 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
30071 not extend the result to a larger mode for rotate operations.
30072 (num_sign_bit_copies1): Likewise.
30074 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
30077 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
30079 Use values-Xc.o for -pedantic.
30080 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
30082 2018-01-12 Martin Liska <mliska@suse.cz>
30085 * ipa-devirt.c (final_warning_record::grow_type_warnings):
30087 (possible_polymorphic_call_targets): Use it.
30088 (ipa_devirt): Likewise.
30090 2018-01-12 Martin Liska <mliska@suse.cz>
30092 * profile-count.h (enum profile_quality): Use 0 as invalid
30093 enum value of profile_quality.
30095 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
30097 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
30098 -mext-string options.
30100 2018-01-12 Richard Biener <rguenther@suse.de>
30102 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
30103 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
30104 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
30106 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
30108 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
30110 * configure.ac (--with-long-double-format): Add support for the
30111 configuration option to change the default long double format on
30113 * config.gcc (powerpc*-linux*-*): Likewise.
30114 * configure: Regenerate.
30115 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
30116 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
30117 used without modification.
30119 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
30121 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
30122 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
30123 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
30124 MISC_BUILTIN_SPEC_BARRIER.
30125 (rs6000_init_builtins): Likewise.
30126 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
30128 (speculation_barrier): New define_insn.
30129 * doc/extend.texi: Document __builtin_speculation_barrier.
30131 2018-01-11 Jakub Jelinek <jakub@redhat.com>
30134 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
30135 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
30136 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
30138 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
30139 integral modes instead of "ss" and "sd".
30140 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
30141 vectors with 32-bit and 64-bit elements.
30142 (vecdupssescalarmodesuffix): New mode attribute.
30143 (vec_dup<mode>): Use it.
30145 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
30148 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
30149 frame if argument is passed on stack.
30151 2018-01-11 Jakub Jelinek <jakub@redhat.com>
30154 * ree.c (combine_reaching_defs): Optimize also
30155 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
30156 reg2=any_extend(exp); reg1=reg2;, formatting fix.
30158 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
30160 PR middle-end/83189
30161 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
30163 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
30165 PR middle-end/83718
30166 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
30167 after they are computed.
30169 2018-01-11 Bin Cheng <bin.cheng@arm.com>
30171 PR tree-optimization/83695
30172 * gimple-loop-linterchange.cc
30173 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
30174 reset cached scev information after interchange.
30175 (pass_linterchange::execute): Remove call to scev_reset_htab.
30177 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
30179 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
30180 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
30181 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
30182 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
30183 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
30184 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
30185 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
30186 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
30187 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
30188 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
30189 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
30190 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
30191 (V_lane_reg): Likewise.
30192 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
30194 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
30195 (vfmal_lane_low<mode>_intrinsic,
30196 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
30197 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
30198 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
30199 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
30200 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
30201 vfmsl_lane_high<mode>_intrinsic): New define_insns.
30203 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
30205 * config/arm/arm-cpus.in (fp16fml): New feature.
30206 (ALL_SIMD): Add fp16fml.
30207 (armv8.2-a): Add fp16fml as an option.
30208 (armv8.3-a): Likewise.
30209 (armv8.4-a): Add fp16fml as part of fp16.
30210 * config/arm/arm.h (TARGET_FP16FML): Define.
30211 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
30213 * config/arm/arm-modes.def (V2HF): Define.
30214 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
30215 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
30216 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
30217 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
30218 vfmsl_low, vfmsl_high): New set of builtins.
30219 * config/arm/iterators.md (PLUSMINUS): New code iterator.
30220 (vfml_op): New code attribute.
30221 (VFMLHALVES): New int iterator.
30222 (VFML, VFMLSEL): New mode attributes.
30223 (V_reg): Define mapping for V2HF.
30224 (V_hi, V_lo): New mode attributes.
30225 (VF_constraint): Likewise.
30226 (vfml_half, vfml_half_selector): New int attributes.
30227 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
30229 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
30230 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
30232 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
30233 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
30234 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
30235 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
30237 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
30238 Document new effective target and option set.
30240 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
30242 * config/arm/arm-cpus.in (armv8_4): New feature.
30243 (ARMv8_4a): New fgroup.
30244 (armv8.4-a): New arch.
30245 * config/arm/arm-tables.opt: Regenerate.
30246 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
30247 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
30248 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
30249 Add matching rules for -march=armv8.4-a and extensions.
30250 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
30252 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
30255 * config/rx/rx.md (BW): New mode attribute.
30256 (sync_lock_test_and_setsi): Add mode suffix to insn output.
30258 2018-01-11 Richard Biener <rguenther@suse.de>
30260 PR tree-optimization/83435
30261 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
30262 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
30263 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
30265 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
30266 Alan Hayward <alan.hayward@arm.com>
30267 David Sherwood <david.sherwood@arm.com>
30269 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
30271 (aarch64_classify_address): Initialize it. Track polynomial offsets.
30272 (aarch64_print_address_internal): Use it to check for a zero offset.
30274 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
30275 Alan Hayward <alan.hayward@arm.com>
30276 David Sherwood <david.sherwood@arm.com>
30278 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
30279 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
30280 Return a poly_int64 rather than a HOST_WIDE_INT.
30281 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
30282 rather than a HOST_WIDE_INT.
30283 * config/aarch64/aarch64.h (aarch64_frame): Protect with
30284 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
30285 hard_fp_offset, frame_size, initial_adjust, callee_offset and
30286 final_offset from HOST_WIDE_INT to poly_int64.
30287 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
30288 to_constant when getting the number of units in an Advanced SIMD
30290 (aarch64_builtin_vectorized_function): Check for a constant number
30292 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
30294 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
30295 attribute instead of GET_MODE_NUNITS.
30296 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
30297 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
30298 GET_MODE_SIZE for fixed-size registers.
30299 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
30300 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
30301 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
30302 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
30303 (aarch64_print_operand, aarch64_print_address_internal)
30304 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
30305 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
30306 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
30307 Handle polynomial GET_MODE_SIZE.
30308 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
30309 wider than SImode without modification.
30310 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
30311 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
30312 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
30313 passing and returning SVE modes.
30314 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
30315 rather than GEN_INT.
30316 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
30317 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
30318 (aarch64_allocate_and_probe_stack_space): Likewise.
30319 (aarch64_layout_frame): Cope with polynomial offsets.
30320 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
30321 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
30322 polynomial offsets.
30323 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
30324 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
30325 poly_int64 rather than a HOST_WIDE_INT.
30326 (aarch64_get_separate_components, aarch64_process_components)
30327 (aarch64_expand_prologue, aarch64_expand_epilogue)
30328 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
30329 (aarch64_anchor_offset): New function, split out from...
30330 (aarch64_legitimize_address): ...here.
30331 (aarch64_builtin_vectorization_cost): Handle polynomial
30332 TYPE_VECTOR_SUBPARTS.
30333 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
30335 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
30336 number of elements from the PARALLEL rather than the mode.
30337 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
30338 rather than GET_MODE_BITSIZE.
30339 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
30340 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
30341 (aarch64_expand_vec_perm_const_1): Handle polynomial
30342 d->perm.length () and d->perm elements.
30343 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
30344 Apply to_constant to d->perm elements.
30345 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
30346 polynomial CONST_VECTOR_NUNITS.
30347 (aarch64_move_pointer): Take amount as a poly_int64 rather
30349 (aarch64_progress_pointer): Avoid temporary variable.
30350 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
30351 the mode attribute instead of GET_MODE.
30353 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
30354 Alan Hayward <alan.hayward@arm.com>
30355 David Sherwood <david.sherwood@arm.com>
30357 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
30358 x exists before using it.
30359 (aarch64_add_constant_internal): Rename to...
30360 (aarch64_add_offset_1): ...this. Replace regnum with separate
30361 src and dest rtxes. Handle the case in which they're different,
30362 including when the offset is zero. Replace scratchreg with an rtx.
30363 Use 2 additions if there is no spare register into which we can
30364 move a 16-bit constant.
30365 (aarch64_add_constant): Delete.
30366 (aarch64_add_offset): Replace reg with separate src and dest
30367 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
30368 Use aarch64_add_offset_1.
30369 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
30370 an rtx rather than an int. Take the delta as a poly_int64
30371 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
30372 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
30373 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
30374 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
30375 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
30376 and aarch64_add_sp.
30377 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
30378 aarch64_add_constant.
30380 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
30382 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
30383 Use scalar_float_mode.
30385 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
30387 * config/aarch64/aarch64-simd.md
30388 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
30389 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
30390 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
30391 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
30392 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
30393 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
30394 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
30395 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
30396 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
30397 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
30399 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
30402 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
30403 targ_options->x_arm_arch_string is non NULL.
30405 2018-01-11 Tamar Christina <tamar.christina@arm.com>
30407 * config/aarch64/aarch64.h
30408 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
30410 2018-01-11 Sudakshina Das <sudi.das@arm.com>
30413 * expmed.c (emit_store_flag_force): Swap if const op0
30414 and change VOIDmode to mode of op0.
30416 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
30418 PR rtl-optimization/83761
30419 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
30420 than bytes to mode_for_size.
30422 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
30424 PR middle-end/83189
30425 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
30426 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
30429 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
30431 PR middle-end/83575
30432 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
30433 when in layout mode.
30434 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
30435 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
30438 2018-01-10 Michael Collison <michael.collison@arm.com>
30440 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
30441 * config/aarch64/aarch64-option-extension.def: Add
30442 AARCH64_OPT_EXTENSION of 'fp16fml'.
30443 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
30444 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
30445 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
30446 * config/aarch64/constraints.md (Ui7): New constraint.
30447 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
30448 (VFMLA_SEL_W): Ditto.
30451 (VFMLA16_LOW): New int iterator.
30452 (VFMLA16_HIGH): Ditto.
30453 (UNSPEC_FMLAL): New unspec.
30454 (UNSPEC_FMLSL): Ditto.
30455 (UNSPEC_FMLAL2): Ditto.
30456 (UNSPEC_FMLSL2): Ditto.
30457 (f16mac): New code attribute.
30458 * config/aarch64/aarch64-simd-builtins.def
30459 (aarch64_fmlal_lowv2sf): Ditto.
30460 (aarch64_fmlsl_lowv2sf): Ditto.
30461 (aarch64_fmlalq_lowv4sf): Ditto.
30462 (aarch64_fmlslq_lowv4sf): Ditto.
30463 (aarch64_fmlal_highv2sf): Ditto.
30464 (aarch64_fmlsl_highv2sf): Ditto.
30465 (aarch64_fmlalq_highv4sf): Ditto.
30466 (aarch64_fmlslq_highv4sf): Ditto.
30467 (aarch64_fmlal_lane_lowv2sf): Ditto.
30468 (aarch64_fmlsl_lane_lowv2sf): Ditto.
30469 (aarch64_fmlal_laneq_lowv2sf): Ditto.
30470 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
30471 (aarch64_fmlalq_lane_lowv4sf): Ditto.
30472 (aarch64_fmlsl_lane_lowv4sf): Ditto.
30473 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
30474 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
30475 (aarch64_fmlal_lane_highv2sf): Ditto.
30476 (aarch64_fmlsl_lane_highv2sf): Ditto.
30477 (aarch64_fmlal_laneq_highv2sf): Ditto.
30478 (aarch64_fmlsl_laneq_highv2sf): Ditto.
30479 (aarch64_fmlalq_lane_highv4sf): Ditto.
30480 (aarch64_fmlsl_lane_highv4sf): Ditto.
30481 (aarch64_fmlalq_laneq_highv4sf): Ditto.
30482 (aarch64_fmlsl_laneq_highv4sf): Ditto.
30483 * config/aarch64/aarch64-simd.md:
30484 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
30485 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
30486 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
30487 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
30488 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
30489 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
30490 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
30491 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
30492 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
30493 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
30494 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
30495 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
30496 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
30497 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
30498 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
30499 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
30500 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
30501 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
30502 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
30503 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
30504 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
30505 (vfmlsl_low_u32): Ditto.
30506 (vfmlalq_low_u32): Ditto.
30507 (vfmlslq_low_u32): Ditto.
30508 (vfmlal_high_u32): Ditto.
30509 (vfmlsl_high_u32): Ditto.
30510 (vfmlalq_high_u32): Ditto.
30511 (vfmlslq_high_u32): Ditto.
30512 (vfmlal_lane_low_u32): Ditto.
30513 (vfmlsl_lane_low_u32): Ditto.
30514 (vfmlal_laneq_low_u32): Ditto.
30515 (vfmlsl_laneq_low_u32): Ditto.
30516 (vfmlalq_lane_low_u32): Ditto.
30517 (vfmlslq_lane_low_u32): Ditto.
30518 (vfmlalq_laneq_low_u32): Ditto.
30519 (vfmlslq_laneq_low_u32): Ditto.
30520 (vfmlal_lane_high_u32): Ditto.
30521 (vfmlsl_lane_high_u32): Ditto.
30522 (vfmlal_laneq_high_u32): Ditto.
30523 (vfmlsl_laneq_high_u32): Ditto.
30524 (vfmlalq_lane_high_u32): Ditto.
30525 (vfmlslq_lane_high_u32): Ditto.
30526 (vfmlalq_laneq_high_u32): Ditto.
30527 (vfmlslq_laneq_high_u32): Ditto.
30528 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
30529 (AARCH64_FL_FOR_ARCH8_4): New.
30530 (AARCH64_ISA_F16FML): New ISA flag.
30531 (TARGET_F16FML): New feature flag for fp16fml.
30532 (doc/invoke.texi): Document new fp16fml option.
30534 2018-01-10 Michael Collison <michael.collison@arm.com>
30536 * config/aarch64/aarch64-builtins.c:
30537 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
30538 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
30539 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
30540 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
30541 (AARCH64_ISA_SHA3): New ISA flag.
30542 (TARGET_SHA3): New feature flag for sha3.
30543 * config/aarch64/iterators.md (sha512_op): New int attribute.
30544 (CRYPTO_SHA512): New int iterator.
30545 (UNSPEC_SHA512H): New unspec.
30546 (UNSPEC_SHA512H2): Ditto.
30547 (UNSPEC_SHA512SU0): Ditto.
30548 (UNSPEC_SHA512SU1): Ditto.
30549 * config/aarch64/aarch64-simd-builtins.def
30550 (aarch64_crypto_sha512hqv2di): New builtin.
30551 (aarch64_crypto_sha512h2qv2di): Ditto.
30552 (aarch64_crypto_sha512su0qv2di): Ditto.
30553 (aarch64_crypto_sha512su1qv2di): Ditto.
30554 (aarch64_eor3qv8hi): Ditto.
30555 (aarch64_rax1qv2di): Ditto.
30556 (aarch64_xarqv2di): Ditto.
30557 (aarch64_bcaxqv8hi): Ditto.
30558 * config/aarch64/aarch64-simd.md:
30559 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
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/arm_neon.h (vsha512hq_u64): New intrinsic.
30567 (vsha512h2q_u64): Ditto.
30568 (vsha512su0q_u64): Ditto.
30569 (vsha512su1q_u64): Ditto.
30570 (veor3q_u16): Ditto.
30571 (vrax1q_u64): Ditto.
30572 (vxarq_u64): Ditto.
30573 (vbcaxq_u16): Ditto.
30574 * config/arm/types.md (crypto_sha512): New type attribute.
30575 (crypto_sha3): Ditto.
30576 (doc/invoke.texi): Document new sha3 option.
30578 2018-01-10 Michael Collison <michael.collison@arm.com>
30580 * config/aarch64/aarch64-builtins.c:
30581 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
30582 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
30583 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
30584 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
30585 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
30586 (AARCH64_ISA_SM4): New ISA flag.
30587 (TARGET_SM4): New feature flag for sm4.
30588 * config/aarch64/aarch64-simd-builtins.def
30589 (aarch64_sm3ss1qv4si): Ditto.
30590 (aarch64_sm3tt1aq4si): Ditto.
30591 (aarch64_sm3tt1bq4si): Ditto.
30592 (aarch64_sm3tt2aq4si): Ditto.
30593 (aarch64_sm3tt2bq4si): Ditto.
30594 (aarch64_sm3partw1qv4si): Ditto.
30595 (aarch64_sm3partw2qv4si): Ditto.
30596 (aarch64_sm4eqv4si): Ditto.
30597 (aarch64_sm4ekeyqv4si): Ditto.
30598 * config/aarch64/aarch64-simd.md:
30599 (aarch64_sm3ss1qv4si): Ditto.
30600 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
30601 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
30602 (aarch64_sm4eqv4si): Ditto.
30603 (aarch64_sm4ekeyqv4si): Ditto.
30604 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
30605 (sm3part_op): Ditto.
30606 (CRYPTO_SM3TT): Ditto.
30607 (CRYPTO_SM3PART): Ditto.
30608 (UNSPEC_SM3SS1): New unspec.
30609 (UNSPEC_SM3TT1A): Ditto.
30610 (UNSPEC_SM3TT1B): Ditto.
30611 (UNSPEC_SM3TT2A): Ditto.
30612 (UNSPEC_SM3TT2B): Ditto.
30613 (UNSPEC_SM3PARTW1): Ditto.
30614 (UNSPEC_SM3PARTW2): Ditto.
30615 (UNSPEC_SM4E): Ditto.
30616 (UNSPEC_SM4EKEY): Ditto.
30617 * config/aarch64/constraints.md (Ui2): New constraint.
30618 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
30619 * config/arm/types.md (crypto_sm3): New type attribute.
30620 (crypto_sm4): Ditto.
30621 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
30622 (vsm3tt1aq_u32): Ditto.
30623 (vsm3tt1bq_u32): Ditto.
30624 (vsm3tt2aq_u32): Ditto.
30625 (vsm3tt2bq_u32): Ditto.
30626 (vsm3partw1q_u32): Ditto.
30627 (vsm3partw2q_u32): Ditto.
30628 (vsm4eq_u32): Ditto.
30629 (vsm4ekeyq_u32): Ditto.
30630 (doc/invoke.texi): Document new sm4 option.
30632 2018-01-10 Michael Collison <michael.collison@arm.com>
30634 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
30635 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
30636 (AARCH64_FL_FOR_ARCH8_4): New.
30637 (AARCH64_FL_V8_4): New flag.
30638 (doc/invoke.texi): Document new armv8.4-a option.
30640 2018-01-10 Michael Collison <michael.collison@arm.com>
30642 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
30643 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
30644 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
30645 * config/aarch64/aarch64-option-extension.def: Add
30646 AARCH64_OPT_EXTENSION of 'sha2'.
30647 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
30648 (crypto): Disable sha2 and aes if crypto disabled.
30649 (crypto): Enable aes and sha2 if enabled.
30650 (simd): Disable sha2 and aes if simd disabled.
30651 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
30653 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
30654 (TARGET_SHA2): New feature flag for sha2.
30655 (TARGET_AES): New feature flag for aes.
30656 * config/aarch64/aarch64-simd.md:
30657 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
30658 conditional on TARGET_AES.
30659 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
30660 (aarch64_crypto_sha1hsi): Make pattern conditional
30662 (aarch64_crypto_sha1hv4si): Ditto.
30663 (aarch64_be_crypto_sha1hv4si): Ditto.
30664 (aarch64_crypto_sha1su1v4si): Ditto.
30665 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
30666 (aarch64_crypto_sha1su0v4si): Ditto.
30667 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
30668 (aarch64_crypto_sha256su0v4si): Ditto.
30669 (aarch64_crypto_sha256su1v4si): Ditto.
30670 (doc/invoke.texi): Document new aes and sha2 options.
30672 2018-01-10 Martin Sebor <msebor@redhat.com>
30674 PR tree-optimization/83781
30675 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
30678 2018-01-11 Martin Sebor <msebor@gmail.com>
30679 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
30681 PR tree-optimization/83501
30682 PR tree-optimization/81703
30684 * tree-ssa-strlen.c (get_string_cst): Rename...
30685 (get_string_len): ...to this. Handle global constants.
30686 (handle_char_store): Adjust.
30688 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
30689 Jim Wilson <jimw@sifive.com>
30691 * config/riscv/riscv-protos.h (riscv_output_return): New.
30692 * config/riscv/riscv.c (struct machine_function): New naked_p field.
30693 (riscv_attribute_table, riscv_output_return),
30694 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
30695 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
30696 (riscv_compute_frame_info): Only compute frame->mask if not a naked
30698 (riscv_expand_prologue): Add early return for naked function.
30699 (riscv_expand_epilogue): Likewise.
30700 (riscv_function_ok_for_sibcall): Return false for naked function.
30701 (riscv_set_current_function): New.
30702 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
30703 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
30704 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
30705 * doc/extend.texi (RISC-V Function Attributes): New.
30707 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
30709 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
30710 check for 128-bit long double before checking TCmode.
30711 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
30712 128-bit long doubles before checking TFmode or TCmode.
30713 (FLOAT128_IBM_P): Likewise.
30715 2018-01-10 Martin Sebor <msebor@redhat.com>
30717 PR tree-optimization/83671
30718 * builtins.c (c_strlen): Unconditionally return zero for the empty
30720 Use -Warray-bounds for warnings.
30721 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
30722 for non-constant array indices with COMPONENT_REF, arrays of
30723 arrays, and pointers to arrays.
30724 (gimple_fold_builtin_strlen): Determine and set length range for
30725 non-constant character arrays.
30727 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
30729 PR middle-end/81897
30730 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
30733 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
30735 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
30737 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
30740 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
30741 VECTOR_MEM_ALTIVEC_OR_VSX_P.
30742 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
30743 indexed_or_indirect_operand predicate.
30744 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
30745 (*vsx_le_perm_load_v8hi): Likewise.
30746 (*vsx_le_perm_load_v16qi): Likewise.
30747 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
30748 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
30749 (*vsx_le_perm_store_v8hi): Likewise.
30750 (*vsx_le_perm_store_v16qi): Likewise.
30751 (eight unnamed splitters): Likewise.
30753 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
30755 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
30756 * config/rs6000/emmintrin.h: Likewise.
30757 * config/rs6000/mmintrin.h: Likewise.
30758 * config/rs6000/xmmintrin.h: Likewise.
30760 2018-01-10 David Malcolm <dmalcolm@redhat.com>
30763 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
30765 * tree.c (tree_nop_conversion): Return true for location wrapper
30767 (maybe_wrap_with_location): New function.
30768 (selftest::check_strip_nops): New function.
30769 (selftest::test_location_wrappers): New function.
30770 (selftest::tree_c_tests): Call it.
30771 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
30772 (maybe_wrap_with_location): New decl.
30773 (EXPR_LOCATION_WRAPPER_P): New macro.
30774 (location_wrapper_p): New inline function.
30775 (tree_strip_any_location_wrapper): New inline function.
30777 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
30780 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
30781 stack_realign_offset for the largest alignment of stack slot
30783 (ix86_find_max_used_stack_alignment): New function.
30784 (ix86_finalize_stack_frame_flags): Use it. Set
30785 max_used_stack_alignment if we don't realign stack.
30786 * config/i386/i386.h (machine_function): Add
30787 max_used_stack_alignment.
30789 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
30791 * config/arm/arm.opt (-mbranch-cost): New option.
30792 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
30795 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
30798 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
30799 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
30801 2018-01-10 Richard Biener <rguenther@suse.de>
30804 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
30805 early out so it also covers the case where we have a non-NULL
30808 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
30810 PR tree-optimization/83753
30811 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
30812 for non-strided grouped accesses if the number of elements is 1.
30814 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
30817 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
30818 * i386.h (TARGET_USE_GATHER): Define.
30819 * x86-tune.def (X86_TUNE_USE_GATHER): New.
30821 2018-01-10 Martin Liska <mliska@suse.cz>
30824 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
30825 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
30827 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
30828 CLEANUP_NO_PARTITIONING is not set.
30830 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
30832 * doc/rtl.texi: Remove documentation of (const ...) wrappers
30833 for vectors, as a partial revert of r254296.
30834 * rtl.h (const_vec_p): Delete.
30835 (const_vec_duplicate_p): Don't test for vector CONSTs.
30836 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
30837 * expmed.c (make_tree): Likewise.
30840 * common.md (E, F): Use CONSTANT_P instead of checking for
30842 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
30843 checking for CONST_VECTOR.
30845 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
30847 PR middle-end/83575
30848 * predict.c (force_edge_cold): Handle in more sane way edges
30849 with no prediction.
30851 2018-01-09 Carl Love <cel@us.ibm.com>
30853 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
30855 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
30856 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
30857 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
30858 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
30859 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
30860 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
30861 * config/rs6000/rs6000-protos.h: Add extern defition for
30862 rs6000_generate_float2_double_code.
30863 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
30865 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
30866 (float2_v2df): Add define_expand.
30868 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
30871 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
30872 op_mode in the force_to_mode call.
30874 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
30876 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
30877 instead of checking each element individually.
30878 (aarch64_evpc_uzp): Likewise.
30879 (aarch64_evpc_zip): Likewise.
30880 (aarch64_evpc_ext): Likewise.
30881 (aarch64_evpc_rev): Likewise.
30882 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
30883 instead of checking each element individually. Return true without
30885 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
30886 whether all selected elements come from the same input, instead of
30887 checking each element individually. Remove calls to gen_rtx_REG,
30888 start_sequence and end_sequence and instead assert that no rtl is
30891 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
30893 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
30894 order of HIGH and CONST checks.
30896 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
30898 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
30899 if the destination isn't an SSA_NAME.
30901 2018-01-09 Richard Biener <rguenther@suse.de>
30903 PR tree-optimization/83668
30904 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
30906 (canonicalize_loop_form): ... here, renamed from ...
30907 (canonicalize_loop_closed_ssa_form): ... this and amended to
30908 swap successor edges for loop exit blocks to make us use
30909 the RPO order we need for initial schedule generation.
30911 2018-01-09 Joseph Myers <joseph@codesourcery.com>
30913 PR tree-optimization/64811
30914 * match.pd: When optimizing comparisons with Inf, avoid
30915 introducing or losing exceptions from comparisons with NaN.
30917 2018-01-09 Martin Liska <mliska@suse.cz>
30920 * asan.c (shadow_mem_size): Add gcc_assert.
30922 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
30924 Don't save registers in main().
30927 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
30928 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
30929 * config/avr/avr.c (avr_set_current_function): Don't error if
30930 naked, OS_task or OS_main are specified at the same time.
30931 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
30933 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
30935 * common/config/avr/avr-common.c (avr_option_optimization_table):
30936 Switch on -mmain-is-OS_task for optimizing compilations.
30938 2018-01-09 Richard Biener <rguenther@suse.de>
30940 PR tree-optimization/83572
30941 * graphite.c: Include cfganal.h.
30942 (graphite_transform_loops): Connect infinite loops to exit
30943 and remove fake edges at the end.
30945 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
30947 * ipa-inline.c (edge_badness): Revert accidental checkin.
30949 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
30952 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
30953 symbols; not inline clones.
30955 2018-01-09 Jakub Jelinek <jakub@redhat.com>
30958 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
30959 hard registers. Formatting fixes.
30961 PR preprocessor/83722
30962 * gcc.c (try_generate_repro): Pass
30963 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
30964 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
30967 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
30968 Kito Cheng <kito.cheng@gmail.com>
30970 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
30971 (riscv_leaf_function_p): Delete.
30972 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
30974 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
30976 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
30978 (do_ifelse): New function.
30979 (do_isel): New function.
30980 (do_sub3): New function.
30981 (do_add3): New function.
30982 (do_load_mask_compare): New function.
30983 (do_overlap_load_compare): New function.
30984 (expand_compare_loop): New function.
30985 (expand_block_compare): Call expand_compare_loop() when appropriate.
30986 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
30987 option description.
30988 (-mblock-compare-inline-loop-limit): New option.
30990 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
30993 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
30994 Reverse order of second and third operands in first alternative.
30995 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
30996 of first and second elements in UNSPEC_VPERMR vector.
30997 (altivec_expand_vec_perm_le): Likewise.
30999 2018-01-08 Jeff Law <law@redhat.com>
31001 PR rtl-optimizatin/81308
31002 * tree-switch-conversion.c (cfg_altered): New file scoped static.
31003 (process_switch): If group_case_labels makes a change, then set
31005 (pass_convert_switch::execute): If a switch is converted, then
31006 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
31008 PR rtl-optimization/81308
31009 * recog.c (split_all_insns): Conditionally cleanup the CFG after
31012 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
31014 PR target/83663 - Revert r255946
31015 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
31016 generation for cases where splatting a value is not useful.
31017 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
31018 across a vec_duplicate and a paradoxical subreg forming a vector
31019 mode to a vec_concat.
31021 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
31023 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
31024 -march=armv8.3-a variants.
31025 * config/arm/t-multilib: Likewise.
31026 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
31028 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
31030 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
31032 (cceq_ior_compare_complement): Give it a name so I can use it, and
31033 change boolean_or_operator predicate to boolean_operator so it can
31034 be used to generate a crand.
31035 (eqne): New code iterator.
31036 (bd/bd_neg): New code_attrs.
31037 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
31038 a single define_insn.
31039 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
31040 decrement (bdnzt/bdnzf/bdzt/bdzf).
31041 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
31042 with the new names of the branch decrement patterns, and added the
31043 names of the branch decrement conditional patterns.
31045 2018-01-08 Richard Biener <rguenther@suse.de>
31047 PR tree-optimization/83563
31048 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
31051 2018-01-08 Richard Biener <rguenther@suse.de>
31053 PR middle-end/83713
31054 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
31056 2018-01-08 Richard Biener <rguenther@suse.de>
31058 PR tree-optimization/83685
31059 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
31060 references to abnormals.
31062 2018-01-08 Richard Biener <rguenther@suse.de>
31065 * dwarf2out.c (output_indirect_strings): Handle empty
31066 skeleton_debug_str_hash.
31067 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
31069 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
31071 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
31072 (emit_store_direct): Likewise.
31073 (arc_trampoline_adjust_address): Likewise.
31074 (arc_asm_trampoline_template): New function.
31075 (arc_initialize_trampoline): Use asm_trampoline_template.
31076 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
31077 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
31078 * config/arc/arc.md (flush_icache): Delete pattern.
31080 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
31082 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
31083 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
31086 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
31089 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
31090 by not USED_FOR_TARGET.
31091 (make_pass_resolve_sw_modes): Likewise.
31093 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
31095 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
31098 2018-01-08 Richard Biener <rguenther@suse.de>
31100 PR middle-end/83580
31101 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
31103 2018-01-08 Richard Biener <rguenther@suse.de>
31105 PR middle-end/83517
31106 * match.pd ((t * 2) / 2) -> t): Add missing :c.
31108 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
31110 PR middle-end/81897
31111 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
31112 basic blocks with a small number of successors.
31113 (convert_control_dep_chain_into_preds): Improve handling of
31115 (dump_predicates): Split apart into...
31116 (dump_pred_chain): ...here...
31117 (dump_pred_info): ...and here.
31118 (can_one_predicate_be_invalidated_p): Add debugging printfs.
31119 (can_chain_union_be_invalidated_p): Improve check for invalidation
31121 (uninit_uses_cannot_happen): Avoid unnecessary if
31122 convert_control_dep_chain_into_preds yielded nothing.
31124 2018-01-06 Martin Sebor <msebor@redhat.com>
31126 PR tree-optimization/83640
31127 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
31128 subtracting negative offset from size.
31129 (builtin_access::overlap): Adjust offset bounds of the access to fall
31130 within the size of the object if possible.
31132 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
31134 PR rtl-optimization/83699
31135 * expmed.c (extract_bit_field_1): Restrict the vector usage of
31136 extract_bit_field_as_subreg to cases in which the extracted
31137 value is also a vector.
31139 * lra-constraints.c (process_alt_operands): Test for the equivalence
31140 substitutions when detecting a possible reload cycle.
31142 2018-01-06 Jakub Jelinek <jakub@redhat.com>
31145 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
31146 by default if flag_selective_schedling{,2}. Formatting fixes.
31148 PR rtl-optimization/83682
31149 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
31150 if it has non-VECTOR_MODE element mode.
31151 (vec_duplicate_p): Likewise.
31153 PR middle-end/83694
31154 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
31155 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
31157 2018-01-05 Jakub Jelinek <jakub@redhat.com>
31160 * config/i386/i386-builtin.def
31161 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
31162 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
31163 Require also OPTION_MASK_ISA_AVX512F in addition to
31164 OPTION_MASK_ISA_GFNI.
31165 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
31166 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
31167 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
31168 to OPTION_MASK_ISA_GFNI.
31169 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
31170 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
31171 OPTION_MASK_ISA_AVX512BW.
31172 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
31173 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
31174 addition to OPTION_MASK_ISA_GFNI.
31175 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
31176 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
31177 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
31178 to OPTION_MASK_ISA_GFNI.
31179 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
31180 a requirement for all ISAs rather than any of them with a few
31182 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
31184 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
31185 bitmasks to be enabled with 3 exceptions, instead of requiring any
31186 enabled ISA with lots of exceptions.
31187 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
31188 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
31189 Change avx512bw in isa attribute to avx512f.
31190 * config/i386/sgxintrin.h: Add license boilerplate.
31191 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
31192 to __AVX512F__ and __AVX512VL to __AVX512VL__.
31193 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
31194 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
31196 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
31197 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
31198 temporarily sse2 rather than sse if not enabled already.
31201 * config/i386/sse.md (VI248_VLBW): Rename to ...
31202 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
31203 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
31204 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
31205 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
31206 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
31207 mode iterator instead of VI248_VLBW.
31209 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
31211 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
31212 (record_modified): Skip clobbers; add debug output.
31213 (param_change_prob): Use sreal frequencies.
31215 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
31217 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
31218 punt for user-aligned variables.
31220 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
31222 * tree-chrec.c (chrec_contains_symbols): Return true for
31225 2018-01-05 Sudakshina Das <sudi.das@arm.com>
31228 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
31229 of (x|y) == x for BICS pattern.
31231 2018-01-05 Jakub Jelinek <jakub@redhat.com>
31233 PR tree-optimization/83605
31234 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
31235 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
31238 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
31240 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
31241 * config/epiphany/rtems.h: New file.
31243 2018-01-04 Jakub Jelinek <jakub@redhat.com>
31244 Uros Bizjak <ubizjak@gmail.com>
31247 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
31248 QIreg_operand instead of register_operand predicate.
31249 * config/i386/i386.c (ix86_rop_should_change_byte_p,
31250 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
31251 comments instead of -fmitigate[-_]rop.
31253 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
31256 * cgraphunit.c (symbol_table::compile): Switch to text_section
31257 before calling assembly_start debug hook.
31258 * run-rtl-passes.c (run_rtl_passes): Likewise.
31261 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
31263 * tree-vrp.c (extract_range_from_binary_expr_1): Check
31264 range_int_cst_p rather than !symbolic_range_p before calling
31265 extract_range_from_multiplicative_op_1.
31267 2018-01-04 Jeff Law <law@redhat.com>
31269 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
31270 redundant test in assertion.
31272 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
31274 * doc/rtl.texi: Document machine_mode wrapper classes.
31276 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
31278 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
31279 using tree_to_uhwi.
31281 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
31283 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
31284 the VEC_PERM_EXPR fold to fail.
31286 2018-01-04 Jakub Jelinek <jakub@redhat.com>
31289 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
31290 to switched_sections.
31292 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
31295 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
31296 test for d.testing.
31298 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
31301 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
31302 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
31304 2018-01-04 Jakub Jelinek <jakub@redhat.com>
31307 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
31308 is BLKmode and bitpos not zero or mode change is needed.
31310 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
31313 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
31316 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
31319 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
31320 instead of MULT rtx. Update all corresponding splitters.
31321 (*saddl_se): Ditto.
31322 (*ssub<modesuffix>): Ditto.
31323 (*ssubl_se): Ditto.
31324 (*cmp_sadd_di): Update split patterns.
31325 (*cmp_sadd_si): Ditto.
31326 (*cmp_sadd_sidi): Ditto.
31327 (*cmp_ssub_di): Ditto.
31328 (*cmp_ssub_si): Ditto.
31329 (*cmp_ssub_sidi): Ditto.
31330 * config/alpha/predicates.md (const23_operand): New predicate.
31331 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
31332 Look for ASHIFT, not MULT inner operand.
31333 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
31335 2018-01-04 Martin Liska <mliska@suse.cz>
31337 PR gcov-profile/83669
31338 * gcov.c (output_intermediate_file): Add version to intermediate
31340 * doc/gcov.texi: Document new field 'version' in intermediate
31341 file format. Fix location of '-k' option of gcov command.
31343 2018-01-04 Martin Liska <mliska@suse.cz>
31346 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
31348 2018-01-04 Jakub Jelinek <jakub@redhat.com>
31350 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
31352 2018-01-03 Martin Sebor <msebor@redhat.com>
31354 PR tree-optimization/83655
31355 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
31356 checking calls with invalid arguments.
31358 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31360 * tree-vect-stmts.c (vect_get_store_rhs): New function.
31361 (vectorizable_mask_load_store): Delete.
31362 (vectorizable_call): Return false for masked loads and stores.
31363 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
31364 instead of gimple_assign_rhs1.
31365 (vectorizable_load): Handle IFN_MASK_LOAD.
31366 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
31368 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31370 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
31372 (vectorizable_mask_load_store): ...here.
31373 (vectorizable_load): ...and here.
31375 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31377 * tree-vect-stmts.c (vect_build_all_ones_mask)
31378 (vect_build_zero_merge_argument): New functions, split out from...
31379 (vectorizable_load): ...here.
31381 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31383 * tree-vect-stmts.c (vect_check_store_rhs): New function,
31385 (vectorizable_mask_load_store): ...here.
31386 (vectorizable_store): ...and here.
31388 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31390 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
31392 (vectorizable_mask_load_store): ...here.
31394 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31396 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
31397 (vect_model_store_cost): Take a vec_load_store_type instead of a
31399 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
31400 (vect_model_store_cost): Take a vec_load_store_type instead of a
31402 (vectorizable_mask_load_store): Update accordingly.
31403 (vectorizable_store): Likewise.
31404 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
31406 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31408 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
31409 IFN_MASK_LOAD calls here rather than...
31410 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
31412 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31413 Alan Hayward <alan.hayward@arm.com>
31414 David Sherwood <david.sherwood@arm.com>
31416 * expmed.c (extract_bit_field_1): For vector extracts,
31417 fall back to extract_bit_field_as_subreg if vec_extract
31420 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31421 Alan Hayward <alan.hayward@arm.com>
31422 David Sherwood <david.sherwood@arm.com>
31424 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
31425 they are variable or constant sized.
31426 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
31427 slots for constant-sized data.
31429 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31430 Alan Hayward <alan.hayward@arm.com>
31431 David Sherwood <david.sherwood@arm.com>
31433 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
31434 handling COND_EXPRs with boolean comparisons, try to find a better
31435 basis for the mask type than the boolean itself.
31437 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31439 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
31440 is calculated and how it can be overridden.
31441 * genmodes.c (max_bitsize_mode_any_mode): New variable.
31442 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
31444 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
31447 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31448 Alan Hayward <alan.hayward@arm.com>
31449 David Sherwood <david.sherwood@arm.com>
31451 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
31452 Remove the mode argument.
31453 (aarch64_simd_valid_immediate): Remove the mode and inverse
31455 * config/aarch64/iterators.md (bitsize): New iterator.
31456 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
31457 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
31458 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
31459 aarch64_simd_valid_immediate.
31460 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
31461 (aarch64_reg_or_bic_imm): Likewise.
31462 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
31463 with an insn_type enum and msl with a modifier_type enum.
31464 Replace element_width with a scalar_mode. Change the shift
31465 to unsigned int. Add constructors for scalar_float_mode and
31466 scalar_int_mode elements.
31467 (aarch64_vect_float_const_representable_p): Delete.
31468 (aarch64_can_const_movi_rtx_p)
31469 (aarch64_simd_scalar_immediate_valid_for_move)
31470 (aarch64_simd_make_constant): Update call to
31471 aarch64_simd_valid_immediate.
31472 (aarch64_advsimd_valid_immediate_hs): New function.
31473 (aarch64_advsimd_valid_immediate): Likewise.
31474 (aarch64_simd_valid_immediate): Remove mode and inverse
31475 arguments. Rewrite to use the above. Use const_vec_duplicate_p
31476 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
31477 and aarch64_float_const_representable_p on the result.
31478 (aarch64_output_simd_mov_immediate): Remove mode argument.
31479 Update call to aarch64_simd_valid_immediate and use of
31480 simd_immediate_info.
31481 (aarch64_output_scalar_simd_mov_immediate): Update call
31484 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31485 Alan Hayward <alan.hayward@arm.com>
31486 David Sherwood <david.sherwood@arm.com>
31488 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
31489 (mode_nunits): Likewise CONST_MODE_NUNITS.
31490 * machmode.def (ADJUST_NUNITS): Document.
31491 * genmodes.c (mode_data::need_nunits_adj): New field.
31492 (blank_mode): Update accordingly.
31493 (adj_nunits): New variable.
31494 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
31496 (emit_mode_size_inline): Set need_bytesize_adj for all modes
31497 listed in adj_nunits.
31498 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
31499 listed in adj_nunits. Don't emit case statements for such modes.
31500 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
31501 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
31502 nothing if adj_nunits is nonnull.
31503 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
31504 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
31505 (emit_mode_fbit): Update use of print_maybe_const_decl.
31506 (emit_move_size): Likewise. Treat the array as non-const
31508 (emit_mode_adjustments): Handle adj_nunits.
31510 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31512 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
31513 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
31514 (VECTOR_MODES): Use it.
31515 (make_vector_modes): Take the prefix as an argument.
31517 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31518 Alan Hayward <alan.hayward@arm.com>
31519 David Sherwood <david.sherwood@arm.com>
31521 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
31522 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
31523 for MODE_VECTOR_BOOL.
31524 * machmode.def (VECTOR_BOOL_MODE): Document.
31525 * genmodes.c (VECTOR_BOOL_MODE): New macro.
31526 (make_vector_bool_mode): New function.
31527 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
31529 * lto-streamer-in.c (lto_input_mode_table): Likewise.
31530 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
31532 * stor-layout.c (int_mode_for_mode): Likewise.
31533 * tree.c (build_vector_type_for_mode): Likewise.
31534 * varasm.c (output_constant_pool_2): Likewise.
31535 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
31536 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
31537 for MODE_VECTOR_BOOL.
31538 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
31539 of mode class checks.
31540 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
31541 instead of a list of mode class checks.
31542 (expand_vector_scalar_condition): Likewise.
31543 (type_for_widest_vector_mode): Handle BImode as an inner mode.
31545 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31546 Alan Hayward <alan.hayward@arm.com>
31547 David Sherwood <david.sherwood@arm.com>
31549 * machmode.h (mode_size): Change from unsigned short to
31551 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
31552 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
31553 or if measurement_type is not polynomial.
31554 (fixed_size_mode::includes_p): Check for constant-sized modes.
31555 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
31556 return a poly_uint16 rather than an unsigned short.
31557 (emit_mode_size): Change the type of mode_size from unsigned short
31558 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
31559 (emit_mode_adjustments): Cope with polynomial vector sizes.
31560 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
31562 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
31564 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
31565 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
31566 * caller-save.c (setup_save_areas): Likewise.
31567 (replace_reg_with_saved_mem): Likewise.
31568 * calls.c (emit_library_call_value_1): Likewise.
31569 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
31570 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
31571 (gen_lowpart_for_combine): Likewise.
31572 * convert.c (convert_to_integer_1): Likewise.
31573 * cse.c (equiv_constant, cse_insn): Likewise.
31574 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
31575 (cselib_subst_to_values): Likewise.
31576 * dce.c (word_dce_process_block): Likewise.
31577 * df-problems.c (df_word_lr_mark_ref): Likewise.
31578 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
31579 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
31580 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
31581 (rtl_for_decl_location): Likewise.
31582 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
31583 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
31584 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
31585 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
31586 (expand_expr_real_1): Likewise.
31587 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
31588 (pad_below): Likewise.
31589 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
31590 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
31591 * ira.c (get_subreg_tracking_sizes): Likewise.
31592 * ira-build.c (ira_create_allocno_objects): Likewise.
31593 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
31594 (ira_sort_regnos_for_alter_reg): Likewise.
31595 * ira-costs.c (record_operand_costs): Likewise.
31596 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
31597 (resolve_simple_move): Likewise.
31598 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
31599 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
31600 (lra_constraints): Likewise.
31601 (CONST_POOL_OK_P): Reject variable-sized modes.
31602 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
31603 (add_pseudo_to_slot, lra_spill): Likewise.
31604 * omp-low.c (omp_clause_aligned_alignment): Likewise.
31605 * optabs-query.c (get_best_extraction_insn): Likewise.
31606 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
31607 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
31608 (expand_mult_highpart, valid_multiword_target_p): Likewise.
31609 * recog.c (offsettable_address_addr_space_p): Likewise.
31610 * regcprop.c (maybe_mode_change): Likewise.
31611 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
31612 * regrename.c (build_def_use): Likewise.
31613 * regstat.c (dump_reg_info): Likewise.
31614 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
31615 (find_reloads, find_reloads_subreg_address): Likewise.
31616 * reload1.c (eliminate_regs_1): Likewise.
31617 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
31618 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
31619 (simplify_binary_operation_1, simplify_subreg): Likewise.
31620 * targhooks.c (default_function_arg_padding): Likewise.
31621 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
31622 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
31623 (verify_gimple_assign_ternary): Likewise.
31624 * tree-inline.c (estimate_move_cost): Likewise.
31625 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
31626 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
31627 (get_address_cost_ainc): Likewise.
31628 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
31629 (vect_supportable_dr_alignment): Likewise.
31630 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
31631 (vectorizable_reduction): Likewise.
31632 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
31633 (vectorizable_operation, vectorizable_load): Likewise.
31634 * tree.c (build_same_sized_truth_vector_type): Likewise.
31635 * valtrack.c (cleanup_auto_inc_dec): Likewise.
31636 * var-tracking.c (emit_note_insn_var_location): Likewise.
31637 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
31638 (ADDR_VEC_ALIGN): Likewise.
31640 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31641 Alan Hayward <alan.hayward@arm.com>
31642 David Sherwood <david.sherwood@arm.com>
31644 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
31646 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
31647 or if measurement_type is polynomial.
31648 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
31649 * combine.c (make_extraction): Likewise.
31650 * dse.c (find_shift_sequence): Likewise.
31651 * dwarf2out.c (mem_loc_descriptor): Likewise.
31652 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
31653 (extract_bit_field, extract_low_bits): Likewise.
31654 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
31655 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
31656 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
31657 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
31658 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
31659 * reload.c (find_reloads): Likewise.
31660 * reload1.c (alter_reg): Likewise.
31661 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
31662 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
31663 * tree-if-conv.c (predicate_mem_writes): Likewise.
31664 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
31665 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
31666 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
31667 * valtrack.c (dead_debug_insert_temp): Likewise.
31668 * varasm.c (mergeable_constant_section): Likewise.
31669 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
31671 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31672 Alan Hayward <alan.hayward@arm.com>
31673 David Sherwood <david.sherwood@arm.com>
31675 * expr.c (expand_assignment): Cope with polynomial mode sizes
31676 when assigning to a CONCAT.
31678 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31679 Alan Hayward <alan.hayward@arm.com>
31680 David Sherwood <david.sherwood@arm.com>
31682 * machmode.h (mode_precision): Change from unsigned short to
31684 (mode_to_precision): Return a poly_uint16 rather than an unsigned
31686 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
31687 or if measurement_type is not polynomial.
31688 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
31689 in which the mode is already known to be a scalar_int_mode.
31690 * genmodes.c (emit_mode_precision): Change the type of mode_precision
31691 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
31693 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
31694 for GET_MODE_PRECISION.
31695 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
31696 for GET_MODE_PRECISION.
31697 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
31699 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
31700 (expand_field_assignment, make_extraction): Likewise.
31701 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
31702 (get_last_value): Likewise.
31703 * convert.c (convert_to_integer_1): Likewise.
31704 * cse.c (cse_insn): Likewise.
31705 * expr.c (expand_expr_real_1): Likewise.
31706 * lra-constraints.c (simplify_operand_subreg): Likewise.
31707 * optabs-query.c (can_atomic_load_p): Likewise.
31708 * optabs.c (expand_atomic_load): Likewise.
31709 (expand_atomic_store): Likewise.
31710 * ree.c (combine_reaching_defs): Likewise.
31711 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
31712 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
31713 * tree.h (type_has_mode_precision_p): Likewise.
31714 * ubsan.c (instrument_si_overflow): Likewise.
31716 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31717 Alan Hayward <alan.hayward@arm.com>
31718 David Sherwood <david.sherwood@arm.com>
31720 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
31721 polynomial numbers of units.
31722 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
31723 (valid_vector_subparts_p): New function.
31724 (build_vector_type): Remove temporary shim and take the number
31725 of units as a poly_uint64 rather than an int.
31726 (build_opaque_vector_type): Take the number of units as a
31727 poly_uint64 rather than an int.
31728 * tree.c (build_vector_from_ctor): Handle polynomial
31729 TYPE_VECTOR_SUBPARTS.
31730 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
31731 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
31732 (build_vector_from_val): If the number of units is variable,
31733 use build_vec_duplicate_cst for constant operands and
31734 VEC_DUPLICATE_EXPR otherwise.
31735 (make_vector_type): Remove temporary is_constant ().
31736 (build_vector_type, build_opaque_vector_type): Take the number of
31737 units as a poly_uint64 rather than an int.
31738 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
31740 * cfgexpand.c (expand_debug_expr): Likewise.
31741 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
31742 (store_constructor, expand_expr_real_1): Likewise.
31743 (const_scalar_mask_from_tree): Likewise.
31744 * fold-const-call.c (fold_const_reduction): Likewise.
31745 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
31746 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
31747 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
31748 (fold_relational_const): Likewise.
31749 (native_interpret_vector): Likewise. Change the size from an
31750 int to an unsigned int.
31751 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
31752 TYPE_VECTOR_SUBPARTS.
31753 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
31754 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
31755 duplicating a non-constant operand into a variable-length vector.
31756 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
31757 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
31758 * ipa-icf.c (sem_variable::equals): Likewise.
31759 * match.pd: Likewise.
31760 * omp-simd-clone.c (simd_clone_subparts): Likewise.
31761 * print-tree.c (print_node): Likewise.
31762 * stor-layout.c (layout_type): Likewise.
31763 * targhooks.c (default_builtin_vectorization_cost): Likewise.
31764 * tree-cfg.c (verify_gimple_comparison): Likewise.
31765 (verify_gimple_assign_binary): Likewise.
31766 (verify_gimple_assign_ternary): Likewise.
31767 (verify_gimple_assign_single): Likewise.
31768 * tree-pretty-print.c (dump_generic_node): Likewise.
31769 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
31770 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
31771 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
31772 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
31773 (vect_shift_permute_load_chain): Likewise.
31774 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
31775 (expand_vector_condition, optimize_vector_constructor): Likewise.
31776 (lower_vec_perm, get_compute_type): Likewise.
31777 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
31778 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
31779 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
31780 (vect_recog_mask_conversion_pattern): Likewise.
31781 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
31782 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
31783 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
31784 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
31785 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
31786 (vectorizable_shift, vectorizable_operation, vectorizable_store)
31787 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
31788 (supportable_widening_operation): Likewise.
31789 (supportable_narrowing_operation): Likewise.
31790 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
31792 * varasm.c (output_constant): Likewise.
31794 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31795 Alan Hayward <alan.hayward@arm.com>
31796 David Sherwood <david.sherwood@arm.com>
31798 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
31799 so that both the length == 3 and length != 3 cases set up their
31800 own permute vectors. Add comments explaining why we know the
31801 number of elements is constant.
31802 (vect_permute_load_chain): Likewise.
31804 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31805 Alan Hayward <alan.hayward@arm.com>
31806 David Sherwood <david.sherwood@arm.com>
31808 * machmode.h (mode_nunits): Change from unsigned char to
31810 (ONLY_FIXED_SIZE_MODES): New macro.
31811 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
31812 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
31813 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
31815 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
31816 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
31817 or if measurement_type is not polynomial.
31818 * genmodes.c (ZERO_COEFFS): New macro.
31819 (emit_mode_nunits_inline): Make mode_nunits_inline return a
31821 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
31822 Use ZERO_COEFFS when emitting initializers.
31823 * data-streamer.h (bp_pack_poly_value): New function.
31824 (bp_unpack_poly_value): Likewise.
31825 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
31826 for GET_MODE_NUNITS.
31827 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
31828 for GET_MODE_NUNITS.
31829 * tree.c (make_vector_type): Remove temporary shim and make
31830 the real function take the number of units as a poly_uint64
31831 rather than an int.
31832 (build_vector_type_for_mode): Handle polynomial nunits.
31833 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
31834 * emit-rtl.c (const_vec_series_p_1): Likewise.
31835 (gen_rtx_CONST_VECTOR): Likewise.
31836 * fold-const.c (test_vec_duplicate_folding): Likewise.
31837 * genrecog.c (validate_pattern): Likewise.
31838 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
31839 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
31840 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
31841 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
31842 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
31843 * rtlanal.c (subreg_get_info): Likewise.
31844 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
31845 (vect_grouped_load_supported): Likewise.
31846 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
31847 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
31848 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
31849 (simplify_const_unary_operation, simplify_binary_operation_1)
31850 (simplify_const_binary_operation, simplify_ternary_operation)
31851 (test_vector_ops_duplicate, test_vector_ops): Likewise.
31852 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
31853 instead of CONST_VECTOR_NUNITS.
31854 * varasm.c (output_constant_pool_2): Likewise.
31855 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
31856 explicit-encoded elements in the XVEC for variable-length vectors.
31858 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31860 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
31862 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31863 Alan Hayward <alan.hayward@arm.com>
31864 David Sherwood <david.sherwood@arm.com>
31866 * coretypes.h (fixed_size_mode): Declare.
31867 (fixed_size_mode_pod): New typedef.
31868 * builtins.h (target_builtins::x_apply_args_mode)
31869 (target_builtins::x_apply_result_mode): Change type to
31870 fixed_size_mode_pod.
31871 * builtins.c (apply_args_size, apply_result_size, result_vector)
31872 (expand_builtin_apply_args_1, expand_builtin_apply)
31873 (expand_builtin_return): Update accordingly.
31875 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31877 * cse.c (hash_rtx_cb): Hash only the encoded elements.
31878 * cselib.c (cselib_hash_rtx): Likewise.
31879 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
31880 CONST_VECTOR encoding.
31882 2018-01-03 Jakub Jelinek <jakub@redhat.com>
31883 Jeff Law <law@redhat.com>
31886 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
31887 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
31888 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
31889 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
31892 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
31893 explicitly probe *sp in a noreturn function if there were any callee
31894 register saves or frame pointer is needed.
31896 2018-01-03 Jakub Jelinek <jakub@redhat.com>
31899 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
31900 BLKmode for ternary, binary or unary expressions.
31903 * var-tracking.c (delete_vta_debug_insn): New inline function.
31904 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
31905 insns from get_insns () to NULL instead of each bb separately.
31906 Use delete_vta_debug_insn. No longer static.
31907 (vt_debug_insns_local, variable_tracking_main_1): Adjust
31908 delete_vta_debug_insns callers.
31909 * rtl.h (delete_vta_debug_insns): Declare.
31910 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
31911 instead of variable_tracking_main.
31913 2018-01-03 Martin Sebor <msebor@redhat.com>
31915 PR tree-optimization/83603
31916 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
31917 arguments past the endof the argument list in functions declared
31918 without a prototype.
31919 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
31920 Avoid checking when arguments are null.
31922 2018-01-03 Martin Sebor <msebor@redhat.com>
31925 * doc/extend.texi (attribute const): Fix a typo.
31926 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
31927 issuing -Wsuggest-attribute for void functions.
31929 2018-01-03 Martin Sebor <msebor@redhat.com>
31931 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
31932 offset_int::from instead of wide_int::to_shwi.
31933 (maybe_diag_overlap): Remove assertion.
31934 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
31935 * gimple-ssa-sprintf.c (format_directive): Same.
31936 (parse_directive): Same.
31937 (sprintf_dom_walker::compute_format_length): Same.
31938 (try_substitute_return_value): Same.
31940 2018-01-03 Jeff Law <law@redhat.com>
31942 PR middle-end/83654
31943 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
31944 non-constant residual for zero at runtime and avoid probing in
31945 that case. Reorganize code for trailing problem to mirror handling
31948 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
31950 PR tree-optimization/83501
31951 * tree-ssa-strlen.c (get_string_cst): New.
31952 (handle_char_store): Call get_string_cst.
31954 2018-01-03 Martin Liska <mliska@suse.cz>
31956 PR tree-optimization/83593
31957 * tree-ssa-strlen.c: Include tree-cfg.h.
31958 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
31959 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
31960 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
31962 (strlen_dom_walker::before_dom_children): Call
31963 gimple_purge_dead_eh_edges. Dump tranformation with details
31965 (strlen_dom_walker::before_dom_children): Update call by adding
31966 new argument cleanup_eh.
31967 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
31969 2018-01-03 Martin Liska <mliska@suse.cz>
31972 * cif-code.def (VARIADIC_THUNK): New enum value.
31973 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
31976 2018-01-03 Jan Beulich <jbeulich@suse.com>
31978 * sse.md (mov<mode>_internal): Tighten condition for when to use
31979 vmovdqu<ssescalarsize> for TI and OI modes.
31981 2018-01-03 Jakub Jelinek <jakub@redhat.com>
31983 Update copyright years.
31985 2018-01-03 Martin Liska <mliska@suse.cz>
31988 * ipa-visibility.c (function_and_variable_visibility): Skip
31989 functions with noipa attribure.
31991 2018-01-03 Jakub Jelinek <jakub@redhat.com>
31993 * gcc.c (process_command): Update copyright notice dates.
31994 * gcov-dump.c (print_version): Ditto.
31995 * gcov.c (print_version): Ditto.
31996 * gcov-tool.c (print_version): Ditto.
31997 * gengtype.c (create_file): Ditto.
31998 * doc/cpp.texi: Bump @copying's copyright year.
31999 * doc/cppinternals.texi: Ditto.
32000 * doc/gcc.texi: Ditto.
32001 * doc/gccint.texi: Ditto.
32002 * doc/gcov.texi: Ditto.
32003 * doc/install.texi: Ditto.
32004 * doc/invoke.texi: Ditto.
32006 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32008 * vector-builder.h (vector_builder::m_full_nelts): Change from
32009 unsigned int to poly_uint64.
32010 (vector_builder::full_nelts): Update prototype accordingly.
32011 (vector_builder::new_vector): Likewise.
32012 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
32013 (vector_builder::operator ==): Likewise.
32014 (vector_builder::finalize): Likewise.
32015 * int-vector-builder.h (int_vector_builder::int_vector_builder):
32016 Take the number of elements as a poly_uint64 rather than an
32018 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
32019 from unsigned int to poly_uint64.
32020 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
32021 (vec_perm_indices::new_vector): Likewise.
32022 (vec_perm_indices::length): Likewise.
32023 (vec_perm_indices::nelts_per_input): Likewise.
32024 (vec_perm_indices::input_nelts): Likewise.
32025 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
32026 number of elements per input as a poly_uint64 rather than an
32027 unsigned int. Use the original encoding for variable-length
32028 vectors, rather than clamping each individual element.
32029 For the second and subsequent elements in each pattern,
32030 clamp the step and base before clamping their sum.
32031 (vec_perm_indices::series_p): Handle polynomial element counts.
32032 (vec_perm_indices::all_in_range_p): Likewise.
32033 (vec_perm_indices_to_tree): Likewise.
32034 (vec_perm_indices_to_rtx): Likewise.
32035 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
32036 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
32037 (tree_vector_builder::new_binary_operation): Handle polynomial
32038 element counts. Return false if we need to know the number
32039 of elements at compile time.
32040 * fold-const.c (fold_vec_perm): Punt if the number of elements
32041 isn't known at compile time.
32043 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32045 * vec-perm-indices.h (vec_perm_builder): Change element type
32046 from HOST_WIDE_INT to poly_int64.
32047 (vec_perm_indices::element_type): Update accordingly.
32048 (vec_perm_indices::clamp): Handle polynomial element_types.
32049 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
32050 (vec_perm_indices::all_in_range_p): Likewise.
32051 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
32053 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
32054 polynomial vec_perm_indices element types.
32055 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
32056 * fold-const.c (fold_vec_perm): Likewise.
32057 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
32058 * tree-vect-generic.c (lower_vec_perm): Likewise.
32059 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
32060 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
32061 element type to HOST_WIDE_INT.
32063 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32064 Alan Hayward <alan.hayward@arm.com>
32065 David Sherwood <david.sherwood@arm.com>
32067 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
32068 rather than an int. Use plus_constant.
32069 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
32070 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
32072 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32073 Alan Hayward <alan.hayward@arm.com>
32074 David Sherwood <david.sherwood@arm.com>
32076 * calls.c (emit_call_1, expand_call): Change struct_value_size from
32077 a HOST_WIDE_INT to a poly_int64.
32079 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32080 Alan Hayward <alan.hayward@arm.com>
32081 David Sherwood <david.sherwood@arm.com>
32083 * calls.c (load_register_parameters): Cope with polynomial
32084 mode sizes. Require a constant size for BLKmode parameters
32085 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
32086 forces a parameter to be padded at the lsb end in order to
32087 fill a complete number of words, require the parameter size
32088 to be ordered wrt UNITS_PER_WORD.
32090 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32091 Alan Hayward <alan.hayward@arm.com>
32092 David Sherwood <david.sherwood@arm.com>
32094 * reload1.c (spill_stack_slot_width): Change element type
32095 from unsigned int to poly_uint64_pod.
32096 (alter_reg): Treat mode sizes as polynomial.
32098 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32099 Alan Hayward <alan.hayward@arm.com>
32100 David Sherwood <david.sherwood@arm.com>
32102 * reload.c (complex_word_subreg_p): New function.
32103 (reload_inner_reg_of_subreg, push_reload): Use it.
32105 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32106 Alan Hayward <alan.hayward@arm.com>
32107 David Sherwood <david.sherwood@arm.com>
32109 * lra-constraints.c (process_alt_operands): Reject matched
32110 operands whose sizes aren't ordered.
32111 (match_reload): Refer to this check here.
32113 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32114 Alan Hayward <alan.hayward@arm.com>
32115 David Sherwood <david.sherwood@arm.com>
32117 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
32118 that the mode size is in the set {1, 2, 4, 8, 16}.
32120 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32121 Alan Hayward <alan.hayward@arm.com>
32122 David Sherwood <david.sherwood@arm.com>
32124 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
32125 Use plus_constant instead of gen_rtx_PLUS.
32127 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32128 Alan Hayward <alan.hayward@arm.com>
32129 David Sherwood <david.sherwood@arm.com>
32131 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
32132 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
32133 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
32134 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
32135 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
32136 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
32137 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
32138 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
32139 * config/i386/i386.c (ix86_push_rounding): ...this new function.
32140 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
32142 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
32143 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
32144 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
32145 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
32146 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
32147 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
32148 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
32149 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
32150 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
32151 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
32153 * expr.c (emit_move_resolve_push): Treat the input and result
32154 of PUSH_ROUNDING as a poly_int64.
32155 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
32156 (emit_push_insn): Likewise.
32157 * lra-eliminations.c (mark_not_eliminable): Likewise.
32158 * recog.c (push_operand): Likewise.
32159 * reload1.c (elimination_effects): Likewise.
32160 * rtlanal.c (nonzero_bits1): Likewise.
32161 * calls.c (store_one_arg): Likewise. Require the padding to be
32162 known at compile time.
32164 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32165 Alan Hayward <alan.hayward@arm.com>
32166 David Sherwood <david.sherwood@arm.com>
32168 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
32169 Use plus_constant instead of gen_rtx_PLUS.
32171 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32172 Alan Hayward <alan.hayward@arm.com>
32173 David Sherwood <david.sherwood@arm.com>
32175 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
32176 rather than an int.
32178 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32179 Alan Hayward <alan.hayward@arm.com>
32180 David Sherwood <david.sherwood@arm.com>
32182 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
32183 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
32184 via stack temporaries. Treat the mode size as polynomial too.
32186 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32187 Alan Hayward <alan.hayward@arm.com>
32188 David Sherwood <david.sherwood@arm.com>
32190 * expr.c (expand_expr_real_2): When handling conversions involving
32191 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
32192 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
32193 as a poly_uint64 too.
32195 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32196 Alan Hayward <alan.hayward@arm.com>
32197 David Sherwood <david.sherwood@arm.com>
32199 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
32201 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32202 Alan Hayward <alan.hayward@arm.com>
32203 David Sherwood <david.sherwood@arm.com>
32205 * combine.c (can_change_dest_mode): Handle polynomial
32206 REGMODE_NATURAL_SIZE.
32207 * expmed.c (store_bit_field_1): Likewise.
32208 * expr.c (store_constructor): Likewise.
32209 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
32210 and polynomial REGMODE_NATURAL_SIZE.
32211 (gen_lowpart_common): Likewise.
32212 * reginfo.c (record_subregs_of_mode): Likewise.
32213 * rtlanal.c (read_modify_subreg_p): Likewise.
32215 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32216 Alan Hayward <alan.hayward@arm.com>
32217 David Sherwood <david.sherwood@arm.com>
32219 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
32220 numbers of elements.
32222 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32223 Alan Hayward <alan.hayward@arm.com>
32224 David Sherwood <david.sherwood@arm.com>
32226 * match.pd: Cope with polynomial numbers of vector elements.
32228 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32229 Alan Hayward <alan.hayward@arm.com>
32230 David Sherwood <david.sherwood@arm.com>
32232 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
32233 in a POINTER_PLUS_EXPR.
32235 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32236 Alan Hayward <alan.hayward@arm.com>
32237 David Sherwood <david.sherwood@arm.com>
32239 * omp-simd-clone.c (simd_clone_subparts): New function.
32240 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
32241 (ipa_simd_modify_function_body): Likewise.
32243 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32244 Alan Hayward <alan.hayward@arm.com>
32245 David Sherwood <david.sherwood@arm.com>
32247 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
32248 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
32249 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
32250 (expand_vector_condition, vector_element): Likewise.
32251 (subparts_gt): New function.
32252 (get_compute_type): Use subparts_gt.
32253 (count_type_subparts): Delete.
32254 (expand_vector_operations_1): Use subparts_gt instead of
32255 count_type_subparts.
32257 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32258 Alan Hayward <alan.hayward@arm.com>
32259 David Sherwood <david.sherwood@arm.com>
32261 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
32262 (vect_compile_time_alias): ...this new function. Do the calculation
32263 on poly_ints rather than trees.
32264 (vect_prune_runtime_alias_test_list): Update call accordingly.
32266 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32267 Alan Hayward <alan.hayward@arm.com>
32268 David Sherwood <david.sherwood@arm.com>
32270 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
32272 (vect_schedule_slp_instance): Likewise.
32274 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32275 Alan Hayward <alan.hayward@arm.com>
32276 David Sherwood <david.sherwood@arm.com>
32278 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
32279 constant and extern definitions for variable-length vectors.
32280 (vect_get_constant_vectors): Note that the number of units
32281 is known to be constant.
32283 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32284 Alan Hayward <alan.hayward@arm.com>
32285 David Sherwood <david.sherwood@arm.com>
32287 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
32288 of units as polynomial. Choose between WIDE and NARROW based
32291 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32292 Alan Hayward <alan.hayward@arm.com>
32293 David Sherwood <david.sherwood@arm.com>
32295 * tree-vect-stmts.c (simd_clone_subparts): New function.
32296 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
32298 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32299 Alan Hayward <alan.hayward@arm.com>
32300 David Sherwood <david.sherwood@arm.com>
32302 * tree-vect-stmts.c (vectorizable_call): Treat the number of
32303 vectors as polynomial. Use build_index_vector for
32304 IFN_GOMP_SIMD_LANE.
32306 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32307 Alan Hayward <alan.hayward@arm.com>
32308 David Sherwood <david.sherwood@arm.com>
32310 * tree-vect-stmts.c (get_load_store_type): Treat the number of
32311 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
32312 for variable-length vectors.
32313 (vectorizable_mask_load_store): Treat the number of units as
32314 polynomial, asserting that it is constant if the condition has
32315 already been enforced.
32316 (vectorizable_store, vectorizable_load): Likewise.
32318 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32319 Alan Hayward <alan.hayward@arm.com>
32320 David Sherwood <david.sherwood@arm.com>
32322 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
32323 of units as polynomial. Punt if we can't tell at compile time
32324 which vector contains the final result.
32326 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32327 Alan Hayward <alan.hayward@arm.com>
32328 David Sherwood <david.sherwood@arm.com>
32330 * tree-vect-loop.c (vectorizable_induction): Treat the number
32331 of units as polynomial. Punt on SLP inductions. Use an integer
32332 VEC_SERIES_EXPR for variable-length integer reductions. Use a
32333 cast of such a series for variable-length floating-point
32336 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32337 Alan Hayward <alan.hayward@arm.com>
32338 David Sherwood <david.sherwood@arm.com>
32340 * tree.h (build_index_vector): Declare.
32341 * tree.c (build_index_vector): New function.
32342 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
32343 of units as polynomial, forcibly converting it to a constant if
32344 vectorizable_reduction has already enforced the condition.
32345 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
32346 to create a {1,2,3,...} vector.
32347 (vectorizable_reduction): Treat the number of units as polynomial.
32348 Choose vectype_in based on the largest scalar element size rather
32349 than the smallest number of units. Enforce the restrictions
32352 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32353 Alan Hayward <alan.hayward@arm.com>
32354 David Sherwood <david.sherwood@arm.com>
32356 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
32357 number of units as polynomial.
32359 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32360 Alan Hayward <alan.hayward@arm.com>
32361 David Sherwood <david.sherwood@arm.com>
32363 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
32364 * target.def (autovectorize_vector_sizes): Return the vector sizes
32365 by pointer, using vector_sizes rather than a bitmask.
32366 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
32367 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
32368 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
32370 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
32371 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
32372 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
32373 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
32374 * omp-general.c (omp_max_vf): Likewise.
32375 * omp-low.c (omp_clause_aligned_alignment): Likewise.
32376 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
32377 * tree-vect-loop.c (vect_analyze_loop): Likewise.
32378 * tree-vect-slp.c (vect_slp_bb): Likewise.
32379 * doc/tm.texi: Regenerate.
32380 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
32382 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
32383 the vector size as a poly_uint64 rather than an unsigned int.
32384 (current_vector_size): Change from an unsigned int to a poly_uint64.
32385 (get_vectype_for_scalar_type): Update accordingly.
32386 * tree.h (build_truth_vector_type): Take the size and number of
32387 units as a poly_uint64 rather than an unsigned int.
32388 (build_vector_type): Add a temporary overload that takes
32389 the number of units as a poly_uint64 rather than an unsigned int.
32390 * tree.c (make_vector_type): Likewise.
32391 (build_truth_vector_type): Take the number of units as a poly_uint64
32392 rather than an unsigned int.
32394 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32395 Alan Hayward <alan.hayward@arm.com>
32396 David Sherwood <david.sherwood@arm.com>
32398 * target.def (get_mask_mode): Take the number of units and length
32399 as poly_uint64s rather than unsigned ints.
32400 * targhooks.h (default_get_mask_mode): Update accordingly.
32401 * targhooks.c (default_get_mask_mode): Likewise.
32402 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
32403 * doc/tm.texi: Regenerate.
32405 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32406 Alan Hayward <alan.hayward@arm.com>
32407 David Sherwood <david.sherwood@arm.com>
32409 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
32410 * omp-general.c (omp_max_vf): Likewise.
32411 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
32412 (expand_omp_simd): Handle polynomial safelen.
32413 * omp-low.c (omplow_simd_context): Add a default constructor.
32414 (omplow_simd_context::max_vf): Change from int to poly_uint64.
32415 (lower_rec_simd_input_clauses): Update accordingly.
32416 (lower_rec_input_clauses): Likewise.
32418 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32419 Alan Hayward <alan.hayward@arm.com>
32420 David Sherwood <david.sherwood@arm.com>
32422 * tree-vectorizer.h (vect_nunits_for_cost): New function.
32423 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
32424 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
32425 (vect_analyze_slp_cost): Likewise.
32426 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
32427 (vect_model_load_cost): Likewise.
32429 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32430 Alan Hayward <alan.hayward@arm.com>
32431 David Sherwood <david.sherwood@arm.com>
32433 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
32434 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
32435 from an unsigned int * to a poly_uint64_pod *.
32436 (calculate_unrolling_factor): New function.
32437 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
32439 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32440 Alan Hayward <alan.hayward@arm.com>
32441 David Sherwood <david.sherwood@arm.com>
32443 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
32444 from an unsigned int to a poly_uint64.
32445 (_loop_vec_info::slp_unrolling_factor): Likewise.
32446 (_loop_vec_info::vectorization_factor): Change from an int
32448 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
32449 (vect_get_num_vectors): New function.
32450 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
32451 (vect_get_num_copies): Use vect_get_num_vectors.
32452 (vect_analyze_data_ref_dependences): Change max_vf from an int *
32453 to an unsigned int *.
32454 (vect_analyze_data_refs): Change min_vf from an int * to a
32456 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
32457 than an unsigned HOST_WIDE_INT.
32458 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
32459 (vect_analyze_data_ref_dependence): Change max_vf from an int *
32460 to an unsigned int *.
32461 (vect_analyze_data_ref_dependences): Likewise.
32462 (vect_compute_data_ref_alignment): Handle polynomial vf.
32463 (vect_enhance_data_refs_alignment): Likewise.
32464 (vect_prune_runtime_alias_test_list): Likewise.
32465 (vect_shift_permute_load_chain): Likewise.
32466 (vect_supportable_dr_alignment): Likewise.
32467 (dependence_distance_ge_vf): Take the vectorization factor as a
32468 poly_uint64 rather than an unsigned HOST_WIDE_INT.
32469 (vect_analyze_data_refs): Change min_vf from an int * to a
32471 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
32472 vfm1 as a poly_uint64 rather than an int. Make the same change
32473 for the returned bound_scalar.
32474 (vect_gen_vector_loop_niters): Handle polynomial vf.
32475 (vect_do_peeling): Likewise. Update call to
32476 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
32477 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
32479 * tree-vect-loop.c (vect_determine_vectorization_factor)
32480 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
32481 (vect_get_known_peeling_cost): Likewise.
32482 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
32483 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
32484 (vect_transform_loop): Likewise. Use the lowest possible VF when
32485 updating the upper bounds of the loop.
32486 (vect_min_worthwhile_factor): Make static. Return an unsigned int
32487 rather than an int.
32488 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
32489 polynomial unroll factors.
32490 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
32491 (vect_make_slp_decision): Likewise.
32492 (vect_supported_load_permutation_p): Likewise, and polynomial
32494 (vect_analyze_slp_cost): Handle polynomial vf.
32495 (vect_slp_analyze_node_operations): Likewise.
32496 (vect_slp_analyze_bb_1): Likewise.
32497 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
32498 than an unsigned HOST_WIDE_INT.
32499 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
32500 (vectorizable_load): Handle polynomial vf.
32501 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
32503 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
32505 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32506 Alan Hayward <alan.hayward@arm.com>
32507 David Sherwood <david.sherwood@arm.com>
32509 * match.pd: Handle bit operations involving three constants
32510 and try to fold one pair.
32512 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32514 * tree-vect-loop-manip.c: Include gimple-fold.h.
32515 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
32516 niters_maybe_zero parameters. Handle other cases besides a step of 1.
32517 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
32518 Add a path that uses a step of VF instead of 1, but disable it
32520 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
32521 and niters_no_overflow parameters. Update calls to
32522 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
32523 Create a new SSA name if the latter choses to use a ste other
32524 than zero, and return it via niters_vector_mult_vf_var.
32525 * tree-vect-loop.c (vect_transform_loop): Update calls to
32526 vect_do_peeling, vect_gen_vector_loop_niters and
32527 slpeel_make_loop_iterate_ntimes.
32528 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
32529 (vect_gen_vector_loop_niters): Update declarations after above changes.
32531 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
32533 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
32534 128-bit round to integer instructions.
32535 (ceil<mode>2): Likewise.
32536 (btrunc<mode>2): Likewise.
32537 (round<mode>2): Likewise.
32539 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
32541 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
32542 unaligned VSX load/store on P8/P9.
32543 (expand_block_clear): Allow the use of unaligned VSX
32544 load/store on P8/P9.
32546 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
32548 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
32550 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
32551 swap associated with both a load and a store.
32553 2018-01-02 Andrew Waterman <andrew@sifive.com>
32555 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
32556 * config/riscv/riscv.md (clear_cache): Use it.
32558 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
32560 * web.c: Remove out-of-date comment.
32562 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32564 * expr.c (fixup_args_size_notes): Check that any existing
32565 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
32566 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
32567 (emit_single_push_insn): ...here.
32569 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32571 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
32572 (const_vector_encoded_nelts): New function.
32573 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
32574 (const_vector_int_elt, const_vector_elt): Declare.
32575 * emit-rtl.c (const_vector_int_elt_1): New function.
32576 (const_vector_elt): Likewise.
32577 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
32578 of CONST_VECTOR_ELT.
32580 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32582 * expr.c: Include rtx-vector-builder.h.
32583 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
32584 directly on the tree encoding.
32585 (const_vector_from_tree): Likewise.
32586 * optabs.c: Include rtx-vector-builder.h.
32587 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
32588 sequence of "u" values.
32589 * vec-perm-indices.c: Include rtx-vector-builder.h.
32590 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
32591 directly on the vec_perm_indices encoding.
32593 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32595 * doc/rtl.texi (const_vector): Describe new encoding scheme.
32596 * Makefile.in (OBJS): Add rtx-vector-builder.o.
32597 * rtx-vector-builder.h: New file.
32598 * rtx-vector-builder.c: Likewise.
32599 * rtl.h (rtx_def::u2): Add a const_vector field.
32600 (CONST_VECTOR_NPATTERNS): New macro.
32601 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
32602 (CONST_VECTOR_DUPLICATE_P): Likewise.
32603 (CONST_VECTOR_STEPPED_P): Likewise.
32604 (CONST_VECTOR_ENCODED_ELT): Likewise.
32605 (const_vec_duplicate_p): Check for a duplicated vector encoding.
32606 (unwrap_const_vec_duplicate): Likewise.
32607 (const_vec_series_p): Check for a non-duplicated vector encoding.
32608 Say that the function only returns true for integer vectors.
32609 * emit-rtl.c: Include rtx-vector-builder.h.
32610 (gen_const_vec_duplicate_1): Delete.
32611 (gen_const_vector): Call gen_const_vec_duplicate instead of
32612 gen_const_vec_duplicate_1.
32613 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
32614 (gen_const_vec_duplicate): Use rtx_vector_builder.
32615 (gen_const_vec_series): Likewise.
32616 (gen_rtx_CONST_VECTOR): Likewise.
32617 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
32618 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
32619 Build a new vector rather than modifying a CONST_VECTOR in-place.
32620 (handle_special_swappables): Update call accordingly.
32621 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
32622 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
32623 Build a new vector rather than modifying a CONST_VECTOR in-place.
32624 (handle_special_swappables): Update call accordingly.
32626 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32628 * simplify-rtx.c (simplify_const_binary_operation): Use
32629 CONST_VECTOR_ELT instead of XVECEXP.
32631 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32633 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
32634 the selector elements to be different from the data elements
32635 if the selector is a VECTOR_CST.
32636 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
32637 ssizetype for the selector.
32639 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32641 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
32642 before testing each element individually.
32643 * tree-vect-generic.c (lower_vec_perm): Likewise.
32645 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32647 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
32648 * selftest-run-tests.c (selftest::run_tests): Call it.
32649 * vector-builder.h (vector_builder::operator ==): New function.
32650 (vector_builder::operator !=): Likewise.
32651 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
32652 (vec_perm_indices::all_from_input_p): New function.
32653 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
32654 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
32655 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
32656 instead of reading the VECTOR_CST directly. Detect whether both
32657 vector inputs are the same before constructing the vec_perm_indices,
32658 and update the number of inputs argument accordingly. Use the
32659 utility functions added above. Only construct sel2 if we need to.
32661 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32663 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
32664 the broadcast of the low byte.
32665 (expand_mult_highpart): Use an explicit encoding for the permutes.
32666 * optabs-query.c (can_mult_highpart_p): Likewise.
32667 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
32668 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
32669 (vectorizable_bswap): Likewise.
32670 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
32671 explicit encoding for the power-of-2 permutes.
32672 (vect_permute_store_chain): Likewise.
32673 (vect_grouped_load_supported): Likewise.
32674 (vect_permute_load_chain): Likewise.
32676 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32678 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
32679 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
32680 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
32681 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
32682 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
32683 (vect_gen_perm_mask_any): Likewise.
32685 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32687 * int-vector-builder.h: New file.
32688 * vec-perm-indices.h: Include int-vector-builder.h.
32689 (vec_perm_indices): Redefine as an int_vector_builder.
32690 (auto_vec_perm_indices): Delete.
32691 (vec_perm_builder): Redefine as a stand-alone class.
32692 (vec_perm_indices::vec_perm_indices): New function.
32693 (vec_perm_indices::clamp): Likewise.
32694 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
32695 (vec_perm_indices::new_vector): New function.
32696 (vec_perm_indices::new_expanded_vector): Update for new
32697 vec_perm_indices class.
32698 (vec_perm_indices::rotate_inputs): New function.
32699 (vec_perm_indices::all_in_range_p): Operate directly on the
32700 encoded form, without computing elided elements.
32701 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
32702 encoding. Update for new vec_perm_indices class.
32703 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
32704 the given vec_perm_builder.
32705 (expand_vec_perm_var): Update vec_perm_builder constructor.
32706 (expand_mult_highpart): Use vec_perm_builder instead of
32707 auto_vec_perm_indices.
32708 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
32709 vec_perm_indices instead of auto_vec_perm_indices. Use a single
32710 or double series encoding as appropriate.
32711 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
32712 vec_perm_indices instead of auto_vec_perm_indices.
32713 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
32714 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
32715 (vect_permute_store_chain): Likewise.
32716 (vect_grouped_load_supported): Likewise.
32717 (vect_permute_load_chain): Likewise.
32718 (vect_shift_permute_load_chain): Likewise.
32719 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
32720 (vect_transform_slp_perm_load): Likewise.
32721 (vect_schedule_slp_instance): Likewise.
32722 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
32723 (vectorizable_mask_load_store): Likewise.
32724 (vectorizable_bswap): Likewise.
32725 (vectorizable_store): Likewise.
32726 (vectorizable_load): Likewise.
32727 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
32728 vec_perm_indices instead of auto_vec_perm_indices. Use
32729 tree_to_vec_perm_builder to read the vector from a tree.
32730 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
32731 vec_perm_builder instead of a vec_perm_indices.
32732 (have_whole_vector_shift): Use vec_perm_builder and
32733 vec_perm_indices instead of auto_vec_perm_indices. Leave the
32734 truncation to calc_vec_perm_mask_for_shift.
32735 (vect_create_epilog_for_reduction): Likewise.
32736 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
32737 from auto_vec_perm_indices to vec_perm_indices.
32738 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
32739 instead of changing individual elements.
32740 (aarch64_vectorize_vec_perm_const): Use new_vector to install
32741 the vector in d.perm.
32742 * config/arm/arm.c (expand_vec_perm_d::perm): Change
32743 from auto_vec_perm_indices to vec_perm_indices.
32744 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
32745 instead of changing individual elements.
32746 (arm_vectorize_vec_perm_const): Use new_vector to install
32747 the vector in d.perm.
32748 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
32749 Update vec_perm_builder constructor.
32750 (rs6000_expand_interleave): Likewise.
32751 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
32752 (rs6000_expand_interleave): Likewise.
32754 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32756 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
32757 to qimode could truncate the indices.
32758 * optabs.c (expand_vec_perm_var): Likewise.
32760 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32762 * Makefile.in (OBJS): Add vec-perm-indices.o.
32763 * vec-perm-indices.h: New file.
32764 * vec-perm-indices.c: Likewise.
32765 * target.h (vec_perm_indices): Replace with a forward class
32767 (auto_vec_perm_indices): Move to vec-perm-indices.h.
32768 * optabs.h: Include vec-perm-indices.h.
32769 (expand_vec_perm): Delete.
32770 (selector_fits_mode_p, expand_vec_perm_var): Declare.
32771 (expand_vec_perm_const): Declare.
32772 * target.def (vec_perm_const_ok): Replace with...
32773 (vec_perm_const): ...this new hook.
32774 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
32775 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
32776 * doc/tm.texi: Regenerate.
32777 * optabs.def (vec_perm_const): Delete.
32778 * doc/md.texi (vec_perm_const): Likewise.
32779 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
32780 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
32781 expand_vec_perm for constant permutation vectors. Assert that
32782 the mode of variable permutation vectors is the integer equivalent
32783 of the mode that is being permuted.
32784 * optabs-query.h (selector_fits_mode_p): Declare.
32785 * optabs-query.c: Include vec-perm-indices.h.
32786 (selector_fits_mode_p): New function.
32787 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
32788 is defined, instead of checking whether the vec_perm_const_optab
32789 exists. Use targetm.vectorize.vec_perm_const instead of
32790 targetm.vectorize.vec_perm_const_ok. Check whether the indices
32791 fit in the vector mode before using a variable permute.
32792 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
32793 vec_perm_indices instead of an rtx.
32794 (expand_vec_perm): Replace with...
32795 (expand_vec_perm_const): ...this new function. Take the selector
32796 as a vec_perm_indices rather than an rtx. Also take the mode of
32797 the selector. Update call to shift_amt_for_vec_perm_mask.
32798 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
32799 Use vec_perm_indices::new_expanded_vector to expand the original
32800 selector into bytes. Check whether the indices fit in the vector
32801 mode before using a variable permute.
32802 (expand_vec_perm_var): Make global.
32803 (expand_mult_highpart): Use expand_vec_perm_const.
32804 * fold-const.c: Includes vec-perm-indices.h.
32805 * tree-ssa-forwprop.c: Likewise.
32806 * tree-vect-data-refs.c: Likewise.
32807 * tree-vect-generic.c: Likewise.
32808 * tree-vect-loop.c: Likewise.
32809 * tree-vect-slp.c: Likewise.
32810 * tree-vect-stmts.c: Likewise.
32811 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
32813 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
32814 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
32815 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
32816 (aarch64_vectorize_vec_perm_const): ...this new function.
32817 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
32818 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
32819 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
32820 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
32821 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
32822 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
32823 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
32825 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
32826 check for NEON modes.
32827 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
32828 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
32829 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
32830 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
32832 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
32833 the old VEC_PERM_CONST conditions.
32834 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
32835 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
32836 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
32837 (ia64_vectorize_vec_perm_const_ok): Merge into...
32838 (ia64_vectorize_vec_perm_const): ...this new function.
32839 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
32840 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
32841 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
32842 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
32843 * config/mips/mips.c (mips_expand_vec_perm_const)
32844 (mips_vectorize_vec_perm_const_ok): Merge into...
32845 (mips_vectorize_vec_perm_const): ...this new function.
32846 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
32847 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
32848 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
32849 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
32850 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
32851 (rs6000_expand_vec_perm_const): Delete.
32852 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
32854 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
32855 (altivec_expand_vec_perm_const_le): Take each operand individually.
32856 Operate on constant selectors rather than rtxes.
32857 (altivec_expand_vec_perm_const): Likewise. Update call to
32858 altivec_expand_vec_perm_const_le.
32859 (rs6000_expand_vec_perm_const): Delete.
32860 (rs6000_vectorize_vec_perm_const_ok): Delete.
32861 (rs6000_vectorize_vec_perm_const): New function.
32862 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
32863 an element count and rtx array.
32864 (rs6000_expand_extract_even): Update call accordingly.
32865 (rs6000_expand_interleave): Likewise.
32866 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
32867 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
32868 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
32869 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
32870 (rs6000_expand_vec_perm_const): Delete.
32871 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
32872 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
32873 (altivec_expand_vec_perm_const_le): Take each operand individually.
32874 Operate on constant selectors rather than rtxes.
32875 (altivec_expand_vec_perm_const): Likewise. Update call to
32876 altivec_expand_vec_perm_const_le.
32877 (rs6000_expand_vec_perm_const): Delete.
32878 (rs6000_vectorize_vec_perm_const_ok): Delete.
32879 (rs6000_vectorize_vec_perm_const): New function. Remove stray
32880 reference to the SPE evmerge intructions.
32881 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
32882 an element count and rtx array.
32883 (rs6000_expand_extract_even): Update call accordingly.
32884 (rs6000_expand_interleave): Likewise.
32885 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
32886 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
32888 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
32890 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32892 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
32893 vector mode and that that mode matches the mode of the data
32895 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
32896 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
32897 directly using expand_vec_perm_1 when forcing selectors into
32899 (expand_vec_perm_var): New function, split out from expand_vec_perm.
32901 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32903 * optabs-query.h (can_vec_perm_p): Delete.
32904 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
32905 * optabs-query.c (can_vec_perm_p): Split into...
32906 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
32907 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
32908 particular selector is valid.
32909 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
32910 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
32911 (vect_grouped_load_supported): Likewise.
32912 (vect_shift_permute_load_chain): Likewise.
32913 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
32914 (vect_transform_slp_perm_load): Likewise.
32915 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
32916 (vectorizable_bswap): Likewise.
32917 (vect_gen_perm_mask_checked): Likewise.
32918 * fold-const.c (fold_ternary_loc): Likewise. Don't take
32919 implementations of variable permutation vectors into account
32920 when deciding which selector to use.
32921 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
32922 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
32923 with a false third argument.
32924 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
32925 to test whether the constant selector is valid and can_vec_perm_var_p
32926 to test whether a variable selector is valid.
32928 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32930 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
32931 * optabs-query.c (can_vec_perm_p): Likewise.
32932 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
32933 instead of vec_perm_indices.
32934 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
32935 (vect_gen_perm_mask_checked): Likewise,
32936 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
32937 (vect_gen_perm_mask_checked): Likewise,
32939 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32941 * optabs-query.h (qimode_for_vec_perm): Declare.
32942 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
32943 (qimode_for_vec_perm): ...this new function.
32944 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
32946 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
32948 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
32949 does not have a conditional at the top.
32951 2018-01-02 Richard Biener <rguenther@suse.de>
32953 * ipa-inline.c (big_speedup_p): Fix expression.
32955 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
32958 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
32961 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
32965 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
32966 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
32967 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
32968 cond_taken_branch_cost 3->4.
32970 2018-01-01 Jakub Jelinek <jakub@redhat.com>
32972 PR tree-optimization/83581
32973 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
32974 TODO_cleanup_cfg if any changes have been made.
32976 PR middle-end/83608
32977 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
32978 convert_modes if target mode has the right side, but different mode
32981 PR middle-end/83609
32982 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
32983 last argument when extracting from CONCAT. If either from_real or
32984 from_imag is NULL, use expansion through memory. If result is not
32985 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
32986 the parts directly to inner mode, if even that fails, use expansion
32989 PR middle-end/83623
32990 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
32991 check for bswap in mode rather than HImode and use that in expand_unop
32994 Copyright (C) 2018 Free Software Foundation, Inc.
32996 Copying and distribution of this file, with or without modification,
32997 are permitted in any medium without royalty provided the copyright
32998 notice and this notice are preserved.