1 2018-11-23 Richard Biener <rguenther@suse.de>
3 PR tree-optimization/88149
4 * tree-vect-slp.c (vect_slp_analyze_node_operations): Detect
5 the case where there are two different def types for the
6 same operand at different operand position in the same stmt.
8 2018-23-11 Mihail Ionescu <mihail.ionescu@arm.com>
10 * config/arm/arm.c (arm_expand_compare_and_swap): Simplify and call
11 gen_atomic_compare_swap_1.
12 (arm_evpc_neon_vuzp): Likewise gen_neon_vuzp_internal.
13 (arm_evpc_neon_vtrn): Likewise gen_neon_vtrn_internal.
14 (arm_evpc_neon_vext): Likewise gen_neon_vext_internal.
15 (arm_evpc_neon_vzip): Likewise gen_neon_vzip_internal.
16 (arm_evpc_neon_vrev): Replace the function pointer and simplify the mode
18 * config/arm/arm.md (neon_vext<mode>),
19 (neon_vrev64<mode>, neon_vrev32<mode>),
20 (neon_vrev16<mode>, neon_vtrn<mode>_internal),
21 (neon_vzip<mode>_internal, neon_vuzp<mode>_internal): Add an '@'character
22 before the pattern name.
24 (atomic_compare_and_swap<CCSI:arch><NARROW:mode>_1),
25 (atomic_compare_and_swap<CCSI:arch><SIDI:mode>_1): Likewise.
27 2018-11-23 Jakub Jelinek <jakub@redhat.com>
29 PR tree-optimization/86614
30 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return early
31 if TREE_NO_WARNING is set on ref.ref.
33 2018-11-22 Sandra Loosemore <sandra@codesourcery.com>
34 Alan Coopersmith <alan.coopersmith@oracle.com>
37 * doc/extend.texi (Designated Inits): Clarify handling of multiple
38 initializers for unions.
40 2018-11-22 Jan Hubicka <jh@suse.cz>
43 * ipa-devirt.c (type_variants_equivalent_p): Drop warn and warned
44 parameters; do not warn here.
45 (odr_subtypes_equivalent_p): Likewise.
47 (warn_types_mismatch): Do not output confused warnings on integer types.
48 (odr_types_equivalent_p): Update.
50 2018-11-22 Jakub Jelinek <jakub@redhat.com>
52 * config/i386/i386.c (ix86_option_override_internal,
53 ix86_can_inline_p, classify_argument, construct_container,
54 ix86_expand_prologue, ix86_expand_split_stack_prologue,
55 ix86_expand_carry_flag_compare, expand_set_or_movmem_via_loop,
56 expand_setmem_epilogue_via_loop, promote_duplicated_reg,
57 ix86_expand_set_or_movmem, ix86_init_builtins_va_builtins_abi):
60 * config/i386/i386.c (ix86_option_override_internal): For
61 stack_protector_guard related options, use opts_set->x_ instead
62 of global_options_set. and prefix options with opts->x_ . Move
63 defaults for offset and reg into else block.
65 2018-11-22 Uros Bizjak <ubizjak@gmail.com>
67 * config/i386/i386.c (ix86_check_avx_upper_register):
68 Return true for all SSE registers with mode bitsize > 128.
70 2018-11-22 Vladimir Makarov <vmakarov@redhat.com>
72 PR rtl-optimization/87718
73 * ira-costs.c: Remove trailing white-spaces.
74 (record_operand_costs): Add a special treatment for moves
75 involving a hard register.
77 2018-11-22 Uros Bizjak <ubizjak@gmail.com>
79 * config/i386/i386.c (ix86_avx_emit_vzeroupper): Remove.
80 (ix86_emit_mode_set) <case AVX_U128>: Emit vzeroupper here.
82 2018-11-22 Martin Liska <mliska@suse.cz>
84 * common/config/i386/i386-common.c (processor_names): Add
85 static assert and add missing "znver2".
86 (ix86_get_valid_option_values): Add checking assert for null
87 values and add "native" value if feasible.
88 * config/i386/i386.h: Do not declare size of processor_names.
89 * common/config/i386/i386-common.c:
90 * config/i386/i386.c: Add static assert for size
91 of processor_cost_table.
93 2018-11-22 Thomas Preud'homme <thomas.preudhomme@linaro.org>
95 * target-insns.def (stack_protect_combined_set): Define new standard
97 (stack_protect_combined_test): Likewise.
98 * cfgexpand.c (stack_protect_prologue): Try new
99 stack_protect_combined_set pattern first.
100 * function.c (stack_protect_epilogue): Try new
101 stack_protect_combined_test pattern first.
102 * config/arm/arm.c (require_pic_register): Add pic_reg and compute_now
103 parameters to control which register to use as PIC register and force
104 reloading PIC register respectively. Insert in the stream of insns if
106 (legitimize_pic_address): Expose above new parameters in prototype and
107 adapt recursive calls accordingly. Use pic_reg if non null instead of
109 (arm_load_pic_register): Add pic_reg parameter and use it if non null.
110 (arm_legitimize_address): Adapt to new legitimize_pic_address
112 (thumb_legitimize_address): Likewise.
113 (arm_emit_call_insn): Adapt to require_pic_register prototype change.
114 (arm_expand_prologue): Adapt to arm_load_pic_register prototype change.
115 (thumb1_expand_prologue): Likewise.
116 * config/arm/arm-protos.h (legitimize_pic_address): Adapt to prototype
118 (arm_load_pic_register): Likewise.
119 * config/arm/predicated.md (guard_addr_operand): New predicate.
120 (guard_operand): New predicate.
121 * config/arm/arm.md (movsi expander): Adapt to legitimize_pic_address
123 (builtin_setjmp_receiver expander): Adapt to thumb1_expand_prologue
125 (stack_protect_combined_set): New expander..
126 (stack_protect_combined_set_insn): New insn_and_split pattern.
127 (stack_protect_set_insn): New insn pattern.
128 (stack_protect_combined_test): New expander.
129 (stack_protect_combined_test_insn): New insn_and_split pattern.
130 (arm_stack_protect_test_insn): New insn pattern.
131 * config/arm/thumb1.md (thumb1_stack_protect_test_insn): New insn pattern.
132 * config/arm/unspecs.md (UNSPEC_SP_SET): New unspec.
133 (UNSPEC_SP_TEST): Likewise.
134 * doc/md.texi (stack_protect_combined_set): Document new standard
136 (stack_protect_set): Clarify that the operand for guard's address is
138 (stack_protect_combined_test): Document new standard pattern name.
139 (stack_protect_test): Clarify that the operand for guard's address is
142 2018-11-22 Richard Biener <rguenther@suse.de>
144 PR tree-optimization/88148
145 * tree-ssa-loop-niter.c (simplify_replace_tree): Get optional
146 valueization callback parameter and handle it.
147 * tree-ssa-loop-niter.h (simplify_replace_tree): Export.
148 * tree-ssa-sccvn.c (process_bb): Eliminate in loop niter trees.
150 2018-11-22 Richard Biener <rguenther@suse.de>
154 * lto-streamer-out.c (lto_is_streamable): Allow CALL_EXPRs
155 which can appear in size expressions.
156 * tree-streamer-in.c (unpack_ts_base_value_fields): Stream
157 CALL_EXPR_BY_DESCRIPTOR.
158 (streamer_read_tree_bitfields): Stream CALL_EXPR_IFN.
159 * tree-streamer-out.c (pack_ts_base_value_fields): Stream
160 CALL_EXPR_BY_DESCRIPTOR.
161 (streamer_write_tree_bitfields): Stream CALL_EXPR_IFN.
165 * tree.c (free_lang_data_in_one_sizepos): Free non-gimple-val
168 2018-11-22 Richard Biener <rguenther@suse.de>
170 PR tree-optimization/88069
171 * tree-ssa-sccvn.c (visit_phi): Tweak previous fix to not
172 apply to default defs.
174 2018-11-22 Jakub Jelinek <jakub@redhat.com>
178 * config/i386/i386.c (ix86_option_override_internal): Default
179 ix86_stack_protector_guard to SSP_TLS only if TARGET_THREAD_SSP_OFFSET
181 * config/i386/i386.md (stack_protect_set, stack_protect_set_<mode>,
182 stack_protect_test, stack_protect_test_<mode>): Use empty condition
183 instead of TARGET_SSP_TLS_GUARD.
185 2018-11-22 Martin Liska <mliska@suse.cz>
188 * config/i386/i386.c (ix86_option_override_internal): Error
189 about usage -mabi=ms and -fsanitize=thread.
191 2018-11-21 Uros Bizjak <ubizjak@gmail.com>
194 2013-10-26 Vladimir Makarov <vmakarov@redhat.com>
197 2013-10-25 Vladimir Makarov <vmakarov@redhat.com>
199 * lra-spills.c (lra_final_code_change): Remove useless move insns.
201 2018-11-21 Uros Bizjak <ubizjak@gmail.com>
204 * function.c (expand_function_end): Do not emit extra blockage insn.
206 2018-11-21 Lokesh Janghel <lokeshjanghel91@gmail.com>
209 * config/i386/i386.c (function_value_ms_64): Return AX_REG instead
210 of FIRST_SSE_REG for 4 or 8 byte modes.
212 2018-11-21 Jan Hubicka <jh@suse.cz>
215 * tree.c (fld_decl_context): Break out from ...
216 (free_lang_data_in_decl): ... here; free TREE_PUBLIC, TREE_PRIVATE
217 DECL_ARTIFICIAL of TYPE_DECL; do not free TREE_TYPE of TYPE_DECL.
218 (fld_incomplete_type_of): Build copy of TYP_DECL.
219 * ipa-devirt.c (free_enum_values): Rename to ...
220 (free_odr_warning_data): ... this one; free also duplicated TYPE_DECLs
221 and TREE_TYPEs of TYPE_DECLs.
222 (get_odr_type): Initialize odr_vtable_hash if needed.
224 2018-11-21 Alexandre Oliva <oliva@adacore.com>
226 * final.c (compute_discriminator): Declare. Renamed from...
227 (maybe_set_discriminator): ... this. Set and return a local.
228 (override_discriminator): New.
229 (final_scan_insn_1): Set it.
230 (notice_source_line): Adjust. Always set discriminator.
232 2018-11-21 Jakub Jelinek <jakub@redhat.com>
235 * config/aarch64/atomics.md (@aarch64_compare_and_swap<mode>): Use
236 rIJ constraint for aarch64_plus_operand rather than rn.
238 2018-11-21 Renlin Li <renlin.li@arm.com>
241 * explow.h (get_dynamic_stack_size): Declare it as external.
242 * explow.c (record_new_stack_level): Remove function static attribute.
243 * function.c (assign_stack_local_1): Dynamically align the stack slot
244 addr for parameter copy on the stack.
246 2018-11-21 Richard Biener <rguenther@suse.de>
249 * bitmap.c (bitmap_last_set_bit): Refactor to avoid warning.
250 * Makefile.in (bitmap.o-warn): Remove again.
252 2018-11-20 Jeff Law <law@redhat.com>
254 PR tree-optimization/88069
255 * tree-ssa-dom.c (record_equivalences_from_phis): Propagate away
256 degenerate virtual PHIs.
258 2018-11-21 H.J. Lu <hongjiu.lu@intel.com>
261 * config/i386/sse.md (sse4_1_<code>v8qiv8hi2<mask_name>): Replace
262 nonimmediate_operand with register_operand.
263 (avx2_<code>v8qiv8si2<mask_name>): Likewise.
264 (sse4_1_<code>v4qiv4si2<mask_name>): Likewise.
265 (sse4_1_<code>v4hiv4si2<mask_name>): Likewise.
266 (sse4_1_<code>v2qiv2di2<mask_name>): Likewise.
267 (avx512f_<code>v8qiv8di2<mask_name>): Likewise.
268 (avx2_<code>v4qiv4di2<mask_name>): Likewise.
269 (avx2_<code>v4hiv4di2<mask_name>): Likewise.
270 (sse4_1_<code>v2hiv2di2<mask_name>): Likewise.
271 (sse4_1_<code>v2siv2di2<mask_name>): Likewise.
272 (*sse4_1_<code>v8qiv8hi2<mask_name>_1): New pattern.
273 (*sse4_1_<code>v8qiv8hi2<mask_name>_2): Likewise.
274 (*avx2_<code>v8qiv8si2<mask_name>_1): Likewise.
275 (*avx2_<code>v8qiv8si2<mask_name>_2): Likewise.
276 (*sse4_1_<code>v4qiv4si2<mask_name>_1): Likewise.
277 (*sse4_1_<code>v4qiv4si2<mask_name>_2): Likewise.
278 (*sse4_1_<code>v4hiv4si2<mask_name>_1): Likewise.
279 (*sse4_1_<code>v4hiv4si2<mask_name>_2): Likewise.
280 (*avx512f_<code>v8qiv8di2<mask_name>_1): Likewise.
281 (*avx512f_<code>v8qiv8di2<mask_name>_2): Likewise.
282 (*avx2_<code>v4qiv4di2<mask_name>_1): Likewise.
283 (*avx2_<code>v4qiv4di2<mask_name>_2): Likewise.
284 (*avx2_<code>v4hiv4di2<mask_name>_1): Likewise.
285 (*avx2_<code>v4hiv4di2<mask_name>_2): Likewise.
286 (*sse4_1_<code>v2hiv2di2<mask_name>_1): Likewise.
287 (*sse4_1_<code>v2hiv2di2<mask_name>_2): Likewise.
288 (*sse4_1_<code>v2siv2di2<mask_name>_1): Likewise.
289 (*sse4_1_<code>v2siv2di2<mask_name>_2): Likewise.
291 2018-11-21 H.J. Lu <hongjiu.lu@intel.com>
293 * read-rtl.c (apply_subst_iterator): Handle define_split and
294 define_insn_and_split.
296 2018-11-21 Jakub Jelinek <jakub@redhat.com>
298 PR rtl-optimization/87817
299 * config/i386/i386.md (bmi2_bzhi_<mode>3, *bmi2_bzhi_<mode>3,
300 *bmi2_bzhi_<mode>3_1, *bmi2_bzhi_<mode>3_1_ccz): Use IF_THEN_ELSE
301 in the pattern to avoid triggering UB when operands[2] is zero.
302 (tbm_bextri_<mode>): New expander. Renamed the old define_insn to ...
303 (*tbm_bextri_<mode>): ... this.
305 2018-11-21 Tom de Vries <tdevries@suse.de>
308 * params.def (HOT_BB_COUNT_FRACTION): Terminate help message with
311 2018-11-21 Andreas Krebbel <krebbel@linux.ibm.com>
313 * configure.ac: Add check for Binutils to determine whether vector
314 load/store alignments hints are being supported.
315 * config.in: Regenerate.
316 * configure: Regenerate.
317 * config/s390/s390.c (print_operand): Support new output
319 * config/s390/s390.md ("movti"): Append alignment hint output
320 using the new output modifier 'A'.
321 * config/s390/vector.md ("mov<mode>", "*vec_tf_to_v1tf")
322 ("*vec_ti_to_v1ti"): Likewise.
324 2018-11-20 Martin Sebor <msebor@redhat.com>
326 * doc/extend.texi (Other Builtins): Add __builtin_has_attribute.
328 2018-11-20 Jan Hubicka <hubicka@ucw.cz>
331 * ipa-devirt.c (odr_types_equivalent_p): Use operand_equal_p to
334 2018-11-20 Jakub Jelinek <jakub@redhat.com>
336 PR tree-optimization/87895
337 * omp-simd-clone.c (ipa_simd_modify_function_body): When removing
338 or replacing GIMPLE_RETURN, set EDGE_FALLTHRU on the edge to EXIT.
339 (simd_clone_adjust): Don't set EDGE_FALLTHRU here. In a loop that
340 redirects edges to EXIT to edges to incr_bb, iterate while EXIT
341 has any preds and always use EDGE_PRED (, 0).
343 2018-11-20 Uros Bizjak <ubizjak@gmail.com>
346 * mode-switching.c (create_pre_exit): After reload, always split the
347 fallthrough edge to the exit block.
349 2018-11-20 Jan Hubicka <hubicka@ucw.cz>
351 * ipa-devirt.c (add_type_duplicate): Do not ICE on incomplete enums.
352 * tree.c (build_array_type_1): Forward declare.
353 (fld_type_variant_equal_p): Add INNER_TYPE parameter.
354 (fld_type_variant): Likewise.
355 (fld_simplified_types): New hash.
356 (fld_process_array_type): New function.
357 (fld_incomplete_type_of): Handle array and enumeration types.
358 (fld_simplified_type): Handle simplification of arrays.
359 (free_lang_data): Allocate and free simplified types hash.
361 2018-11-20 Jan Hubicka <hubicka@ucw.cz>
364 * ipa-devirt.c (odr_subtypes_equivalent_p): Report ODR violation
365 when sybtype already violates ODR.
366 (get_odr_type): Do not ICE when insert is false and type duplicate
367 is not registered yet.
368 (register_odr_type): Be sure to register subtypes first.
370 2018-11-20 Andreas Krebbel <krebbel@linux.ibm.com>
372 * config/s390/s390.md ("clztidi2"): Swap the RTX's written to the
373 DImode parts of the target operand.
375 2018-11-20 Nathan Sidwell <nathan@acm.org>
378 * Makefile.in (bitmap.o-warn): Use -Wno-error=array-bounds.
380 2018-11-20 Jan Hubicka <hubicka@ucw.cz>
383 * tree.c (free_lang_data_in_cgraph): Add argument fld; break out
385 (free_lang_data) ... here; update call of free_lang_data_in_cgraph.
387 2018-11-20 Jan Hubicka <hubicka@ucw.cz>
390 * ipa-fnsummary.c (pass_ipa_fnsummary): Do not remove functions
391 * ipa.c (possible_inline_candidate_p): Break out from ..
392 (process_references): ... here ; drop before_inlining_p;
393 cleanup handling of alises.
394 (walk_polymorphic_call_targets): Likewise.
395 (symbol_table::remove_unreachable_nodes): Likewise.
396 * passes.c (pass_data_ipa_remove_symbols): New structure.
397 (pass_ipa_remove_symbols): New pass.
398 (make_pass_ipa_remove_symbols): New function.
399 * tree-pass.h (make_pass_ipa_remove_symbols): Declare.
400 * passes.def (pass_ipa_remove_symbols): Schedule after early passes.
402 2018-11-20 Richard Biener <rguenther@suse.de>
404 * tree-vect-stmts.c (vectorizable_condition): Do not get
405 at else_clause vect def for EXTRACT_LAST_REDUCTION. Remove
406 pointless vect_is_simple_use calls.
408 2018-11-20 Richard Biener <rguenther@suse.de>
410 PR tree-optimization/88074
411 * tree-ssa-dom.c (pass_dominator::execute): Do not walk
414 2018-11-20 Richard Biener <rguenther@suse.de>
416 PR tree-optimization/88069
417 * tree-ssa-sccvn.c (visit_phi): Do not value-number to unvisited
418 virtual PHI arguments.
420 2018-11-20 Ilya Leoshkevich <iii@linux.ibm.com>
423 * config/s390/s390.md: Skip LT(G) peephole when literal pool is
425 * rtl.h (contains_constant_pool_address_p): New function.
426 * rtlanal.c (contains_constant_pool_address_p): Likewise.
428 2018-11-20 Richard Biener <rguenther@suse.de>
431 * alias.c (component_uses_parent_alias_set_from): Remove
432 alias-set zero and TYPE_TYPELESS_STORAGE case both already
433 handled in other ways.
435 2018-11-20 Richard Biener <rguenther@suse.de>
437 PR tree-optimization/88087
438 * tree-ssa-pre.c (create_expression_by_pieces): Re-materialize
440 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Remember
443 2018-11-20 Richard Biener <rguenther@suse.de>
446 * tree-data-ref.c (lambda_matrix_right_hermite): Use abs_hwi.
448 2018-11-19 Jan Hubicka <hubicka@ucw.cz>
451 * ipa-devirt.c (free_enum_values): Do not ICE on ODR vilations.
453 2018-11-19 Sandra Loosemore <sandra@codesourcery.com>
456 * doc/invoke.texi (Link Options): Mention shared libraries
457 in documentation for the -l option. Simplify discussion and
458 point to the system linker documentation for details.
460 2018-11-19 Peter Bergner <bergner@linux.ibm.com>
462 PR rtl-optimization/88033
463 * ira-lives.c (non_conflicting_reg_copy_p): Skip copies from a register
464 to itself. Use HARD_REGISTER_NUM_P.
466 2018-11-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
468 * tree-vect-loop.c (vect_transform_loop): Disable further unrolling
469 of the loop if vf is non-constant.
471 2018-11-19 David Malcolm <dmalcolm@redhat.com>
473 PR tree-optimization/87025
474 * dumpfile.c (dump_context::begin_scope): Call end_any_optinfo
475 immediately after creating the scope optinfo.
476 (selftest::test_pr87025): New function.
477 (selftest::dumpfile_c_tests): Call it.
478 * optinfo-emit-json.cc (optrecord_json_writer::pop_scope): Assert
479 that we're not popping the top-level records array.
480 * optinfo.cc (optinfo::handle_dump_file_kind): Assert that we're
481 not changing the kind of a "scope" optinfo.
483 2018-11-19 David Malcolm <dmalcolm@redhat.com>
485 PR tree-optimization/87025
486 * dump-context.h: Include "optinfo.h".
487 (class optrecord_json_writer): New forward decl.
488 (dump_context::forcibly_enable_optinfo_p): Delete.
489 (dump_context::optinfo_enabled_p): New member function.
490 (dump_context::optimization_records_enabled_p): New member
492 (dump_context::set_json_writer): New member function.
493 (dump_context::emit_optinfo): New member function.
494 (dump_context::m_forcibly_enable_optinfo): Delete.
495 (dump_context::m_json_writer): New member data.
496 * dumpfile.c (dump_context::set_json_writer): New member function.
497 (dump_context::finish_any_json_writer): New member function.
498 (dump_context::end_scope): Replace call to
499 optimization_records_maybe_pop_dump_scope with call to
500 m_json_writer->pop_scope.
501 (dump_context::optinfo_enabled_p): New member function.
502 (dump_context::end_any_optinfo): Replace call to optinfo::emit with call
503 to dump_context::emit_optinfo.
504 (dump_context::emit_optinfo): New member function.
505 (temp_dump_context::temp_dump_context): Replace
506 m_forcibly_enable_optinfo with call to set_json_writer.
507 (temp_dump_context::~temp_dump_context): Clean up any json writer.
508 * optinfo-emit-json.cc (class optrecord_json_writer): Move to
510 (the_json_writer): Delete.
511 (optimization_records_start): Delete.
512 (optimization_records_finish): Delete.
513 (optimization_records_enabled_p): Delete, in favor of
514 dump_context::optimization_records_enabled_p.
515 (optimization_records_maybe_record_optinfo): Delete.
516 (optimization_records_maybe_pop_dump_scope): Delete.
517 * optinfo-emit-json.h: Include "json.h". Delete forward
519 (optimization_records_start): Delete.
520 (optimization_records_finish): Delete.
521 (optimization_records_enabled_p): Delete.
522 (optimization_records_maybe_record_optinfo): Delete.
523 (optimization_records_maybe_pop_dump_scope): Delete.
524 (class optrecord_json_writer): Move here from
525 optinfo-emit-json.cc.
526 * optinfo.cc (optinfo::emit_for_opt_problem): Replace call
527 to optinfo::emit with call to dump_context::emit_optinfo.
528 (optinfo::emit): Delete, in favor of dump_context::emit_optinfo.
529 (optinfo_enabled_p): Delete, in favor of
530 dump_context::optinfo_enabled_p.
531 (optinfo_wants_inlining_info_p): Update for conversion o
532 optimization_records_enabled_p to a member function of
534 * optinfo.h (optinfo_enabled_p): Delete, in favor of
535 dump_context::optinfo_enabled_p.
536 (optinfo::emit): Delete, in favor of dump_context::emit_optinfo.
537 * toplev.c: Include "dump-context.h".
538 (compile_file): Replace call to optimization_records_finish with
539 dump_context::finish_any_json_writer.
540 (do_compile): Replace call to optimization_records_start with
541 conditionally creating a optrecord_json_writer for the
544 2018-11-19 Jakub Jelinek <jakub@redhat.com>
546 PR tree-optimization/88071
547 * tree-vect-loop.c (vectorize_fold_left_reduction): Pass true instead
548 of false as last argument to gsi_remove.
549 * tree-vect-stmts.c (vect_finish_replace_stmt): Pass true instead of
550 false as last argument to gsi_replace.
553 * omp-expand.c: Don't include debug.h.
554 (adjust_context_and_scope): Add REGION argument. Find DECL_CONTEXT
555 from innermost outer parallel, task, teams or target that has a
556 child_fn set, or, if there is no such outer region, use
557 current_function_decl. Do the DECL_CONTEXT adjustment regardless of
558 whether a suitable BLOCK is found or not.
559 (expand_parallel_call, expand_teams_call): Don't call
560 adjust_context_and_scope here.
561 (grid_expand_target_grid_body): Revert 2017-01-25 changes.
562 (expand_omp_taskreg, expand_omp_target): Likewise. Call
563 adjust_context_and_scope.
564 * dwarf2out.c (dwarf2out_early_global_decl): For
565 decl_function_context recurse instead of calling dwarf2out_decl.
567 2018-11-20 Eric Botcazou <ebotcazou@adacore.com>
569 PR rtl-optimization/85925
570 * rtl.h (word_register_operation_p): New predicate.
571 * combine.c (record_dead_and_set_regs_1): Only apply specific handling
572 for WORD_REGISTER_OPERATIONS targets to word_register_operation_p RTX.
573 * rtlanal.c (nonzero_bits1): Likewise. Adjust couple of comments.
574 (num_sign_bit_copies1): Likewise.
576 2018-11-19 Richard Biener <rguenther@suse.de>
579 * tree.c (free_lang_data_in_one_sizepos): Free non-gimple-val
582 2018-11-19 Eric Botcazou <ebotcazou@adacore.com>
584 * compare-elim.c (struct comparison): Add not_in_a field.
585 (is_not): New static function.
586 (strip_not): Likewise.
587 (conforming_compare): Handle a NOT in the first operand.
588 (can_eliminate_compare): Likewise.
589 (find_comparison_dom_walker::before_dom_children): Likewise.
590 (try_eliminate_compare): Likewise.
591 * config/visium/visium.md (negsi2_insn_set_carry): Turn into...
592 (neg<mode>2_insn_set_carry): ...this and add missing NEG operation.
594 2018-11-19 Jonathan Wakely <jwakely@redhat.com>
596 * doc/extend.texi (Common Type Attributes): Fix typos.
598 2018-11-19 Martin Liska <mliska@suse.cz>
600 PR gcov-profile/88045
601 * coverage.c (coverage_begin_function): Add assert.
603 2018-11-18 Sandra Loosemore <sandra@codesourcery.com>
606 * doc/extend.texi (Common Function Attributes): Document that
607 no_instrument_function applies to -p and -pg, too.
608 * doc/invoke.texi (Instrumentation Options): Add cross-references
609 to docs for -p, -pg, and -finstrument-functions.
611 2018-11-18 Alan Modra <amodra@gmail.com>
613 * config/gnu-user.h (GNU_USER_TARGET_CRTI): Define.
614 (GNU_USER_TARGET_STARTFILE_SPEC): Use it here.
615 (GNU_USER_TARGET_CRTN): Define.
616 (GNU_USER_TARGET_ENDFILE_SPEC): Use it here.
617 (GNU_USER_TARGET_LINK_GCC_C_SEQUENCE_SPEC): Define.
619 2018-11-18 Alan Modra <amodra@gmail.com>
621 * config/gnu-user.h (GNU_USER_TARGET_STARTFILE_SPEC): Delete
622 !HAVE_LD_PIE variant.
623 (GNU_USER_TARGET_ENDFILE_SPEC): Likewise.
625 2018-11-17 Nick Clifton <nickc@redhat.com>
626 Sandra Loosemore <sandra@codesourcery.com>
629 * doc/invoke.texi (Overall Options): Document that --help and
630 --help=<value> options cannot be combined.
632 2018-11-17 Jim Wilson <jimw@sifive.com>
634 * config/riscv/riscv.c (epilogue_cfa_sp_offset): New.
635 (riscv_restore_reg): If restoring HARD_FRAME_POINTER_REGNUM, and
636 epilogue_cfa_sp_offset set, then add REG_CFA_DEF_CFA regnote.
637 (riscv_expand_epilogue): Initialize epilogue_cfa_sp_offset. Set it
638 to step2 if frame_pointer_needed and step1 is 0.
640 2018-11-17 Sandra Loosemore <sandra@codesourcery.com>
643 * doc/cpp.texi (System Headers): Add note about implicit
644 extern "C" block on targets that define SYSTEM_IMPLICIT_EXTERN_C.
646 2018-11-17 Sandra Loosemore <sandra@codesourcery.com>
649 * doc/invoke.texi (C++ Dialect Options): Clarify usage of
650 -fno-implicit-templates.
652 2018-11-17 Jakub Jelinek <jakub@redhat.com>
654 PR tree-optimization/87546
655 * tree-vect-patterns.c (vect_look_through_possible_promotion): Add
656 min_precision variable, initially set it to orig_precision, only does
657 something if op_type's precision is <= min_precision and update
658 min_precision whenever calling set_op.
660 2018-11-16 Jan Hubicka <hubicka@ucw.cz>
663 * ipa-devirt.c (warn_odr): Look for main variant to get TYPE_DECL.
665 2018-11-16 Sandra Loosemore <sandra@codesourcery.com>
667 * doc/invoke.texi (Option Summary): Fix whitespace and line
668 breaks in @gccoptlist environments.
669 (Warning Options): Likewise.
670 (Optimize Options): Likewise.
671 (PowerPC SPE Options): Likewise.
672 (RS/6000 and PowerPC Options): Likewise.
674 2018-11-16 Jeff Law <law@redhat.com>
676 * config/mn10300/mn10300.md (adddi3_degenerate): Remove bogus
679 2018-11-16 Sandra Loosemore <sandra@codesourcery.com>
682 * doc/invoke.texi (Optimize Options): Update options enabled by
683 fprofile-generate, -fprofile-use, and -fauto-profile.
685 2018-11-16 Jozef Lawrynowicz <jozef.l@mittosystems.com>
688 * target-def.h: Initialize TARGET_ASM_{,UN}ALIGNED_P{S,D,T}I_OP.
689 Add them to the TARGET_ASM_{,UN}ALIGNED_INT_OP structs.
690 * target.def: Enumerate TARGET_ASM_{,UN}ALIGNED_P{S,D,T}I_OP in
692 * target.h: Add psi, pdi, pti to struct asm_int_op definition.
693 * targhooks.c (default_print_patchable_function_entry): Assert
694 asm_int_op does not return a NULL string.
695 * varasm.c (integer_asm_op): Return the op for a partial int type
696 when the requested size does not correspond to an integer type.
697 * config/msp430/msp430.c: Initialize TARGET_ASM_{,UN}ALIGNED_PSI_OP.
698 * doc/tm.texi: Regenerate.
700 2018-11-12 Jason Merrill <jason@redhat.com>
702 * gimplify.c (gimplify_case_label_expr): Handle hot/cold attributes.
704 2018-11-16 Michael Meissner <meissner@linux.ibm.com>
706 * config/rs6000/constraints.md (wF constraint): Remove power9
707 fusion documentation. Just document wF's use for power8 fusion.
708 * config/rs6000/predicates.md (p9_fusion_reg_operand): Delete.
709 (fusion_gpr_addis): Delete power9 fusion support. Change power8
710 fusion support to require the upper 12 bits to be all 0's or all
712 (fusion_gpr_mem_load): Add comment.
713 (fusion_addis_mem_combo_load): Remove power9 fusion support.
714 (fusion_addis_mem_combo_store): Delete.
715 (fusion_offsettable_mem_operand): Delete.
716 * config/rs6000/rs6000-cpus.def (ISA_2_7_MASKS_SERVER): Do not set
718 (ISA_3_0_MASKS_SERVER): Delete power9 fusion.
719 (POWERPC_MASKS): Delete power9 fusion.
720 * config/rs6000/rs6000-protos.h (emit_fusion_load_store): Delete.
721 (fusion_p9_p): Delete.
722 (expand_fusion_p9_load): Delete.
723 (expand_fusion_p9_store): Delete.
724 (emit_fusion_p9_load): Delete.
725 (emit_fusion_p9_store): Delete.
726 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Delete power9
728 (rs6000_option_override_internal): Set power8 fusion based on
729 whether we are tuning for power8. Delete power9 fusion support.
730 (rs6000_opt_masks): Delete -mpower9-fusion switch.
731 (emit_fusion_load): Rename emit_fusion_load_store to
732 emit_fusion_load, and drop fusion store support. Update callers.
733 (emit_fusion_load_store): Likewise.
734 (emit_fusion_gpr_load): Likewise.
735 (fusion_p9_p): Delete.
736 (expand_fusion_p9_load): Delete.
737 (expand_fusion_p9_store): Delete.
738 (emit_fusion_p9_load): Delete.
739 (emit_fusion_p9_store): Delete.
740 * config/rs6000/rs6000.md (UNSPEC_FUSION_P9): Delete.
741 (GPR_FUSION): Delete.
742 (FPR_FUSION): Delete.
743 (power9 fusion peephole2s): Delete.
744 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Delete.
745 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Delete.
746 (fusion_vsx_<P:mode>_<FPR_FUSION:mode>_load): Delete.
747 (fusion_vsx_<P:mode>_<FPR_FUSION:mode>_store): Delete.
748 (fusion_p9_<mode>_constant): Delete.
749 * config/rs6000/rs6000.opt (-mpower9-fusion): Delete undocumented
750 power9 fusion switch.
751 * doc/md.texi (PowerPC constraints): Update wF constraint
752 documentation for power8 fusion only.
754 2018-11-16 Jakub Jelinek <jakub@redhat.com>
756 PR rtl-optimization/87475
757 * cfgrtl.c (patch_jump_insn): Allow redirection failure for
758 CROSSING_JUMP_P insns.
759 (cfg_layout_redirect_edge_and_branch): Don't ICE if ret is NULL.
761 2018-11-16 Uros Bizjak <ubizjak@gmail.com>
764 * config/i386/i386.md (floatunsdidf2): Allow only 64bit AVX512F targets.
765 * config/i386/sse.md (UNSPEC_MOVDI_TO_SSE): New UNSPEC.
766 (movdi_to_sse): Rewrite using UNSPEC_MOVDI_TO_SSE unspec.
768 2018-11-16 Jakub Jelinek <jakub@redhat.com>
771 * optabs.c (expand_binop): For op0_mode use GET_MODE (op0), unless it
772 is VOIDmode, in which case use int_mode. Similarly for op1_mode.
774 2018-11-16 Eric Botcazou <ebotcazou@adacore.com>
776 * tree-switch-conversion.h (switch_decision_tree::emit_case_nodes): Add
777 location_t parameter.
778 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
779 (switch_decision_tree::do_jump_if_equal): Likewise.
780 * tree-switch-conversion.c (switch_decision_tree::emit): Pass location
781 of switch statement to emit_case_nodes.
782 (switch_decision_tree::emit_cmp_and_jump_insns): Add LOC parameter and
783 set it on the newly built GIMPLE comparison statement.
784 (switch_decision_tree::do_jump_if_equal): Likewise.
785 (switch_decision_tree::emit_case_nodes): Add LOC parameter and pass it
786 in calls to do_jump_if_equal as well as recursive calls.
788 2018-11-16 Andi Kleen <ak@linux.intel.com>
790 * config/i386/i386.md: Allow memory operands to ptwrite.
792 2018-11-16 Michael Matz <matz@suse.de>
794 * system.h (PRsa): New macro.
795 (SIZE_AMOUNT): Cast number to uint64_t.
796 * alloc-pool.h (pool_usage::dump): Don't use %zu but PRsa.
797 (pool_usage::dump_footer): Likewise and also use PRIu64.
798 * bitmap.h (bitmap_usage::dump): Likewise.
799 * ggc-common.c (ggc_usage::dump): Likewise.
800 * ggc-page.c (ggc_print_statistics): Likewise.
801 * input.c (dump_line_table_statistics): Likewise.
802 * mem-stats.h (mem_usage::dump): Likewise.
803 (mem_usage::dump_footer): Likewise.
804 * rtl.c (dump_rtx_statistics): Likewise.
805 * tree-cfg.c (dump_cfg_stats): Likewise.
806 * tree-dfa.c (dump_dfa_stats): Likewise.
807 * tree-phinodes.c (phinodes_print_statistics): Likewise.
808 * tree-ssanames (ssanames_print_statistics): Likewise.
809 * vec.c (vec_usage::dump): Likewise.
810 (vec_usage::dump_footer): Likewise.
812 2018-11-16 Richard Biener <rguenther@suse.de>
814 PR tree-optimization/88011
815 * tree-vrp.c (extract_range_from_binary_expr): Fix error in
816 replacing set_value_range_to_undefined and
817 set_value_range_to_varying with method calls.
819 2018-11-16 Ilya Leoshkevich <iii@linux.ibm.com>
821 * config/s390/s390.md
822 (*r<noxa>sbg_<mode>_srl_bitmask): Do not delegate arithmetic to
824 (*r<noxa>sbg_<mode>_sll): Likewise.
825 (*r<noxa>sbg_<mode>_srl): Likewise.
826 (*r<noxa>sbg_sidi_srl): New pattern.
828 2018-11-16 Jerome Lambourg <lambourg@adacore.com>
830 * config/vxworks.h (TARGET_VXWORKS_HAVE_CTORS_DTORS): New macro.
831 Default to TARGET_VXWORKS_RTP.
832 (SUPPORTS_INIT_PRIORITY): Use TARGET_VXWORKS_HAVE_CTORS_DTORS instead
833 of TARGET_VXWORKS_RTP.
834 * config/vxworksae.h: Also define TARGET_VXWORKS_HAVE_CTORS_DTORS.
835 * config/vxworks.c: Use TARGET_VXWORKS_HAVE_CTORS_DTORS instead
836 of TARGET_VXWORKS_RTP to set targetm.have_ctors_dtors.
838 2018-11-15 Sandra Loosemore <sandra@codesourcery.com>
841 * doc/extend.texi (Common Type Attributes): Make it explicit
842 that attribute "packed" can apply to C++ classes.
844 2018-11-15 Martin Sebor <msebor@redhat.com>
848 * tree.c (type_argument_type): New function.
849 * tree.h (type_argument_type): Declare it.
850 * gcc/doc/extend.texi (alloc_align): Update and clarify.
851 (alloc_size, nonnull, sentinel): Same.
853 2018-11-15 Andrew Stubbs <ams@codesourcery.com>
854 Kwok Cheung Yeung <kcy@codesourcery.com>
856 * tree-vect-stmts.c (vectorizable_store): Don't ICE when
857 int_mode_for_size fails.
858 (vectorizable_load): Likewise.
860 2018-11-15 David Malcolm <dmalcolm@redhat.com>
862 * doc/ux.texi (Group logically-related diagnostics): Move
863 discussion of auto_diagnostic_group into this new subsection.
864 Give an example of where this grouping is used.
866 2018-11-15 David Malcolm <dmalcolm@redhat.com>
869 * Makefile.in (OBJS): Move json.o to...
870 (OBJS-libcommon): ...here and add diagnostic-format-json.o.
871 * common.opt (fdiagnostics-format=): New option.
872 (diagnostics_output_format): New enum.
873 * diagnostic-format-json.cc: New file.
874 * diagnostic.c (default_diagnostic_final_cb): New function, taken
875 from start of diagnostic_finish.
876 (diagnostic_initialize): Initialize final_cb to
877 default_diagnostic_final_cb.
878 (diagnostic_finish): Move "being treated as errors" messages to
879 default_diagnostic_final_cb. Call any final_cb.
880 (default_diagnostic_finalizer): Add diagnostic_t param.
881 (diagnostic_report_diagnostic): Pass "orig_diag_kind" to
882 diagnostic_finalizer callback.
883 * diagnostic.h (enum diagnostics_output_format): New enum.
884 (diagnostic_finalizer_fn): Reimplement, adding diagnostic_t param.
885 (struct diagnostic_context): Add "final_cb".
886 (default_diagnostic_finalizer): Add diagnostic_t param.
887 (diagnostic_output_format_init): New decl.
888 * doc/invoke.texi (-fdiagnostics-format): New option.
889 * dwarf2out.c (gen_producer_string): Ignore
890 OPT_fdiagnostics_format_.
891 * gcc.c (driver_handle_option): Handle OPT_fdiagnostics_format_.
892 * lto-wrapper.c (append_diag_options): Ignore it.
893 * opts.c (common_handle_option): Handle it.
895 2018-11-15 David Malcolm <dmalcolm@redhat.com>
897 PR tree-optimization/88015
898 * graphite-isl-ast-to-gimple.c
899 (translate_isl_ast_to_gimple::scop_to_isl_ast): Add missing check
901 * graphite-sese-to-poly.c (build_poly_scop): Likewise.
903 2018-11-15 Richard Biener <rguenther@suse.de>
906 * gimple.c (gimple_call_flags): Union flags from decl, type
908 * trans-mem.c (is_tm_pure_call): Simplify.
910 2018-11-15 Richard Biener <rguenther@suse.de>
912 PR tree-optimization/88031
913 * tree-vect-loop.c (vectorizable_reduction): Move check
914 for multiple types earlier so we get the expected dump.
915 Simplify calls to vectorizable_condition.
916 * tree-vect-stmts.h (vectorizable_condition): Update prototype.
917 * tree-vect-stmts.c (vectorizable_condition): Instead of
918 reduc_def and reduc_index take just a flag. Simplify
919 code-generation now that we can rely on the defs being set up.
920 (vectorizable_comparison): Remove unused argument.
922 2018-11-15 Richard Biener <rguenther@suse.de>
924 PR tree-optimization/88030
925 * tree-complex.c (need_eh_cleanup): New global.
926 (update_complex_assignment): Mark blocks that need EH update.
927 (expand_complex_comparison): Likewise.
928 (tree_lower_complex): Allocate and deallocate need_eh_cleanup,
929 perform EH cleanup and schedule CFG cleanup if that did anything.
931 2018-11-15 Jakub Jelinek <jakub@redhat.com>
933 PR rtl-optimization/88018
934 * cfgrtl.c (fixup_abnormal_edges): Guard moving insns to fallthru edge
935 on the presence of fallthru edge, rather than if it is a USE or not.
937 2018-11-15 Richard Biener <rguenther@suse.de>
940 * tree-data-ref.c (analyze_miv_subscript): Guard calls to
941 analyze_subscript_affine_affine properly.
943 2018-11-15 Xianmiao Qu <xianmiao_qu@c-sky.com>
945 * config/csky/csky-linux-elf.h (LINUX_DYNAMIC_LINKER): Remove.
946 (GLIBC_DYNAMIC_LINKER): Define.
947 (LINUX_TARGET_LINK_SPEC): Update the dynamic linker's name.
949 2018-11-15 Bin Cheng <bin.cheng@linux.alibaba.com>
951 PR tree-optimization/84648
952 * tree-ssa-loop-niter.c (adjust_cond_for_loop_until_wrap): New.
953 (number_of_iterations_cond): Adjust exit cond for loop-until-wrap case
954 by calling adjust_cond_for_loop_until_wrap.
956 2018-11-15 Sandra Loosemore <sandra@codesourcery.com>
959 * doc/extend.texi (Common Function Attributes): Clarify linker
960 restrictions on "aligned" attribute.
961 (Common Variable Attributes): Likewise. Mention that linker
962 restrictions don't apply to stack-allocated variables.
964 2018-11-15 Joern Rennecke <joern.rennecke@riscy-ip.com>
966 * gensupport.c (add_predicate_code): Properly handle ZERO_EXTRACT
969 2018-11-14 Sandra Loosemore <sandra@codesourcery.com>
973 * doc/invoke.texi (Optimize Options): Remove bad example about
974 interaction between -flto and -O. Replace it with a note that
975 you need to compile with -O and not just link. Copy-edit -flto
976 discussion to reduce verbiage and improve flow.
978 2018-11-14 Sandra Loosemore <sandra@codesourcery.com>
981 * doc/invoke.texi (Optimize Options): Clarify that -O0 and -Og
982 also suppress many optimizations. Alphabetize option lists for
983 -O1, -O2, and -Os. Add list of options disabled with -Og, and
984 correct documentation for those options to say that.
985 * opts.c (default_options_table): Sort table by level and option
986 name, to make it easier to correlate to the manual.
988 2018-11-14 Uros Bizjak <ubizjak@gmail.com>
990 * config/i386/i386.c (ix86_print_operand_address_as): Simplify
991 printing of the names of segment registers.
993 2018-11-14 Nathan Sidwell <nathan@acm.org>
997 * dwarf2out.c (dwarf2out_finish): Apply resolve_addr to comdat
1000 2018-11-14 David Malcolm <dmalcolm@redhat.com>
1002 * Makefile.in (CFLAGS-optinfo-emit-json.o): Add $(ZLIBINC).
1004 2018-11-14 Jakub Jelinek <jakub@redhat.com>
1006 P1236R1 - Signed integers are two's complement
1007 * doc/invoke.texi (Wshift-overflow): Adjust documentation for c++2a.
1010 * hash-map.h (hash_map::iterator::reference_pair): New class.
1011 (hash_map::iterator::operator*): Return it rather than std::pair.
1013 2018-11-14 Jeff Law <law@redhat.com>
1015 * optabs.c (expand_binop): Pass INT_MODE to operand_subword_force
1016 iff the operand is a constant.
1018 2018-11-14 Aldy Hernandez <aldyh@redhat.com>
1020 * gimple-ssa-evrp-analyze.c
1021 (evrp_range_analyzer::record_ranges_from_incoming_edge): Rename
1022 ignore_equivs_equal_p to equal_p.
1023 * ipa-cp.c (meet_with_1): Use equal_p instead of
1024 ignore_equivs_equal_p.
1025 * ipa-prop.c (ipa_vr_ggc_hash_traits::equal): Same.
1026 * tree-vrp.c (value_range::ignore_equivs_equal_p): Remove.
1027 (value_range::operator==): Remove.
1028 (value_range::operator!=): Remove.
1029 (vrp_prop::visit_stmt): Use equal_p.
1030 * tree-vrp.h (value_range): Remove operator==, operator!=,
1031 ignore_equivs_equal_p.
1032 * vr-values.c (update_value_range): Use equal_p.
1034 2018-11-14 Michael Matz <matz@suse.de>
1037 * gimplify.c (collect_fallthrough_labels): Add new argument,
1038 return location via that, don't modify statements.
1039 (warn_implicit_fallthrough_r): Adjust call, don't use
1040 statement location directly.
1042 2018-11-14 Richard Biener <rguenther@suse.de>
1045 * tree-data-ref.c (split_constant_offset): Add wrapper
1046 allocating a cache hash-map.
1047 (split_constant_offset_1): Cache results of expanding
1048 expressions from SSA def stmts.
1050 2018-11-14 Richard Biener <rguenther@suse.de>
1053 * tree-data-ref.c (lambda_matrix_row_add): Change const1 argument
1055 (lambda_vector_mult_const): Likewise.
1056 (lambda_matrix_right_hermite): Use lambda_int temporaries.
1058 2018-11-14 Wilco Dijkstra <wdijkstr@arm.com>
1059 Jackson Woodruff <jackson.woodruff@arm.com>
1061 PR 71026/tree-optimization
1062 * match.pd: Simplify floating point comparisons.
1064 2018-11-14 Jakub Jelinek <jakub@redhat.com>
1066 PR rtl-optimization/87817
1067 * config/i386/i386.c (ix86_fold_builtin): For _bzhi_u{32,64} if
1068 last argument has low 8 bits clear, fold to 0.
1070 2018-11-14 Iain Sandoe <iain@sandoe.co.uk>
1072 * tree-vect-data-refs.c (vect_can_force_dr_alignment_p): Cast
1073 MAX_OFILE_ALIGNMENT as needed.
1075 2018-11-14 Richard Biener <rguenther@suse.de>
1077 PR tree-optimization/88019
1078 * graphite-isl-ast-to-gimple.c (ternary_op_to_tree): Rewrite
1079 COND_EXPR arguments to non-trapping overflow.
1081 2018-11-14 Claudiu Zissulescu <claziss@synopsys.com>
1083 * config/arc/arc.h (reg_class): Reorder registers classes, remove
1084 unused register classes.
1085 (REG_CLASS_NAMES): Likewise.
1086 (REG_CLASS_CONTENTS): Likewise.
1087 (FIXED_REGISTERS): Make lp_count fixed.
1088 (BASE_REG_CLASS): Remove ACC16_BASE_REGS reference.
1089 (PROGRAM_COUNTER_REGNO): Remove.
1090 * config/arc/arc.c (arc_conditional_register_usage): Remove unused
1091 register classes, use constants for register numbers, remove
1092 reg_class_contents references.
1093 (arc_process_double_reg_moves): Add asserts.
1094 (arc_secondary_reload): Remove LPCOUNT_REG reference, use
1095 lra_in_progress predicate.
1096 (arc_init_reg_tables): Remove unused register classes.
1097 (arc_register_move_cost): Likewise.
1098 (arc_preferred_reload_class): Likewise.
1099 (hwloop_optimize): Update rtx patterns involving lp_count register.
1100 (arc_return_address_register): Rename ILINK1, INLINK2 regnums macros.
1101 * config/arc/constraints.md ("c"): Choose between GENERAL_REGS and
1102 CHEAP_CORE_REGS. Former one will be used for LRA.
1103 ("Rac"): Choose between GENERAL_REGS and ALL_CORE_REGS. Former
1104 one will be used for LRA.
1105 ("w"): Choose between GENERAL_REGS and WRITABLE_CORE_REGS. Former
1106 one will be used for LRA.
1107 ("W"): Choose between GENERAL_REGS and MPY_WRITABLE_CORE_REGS.
1108 Former one will be used for LRA.
1109 ("f"): Delete constraint.
1112 ("l"): Change it from register constraint to constraint.
1113 * config/arc/arc.md (movqi_insn): Remove unsed lp_count constraints.
1114 (movhi_insn): Likewise.
1115 (movsi_insn): Update pattern.
1118 (stack_tie): Remove 'b' constraint letter.
1120 (R9_REG, R15_REG, R16_REG, R25_REG): Likewise.
1121 (R32_REG, R40_REG, R41_REG, R42_REG, R43_REG, R44_REG): Likewise.
1122 (R57_REG, R59_REG, PCL_REG): Likewise.
1123 (ILINK1_REGNUM): Renamed to ILINK1_REG.
1124 (ILINK2_REGNUM): Renamed to ILINK2_REG.
1126 (SP_REGS): Likewise.
1127 (Rcw): Remove unused reg classes.
1128 * config/arc/predicates.md (dest_reg_operand): Just default on
1129 register_operand predicate.
1130 (mpy_dest_reg_operand): Likewise.
1131 (move_dest_operand): Use macros instead of constants.
1132 * config/arc/arc.opt (mlra): Switch to lra as default.
1134 2018-11-14 Richard Biener <rguenther@suse.de>
1136 PR tree-optimization/87974
1137 * tree-vect-loop.c (vectorizable_reduction): When computing
1138 the vectorized reduction PHI vector type ignore constant
1141 2018-11-14 Jakub Jelinek <jakub@redhat.com>
1143 PR tree-optimization/87977
1144 * tree-ssa-math-opts.c (optimize_recip_sqrt): Don't reuse division
1145 stmt, build a new one and replace the old one with it. Formatting fix.
1146 Call release_ssa_name (x) if !has_other_use and !delete_div.
1147 (pass_cse_reciprocals::execute): Before calling optimize_recip_sqrt
1148 verify lhs of stmt is still def.
1150 2018-11-13 Peter Bergner <bergner@linux.ibm.com>
1152 PR rtl-optimization/87507
1153 * lower-subreg.c (operand_for_swap_move_operator): New function.
1154 (simple_move): Strip simple operators.
1155 (find_pseudo_copy): Likewise.
1156 (resolve_operand_for_swap_move_operator): New function.
1157 (resolve_simple_move): Strip simple operators and swap operands.
1159 2018-11-13 Jakub Jelinek <jakub@redhat.com>
1161 PR tree-optimization/87898
1162 * omp-simd-clone.c (ipa_simd_modify_stmt_ops): Formatting fix.
1163 (ipa_simd_modify_function_body): Remove debug stmts where the first
1164 argument was changed into a non-decl.
1166 2018-11-13 Peter Bergner <bergner@linux.ibm.com>
1168 PR rtl-optimization/87899
1169 * lra-lives.c (start_living): Update white space in comment.
1170 (enum point_type): New.
1171 (sparseset_contains_pseudos_p): New function.
1172 (update_pseudo_point): Likewise.
1173 (make_hard_regno_live): Use HARD_REGISTER_NUM_P macro.
1174 (make_hard_regno_dead): Likewise. Remove ignore_reg_for_conflicts
1175 handling. Move early exit after adding conflicts.
1176 (mark_pseudo_live): Use HARD_REGISTER_NUM_P macro. Add early exit
1177 if regno is already live. Remove all handling of program points.
1178 (mark_pseudo_dead): Use HARD_REGISTER_NUM_P macro. Add early exit
1179 after adding conflicts. Remove all handling of program points and
1180 ignore_reg_for_conflicts.
1181 (mark_regno_live): Use HARD_REGISTER_NUM_P macro. Remove return value
1182 and do not guard call to mark_pseudo_live.
1183 (mark_regno_dead): Use HARD_REGISTER_NUM_P macro. Remove return value
1184 and do not guard call to mark_pseudo_dead.
1185 (check_pseudos_live_through_calls): Use HARD_REGISTER_NUM_P macro.
1186 (process_bb_lives): Use HARD_REGISTER_NUM_P and HARD_REGISTER_P macros.
1187 Use new function update_pseudo_point. Handle register copies by
1188 removing the source register from the live set. Handle INOUT operands.
1189 Update to the next program point using the unused_set, dead_set and
1191 (lra_create_live_ranges_1): Use HARD_REGISTER_NUM_P macro.
1193 2018-11-13 David Malcolm <dmalcolm@redhat.com>
1195 * builtins.c: Replace "source_location" with "location_t".
1196 * diagnostic-show-locus.c: Likewise.
1197 * diagnostic.c: Likewise.
1198 * dumpfile.c: Likewise.
1199 * gcc-rich-location.h: Likewise.
1200 * genmatch.c: Likewise.
1201 * gimple.h: Likewise.
1202 * gimplify.c: Likewise.
1203 * input.c: Likewise.
1204 * input.h: Likewise. Eliminate the typedef.
1205 * omp-expand.c: Likewise.
1206 * selftest.h: Likewise.
1207 * substring-locations.h (get_source_location_for_substring):
1209 (get_location_within_string): ...this.
1210 * tree-cfg.c: Replace "source_location" with "location_t".
1211 * tree-cfgcleanup.c: Likewise.
1212 * tree-diagnostic.c: Likewise.
1213 * tree-into-ssa.c: Likewise.
1214 * tree-outof-ssa.c: Likewise.
1215 * tree-parloops.c: Likewise.
1216 * tree-phinodes.c: Likewise.
1217 * tree-phinodes.h: Likewise.
1218 * tree-ssa-loop-ivopts.c: Likewise.
1219 * tree-ssa-loop-manip.c: Likewise.
1220 * tree-ssa-phiopt.c: Likewise.
1221 * tree-ssa-phiprop.c: Likewise.
1222 * tree-ssa-threadupdate.c: Likewise.
1223 * tree-ssa.c: Likewise.
1224 * tree-ssa.h: Likewise.
1225 * tree-vect-loop-manip.c: Likewise.
1227 2018-11-13 Michael Ploujnikov <michael.ploujnikov@oracle.com>
1229 * doc/extend.texi: Fix typo in the weakref description.
1231 2018-11-13 Richard Biener <rguenther@suse.de>
1233 PR tree-optimization/86991
1234 * tree-vect-loop.c (vect_is_slp_reduction): Delay reduction
1235 group building until we have successfully detected the SLP
1237 (vect_is_simple_reduction): Remove fixup code here.
1239 2018-11-13 David Malcolm <dmalcolm@redhat.com>
1241 * dumpfile.c (VERIFY_DUMP_ENABLED_P): New macro.
1242 (dump_gimple_stmt): Use it.
1243 (dump_gimple_stmt_loc): Likewise.
1244 (dump_gimple_expr): Likewise.
1245 (dump_gimple_expr_loc): Likewise.
1246 (dump_generic_expr): Likewise.
1247 (dump_generic_expr_loc): Likewise.
1248 (dump_printf): Likewise.
1249 (dump_printf_loc): Likewise.
1250 (dump_dec): Likewise.
1251 (dump_dec): Likewise.
1252 (dump_hex): Likewise.
1253 (dump_symtab_node): Likewise.
1254 * gimple-loop-interchange.cc (tree_loop_interchange::interchange):
1255 Guard dump call with dump_enabled_p.
1256 * graphite-isl-ast-to-gimple.c (graphite_regenerate_ast_isl): Likewise.
1257 * graphite-optimize-isl.c (optimize_isl): Likewise.
1258 * graphite.c (graphite_transform_loops): Likewise.
1259 * tree-loop-distribution.c (pass_loop_distribution::execute): Likewise.
1260 * tree-parloops.c (parallelize_loops): Likewise.
1261 * tree-ssa-loop-niter.c (number_of_iterations_exit): Likewise.
1262 * tree-vect-data-refs.c (vect_analyze_group_access_1): Likewise.
1263 (vect_prune_runtime_alias_test_list): Likewise.
1264 * tree-vect-loop.c (vect_update_vf_for_slp): Likewise.
1265 (vect_estimate_min_profitable_iters): Likewise.
1266 * tree-vect-slp.c (vect_record_max_nunits): Likewise.
1267 (vect_build_slp_tree_2): Likewise.
1268 (vect_supported_load_permutation_p): Likewise.
1269 (vect_slp_analyze_operations): Likewise.
1270 (vect_slp_analyze_bb_1): Likewise.
1271 (vect_slp_bb): Likewise.
1272 * tree-vect-stmts.c (vect_analyze_stmt): Likewise.
1273 * tree-vectorizer.c (try_vectorize_loop_1): Likewise.
1274 (pass_slp_vectorize::execute): Likewise.
1275 (increase_alignment): Likewise.
1277 2018-11-13 David Malcolm <dmalcolm@redhat.com>
1280 * ipa-inline.c (report_inline_failed_reason): Guard calls to
1281 cl_target_option_print_diff and cl_optimization_print_diff with
1284 2018-11-13 David Malcolm <dmalcolm@redhat.com>
1286 * doc/invoke.texi (-fsave-optimization-record): Note that the
1287 output is compressed.
1288 * optinfo-emit-json.cc: Include <zlib.h>.
1289 (optrecord_json_writer::write): Compress the output.
1291 2018-11-13 Aldy Hernandez <aldyh@redhat.com>
1293 * tree-vrp.c (value_range_base::dump): Dump type.
1294 Do not use INF nomenclature for 1-bit types.
1295 (dump_value_range): Group all variants to common dumping code.
1296 (debug): New overloaded functions for value_ranges.
1297 (value_range_base::dump): Remove no argument version.
1298 (value_range::dump): Same.
1300 2018-11-13 Richard Biener <rguenther@suse.de>
1302 PR tree-optimization/87931
1303 * tree-vect-loop.c (vect_is_simple_reduction): Restrict
1304 nested cycles we support to latch computations vectorizable_reduction
1307 2018-11-13 Martin Liska <mliska@suse.cz>
1309 PR tree-optimization/87885
1310 * cfghooks.c (account_profile_record): Rename
1312 (profile_record_check_consistency): ... this.
1313 Calculate missing num_mismatched_freq_in.
1314 (profile_record_account_profile): New function
1315 that calculates time and size of a function.
1316 * cfghooks.h (struct profile_record): Remove
1318 (struct cfg_hooks): Remove after_pass flag.
1319 (account_profile_record): Rename to ...
1320 (profile_record_check_consistency): ... this.
1321 (profile_record_account_profile): New.
1322 * cfgrtl.c (rtl_account_profile_record): Remove
1324 * passes.c (check_profile_consistency): Do only
1326 (account_profile): Calculate size and time of
1328 (pass_manager::dump_profile_report): Reformat
1330 (execute_one_ipa_transform_pass): Call
1331 consistency check before clean upand call account_profile
1332 after a clean up is done.
1333 (execute_one_pass): Call check_profile_consistency and
1334 account_profile instead of using after_pass flag..
1335 * tree-cfg.c (gimple_account_profile_record): Likewise.
1337 2018-11-13 Martin Liska <mliska@suse.cz>
1340 * config/i386/i386.c (ix86_option_override_internal): Error
1341 about usage -mabi=ms and -fsanitize={,kernel-}address.
1343 2018-11-13 Andre Vieira <andre.simoesdiasvieira@arm.com>
1345 * config/aarch64/aarch64.c
1346 (aarch64_vectorize_preferred_vector_alignment): Change return type to
1348 (aarch64_simd_vector_alignment_reachable): Adapt to preferred vector
1349 alignment being a poly int.
1350 * doc/tm.texi (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Change
1351 return type to poly_uint64.
1352 * target.def (default_preferred_vector_alignment): Likewise.
1353 * targhooks.c (default_preferred_vector_alignment): Likewise.
1354 * targhooks.h (default_preferred_vector_alignment): Likewise.
1355 * tree-vect-data-refs.c (vect_calculate_target_alignment): Likewise.
1356 (vect_compute_data_ref_alignment): Adapt to vector alignment being a
1358 (vect_update_misalignment_for_peel): Likewise.
1359 (vect_enhance_data_refs_alignment): Likewise.
1360 (vect_find_same_alignment_drs): Likewise.
1361 (vect_duplicate_ssa_name_ptr_info): Likewise.
1362 (vect_setup_realignment): Likewise.
1363 (vect_can_force_dr_alignment_p): Change alignment parameter type to
1365 * tree-vect-loop-manip.c (get_misalign_in_elems): Learn to construct a
1366 mask with a compile time variable vector alignment.
1367 (vect_gen_prolog_loop_niters): Adapt to vector alignment being a poly
1369 (vect_do_peeling): Exit early if vector alignment is not constant.
1370 * tree-vect-stmts.c (ensure_base_align): Adapt to vector alignment being
1372 (vectorizable_store): Likewise.
1373 (vectorizable_load): Likweise.
1374 * tree-vectorizer.h (struct dr_vec_info): Make target_alignment field a
1376 (vect_known_alignment_in_bytes): Adapt to vector alignment being a
1378 (vect_can_force_dr_alignment_p): Change alignment parameter type to
1381 2018-11-13 Richard Biener <rguenther@suse.de>
1383 PR tree-optimization/87962
1384 * tree-vect-loop.c (vect_is_simple_reduction): More reliably
1385 detect outer reduction for disqualifying in-loop uses.
1387 2018-11-13 Richard Biener <rguenther@suse.de>
1389 PR tree-optimization/87967
1390 * tree-vect-loop.c (vect_transform_loop): Also copy PHIs
1391 for constants for the scalar loop.
1393 2018-11-13 Alan Modra <amodra@gmail.com>
1395 * config/rs6000/linux64.h (ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Exclude
1396 integer constants when -mcmodel=medium.
1398 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
1400 * config/arc/arc.h (FUNCTION_PROFILER): Redefine to empty.
1401 * config/arc/elf.h (PROFILE_HOOK): Define.
1402 * config/arc/linux.h (PROFILE_HOOK): Likewise.
1404 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
1406 * config/arc/arc.c (hwloop_optimize): Bailout when detecting a
1407 jump table data in the text section.
1409 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
1411 * config/arc/arc.c (arc_eh_return_address_location): Repurpose it
1412 to fit the eh_return pattern.
1413 * config/arc/arc.md (eh_return): Define.
1414 (VUNSPEC_ARC_EH_RETURN): Likewise.
1415 * config/arc/arc-protos.h (arc_eh_return_address_location): Match
1417 * config/arc/arc.h (EH_RETURN_HANDLER_RTX): Remove it.
1420 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
1422 * common/config/arc/arc-common.c (arc_option_optimization_table):
1423 Millicode optimization is default on for size optimizations.
1424 * config/arc/arc-protos.h (arc_check_multi): New function.
1425 * config/arc/arc.c (RTX_OK_FOR_OFFSET_P): Rearange.
1426 (ENTER_LEAVE_START_REG): Define.
1427 (ENTER_LEAVE_END_REG): Likewise.
1428 (arc_override_options): Disable millicode when long calls option
1430 (arc_frame_info): Change it from int to bool.
1431 (arc_compute_frame_size): Clean up.
1432 (arc_save_restore): Remove.
1433 (frame_save_reg): New function.
1434 (frame_restore_reg): Likewise.
1435 (arc_enter_leave_p): Likewise.
1436 (arc_save_callee_saves): Likewise.
1437 (arc_restore_callee_saves): Likewise.
1438 (arc_save_callee_enter): Likewise.
1439 (arc_restore_callee_leave): Likewise.
1440 (arc_save_callee_milli): Likewise.
1441 (arc_restore_callee_milli): Likewise.
1442 (arc_expand_prologue): Reimplement to emit enter/leave
1444 (arc_expand_epilogue): Likewise.
1445 (arc_check_multi): New function.
1446 * config/arc/arc.md (push_multi_fp): New pattern.
1447 (push_multi_fp_blink): Likewise.
1448 (pop_multi_fp): Likewise.
1449 (pop_multi_fp_blink): Likewise.
1450 (pop_multi_fp_ret): Likewise.
1451 (pop_multi_fp_blink_ret): Likewise.
1452 * config/arc/arc.opt (mmillicode): Update option.
1453 (mcode-density-frame): New option.
1454 * config/arc/predicates.md (push_multi_operand): New predicate.
1455 (pop_multi_operand): Likewise.
1456 * doc/invoke.texi (ARC): Update ARC options information.
1459 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
1461 * config/arc/arc-protos.h (gen_operands_ldd_std): Add.
1462 * config/arc/arc.c (operands_ok_ldd_std): New function.
1463 (mem_ok_for_ldd_std): Likewise.
1464 (gen_operands_ldd_std): Likewise.
1465 * config/arc/arc.md: Add peephole2 rules for std/ldd.
1467 2018-11-13 Eric Botcazou <ebotcazou@adacore.com>
1469 * toplev.c (output_stack_usage): Turn test on flag_stack_usage into
1470 test on stack_usage_file.
1471 (lang_dependent_init): Do not open the .su file if generating LTO.
1473 2018-11-13 Jakub Jelinek <jakub@redhat.com>
1475 PR rtl-optimization/87918
1476 * simplify-rtx.c (simplify_merge_mask): For COMPARISON_P, use
1477 simplify_gen_relational rather than simplify_gen_binary.
1479 2018-11-13 Richard Biener <rguenther@suse.de>
1481 * tree-ssanames.h (set_range_info): Use value_range_base.
1482 (get_range_info): Likewise.
1483 * tree-ssanames.c (set_range_info): Likewise.
1484 (get_range_info): Likewise.
1485 * tree-vrp.c (value_range_base::union_helper): Split
1486 out common parts of value_range[_base]::union_.
1487 (value_range_base::union_): Update.
1488 (value_range::union_): Likewise.
1489 (determine_value_range_1): Use value_range_base.
1490 (determine_value_range): Likewise.
1491 * tree-vrp.h (value_range_base::union_helper): Move ...
1492 (value_range::union_helper): ... from here.
1494 2018-11-13 Alan Modra <amodra@gmail.com>
1496 * config/rs6000/rs6000.c (rs6000_secondary_reload_inner): Negate
1498 (rs6000_secondary_reload_gpr): Don't call find_replacement.
1500 2018-11-13 Sandra Loosemore <sandra@codesourcery.com>
1503 * doc/invoke.texi (Optimize Options): Clarify that the
1504 l1-cache-line-size, l1-cache-size, and l2-cache-size parameters
1505 apply to data cache size.
1507 2018-11-13 Alan Modra <amodra@gmail.com>
1509 * config/rs6000/predicates.md (logical_const_operand),
1510 (logical_operand): Correct comment.
1511 * config/rs6000/rs6000.c (rs6000_emit_prologue): Comment fix.
1513 2018-11-13 Alan Modra <amodra@gmail.com>
1515 * config/rs6000/rs6000.md (addsi3_high): Prefix with '*'.
1517 2018-11-13 Alan Modra <amodra@gmail.com>
1519 * gcc/doc/md.texi (Machine Constraints): Correct rs6000 h constraint
1521 * config/rs6000/rs6000.md (movsi_internal1): Delete MT%0 case
1522 covered by alternative.
1523 (movcc_internal1): Ignore h for register preference.
1524 (mov<mode>_hardfloat64): Likewise.
1525 (mov<mode>_softfloat): Ignore c, l, h for register preference.
1527 2018-11-12 Sandra Loosemore <sandra@codesourcery.com>
1529 PR preprocessor/47823
1530 * doc/cpp.texi (Alternatives to Wrapper #ifndef): Move #pragma once
1533 * doc/extend.texi (Pragmas): Note additional pragmas documented
1536 2018-11-13 Kugan Vivekanandarajah <kuganv@linaro.org>
1540 * tree-scalar-evolution.c (expression_expensive_p): Make
1541 BUILTIN POPCOUNT as expensive when backend does not define it.
1543 2018-11-12 Fredrik Noring <noring@nocrew.org>
1545 * config.gcc: Update with-llsc defaults for MIPS r5900.
1547 2018-11-12 Martin Liska <mliska@suse.cz>
1549 PR gcov-profile/87442
1550 * common.opt: Add -fprofile-filter-files and -fprofile-exclude-files
1552 * doc/invoke.texi: Document them.
1553 * tree-profile.c (parse_profile_filter): New.
1554 (parse_profile_file_filtering): Likewise.
1555 (release_profile_file_filtering): Likewise.
1556 (include_source_file_for_profile): Likewise.
1557 (tree_profiling): Filter source files based on the
1558 newly added options.
1560 2018-11-12 Martin Liska <mliska@suse.cz>
1563 * doc/extend.texi: Add missing values for __builtin_cpu_is and
1564 __builtin_cpu_supports for x86 target.
1566 2018-11-12 Sandra Loosemore <sandra@codesourcery.com>
1569 * doc/rtl.texi (Constants): Clarify that mode of "high" doesn't
1571 (Arithmetic): Likewise for "lo_sum".
1573 2018-11-12 Renlin Li <renlin.li@arm.com>
1576 * dse.c (get_stored_val): Add check for compile-time constantness
1579 2018-11-12 Sudakshina Das <sudi.das@arm.com>
1581 * config/arm/arm-cpus.in (armv8_5, sb, predres): New features.
1582 (ARMv8_5a): New fgroup.
1583 (armv8.5-a): New arch.
1584 (armv8-a, armv8.1-a, armv8.2-a, armv8.3-a, armv8.4-a): New options
1586 * config/arm/arm-tables.opt: Regenerate.
1587 * config/arm/t-aprofile: Add matching rules for -march=armv8.5-a
1588 * config/arm/t-arm-elf (all_v8_archs): Add armv8.5-a.
1589 * config/arm/t-multilib (v8_5_a_simd_variants): New variable.
1590 Add matching rules for -march=armv8.5-a and extensions.
1591 * doc/invoke.texi (ARM options): Document -march=armv8.5-a.
1592 Add sb and predres to all armv8-a except armv8.5-a.
1594 2018-11-12 Richard Biener <rguenther@suse.de>
1596 * tree-vrp.h (value_range[_base]::set): Make public. Provide
1597 overload for single value.
1598 (value_range[_base]::set_nonnull): New.
1599 (value_range[_base]::set_null): Likewise.
1600 (value_range): Document bitmap copying behavior, mark
1601 copy constructor and assignment operator deleted.
1602 (value_range::move): New.
1603 (value_range::set_and_canonicalize): Default bitmap to zero.
1604 (set_value_range_to_nonnull): Remove.
1605 (set_value_range_to_null): Likewise.
1606 (set_value_range): Likewise.
1607 (set_value_range_to_value): Likewise.
1608 (extract_range_from_unary_expr): Work on value_range_base.
1609 (extract_range_from_binary_expr_1): Likewise. Rename to...
1610 (extract_range_from_binary_expr): ... this.
1611 * tree-vrp.c (value_range::update): Clear equiv bitmap
1613 (value_range::move): New, move equiv bitmap.
1614 (value_range_base::set_undefined): Avoid assignment.
1615 (value_range::set_undefined): Likewise.
1616 (value_range_base::set_varying): Likewise.
1617 (value_range::set_varying): Likewise.
1618 (set_value_range): Remove.
1619 (value_range_base::set): New overload for value.
1620 (value_range::set): Likewise.
1621 (set_value_range_to_nonnull): Remove.
1622 (value_range_base::set_nonnull): New.
1623 (value_range::set_nonnull): Likewise.
1624 (set_value_range_to_null): Remove.
1625 (value_range_base::set_null): New.
1626 (value_range::set_null): Likewise.
1627 (range_is_null): Work on value_range_base.
1628 (range_is_nonnull): Likewise.
1629 (ranges_from_anti_range): Likewise.
1630 (extract_range_into_wide_ints): Likewise.
1631 (extract_range_from_multiplicative_op): Likewise.
1632 (extract_range_from_binary_expr): Likewise. Update for API changes.
1633 (extract_range_from_unary_expr): Likewise. Remove OBJ_TYPE_REF
1635 (value_range::intersect_helper): Avoid copy and assignment.
1636 (value_range::union_helper): Likewise.
1637 (determine_value_range_1): Adjust.
1638 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::try_find_new_range):
1639 Avoid assignment by using move.
1640 (evrp_range_analyzer::record_ranges_from_stmt): Avoid assignment.
1641 * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
1643 * tree-ssanames.c (get_range_info): Likewise.
1644 * vr-values.h (vr_values::get_vr_for_comparison): Adjust API.
1645 * vr-values.c (vr_values::get_value_range): Adjust.
1646 (vr_values::update_value_range): Likewise.
1647 (symbolic_range_based_on_p): Work on value_range_base.
1648 (vr_values::extract_range_from_binary_expr): Use value_range_base.
1649 (vr_values::extract_range_from_unary_expr): Likewise.
1650 (vr_values::extract_range_from_cond_expr): Avoid assignment.
1651 (vr_values::extract_range_from_comparison): Adjust.
1652 (vr_values::check_for_binary_op_overflow): Use value_range_base.
1653 (vr_values::extract_range_basic): Adjust.
1654 (vr_values::adjust_range_with_scev): Likewise.
1655 (vr_values::vrp_visit_assignment_or_call): Likewise.
1656 (vr_values::get_vr_for_comparison): Change API to avoid
1657 assignment and copy construction.
1658 (vr_values::compare_name_with_value): Adjust accordingly.
1659 (vr_values::compare_names): Likewise.
1660 (vr_values::extract_range_from_phi_node): Avoid assignment and
1661 bogus in-place modify of equiv bitmap.
1662 (vr_values::simplify_bit_ops_using_ranges): Use value_range_base.
1663 * ipa-prop.c (ipa_compute_jump_functions_for_edge): Adjust
1664 for extract_range_from_unary_expr API change.
1665 * ipa-cp.c (ipa_vr_operation_and_type_effects): Likewise.
1667 2018-11-12 Eric Botcazou <ebotcazou@adacore.com>
1669 * config/mcore/mcore.h (WORD_REGISTER_OPERATIONS): Remove duplicate.
1671 2018-11-12 Richard Biener <rguenther@suse.de>
1673 * tree-vrp.h (value_range_base::symbolic_p,
1674 value_range_base::constant_p, value_range_base::zero_p,
1675 value_range_base::singleton_p): Move from value_range.
1676 (value_range::dump): Add.
1677 * gimple-ssa-evrp-analyze.c
1678 (evrp_range_analyzer::record_ranges_from_phis): Use set_varying.
1679 * ipa-cp.c (ipcp_vr_lattice::print): Use dump_value_range.
1680 * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
1682 * tree-vrp.c (value_range::symbolic_p): Move to value_range_base.
1683 (value_range::constant_p): Likewise.
1684 (value_range::singleton_p): Likewise.
1685 (value_range_base::dump): Add.
1686 (set_value_range_to_undefined): Remove.
1687 (set_value_range_to_varying): Likewise.
1688 (range_int_cst_p): Take value_range_base argument.
1689 (range_int_cst_singleton_p): Likewise.
1690 (value_range_constant_singleton): Likewise.
1691 (vrp_set_zero_nonzero_bits): Likewise.
1692 (extract_range_from_multiplicative_op): Use set_varying.
1693 (extract_range_from_binary_expr_1): Likewise. Use set_undefined.
1694 (extract_range_from_unary_expr): Likewise.
1695 (dump_value_range_base): Change to overload of dump_value_range.
1696 (vrp_prop::vrp_initialize): Use set_varying and set_undefined.
1697 (vrp_prop::visit_stmt): Likewise.
1698 (value_range::intersect_helper): Likewise.
1699 (value_range::union_helper): Likewise.
1700 (determine_value_range_1): Likewise.
1702 2018-11-12 Richard Biener <rguenther@suse.de>
1704 * tree-vrp.c (set_value_range_to_nonnull): Clear equiv.
1705 (set_value_range_to_null): Likewise.
1706 * vr-values.c (vr_values::extract_range_from_comparison):
1707 Clear equiv for constant singleton ranges.
1709 2018-11-12 Wei Xiao <wei3.xiao@intel.com>
1711 * config/i386/sse.md: Combine VFIXUPIMM* patterns
1712 (<avx512>_fixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
1713 (<avx512>_fixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
1714 (<avx512>_fixupimm<mode>_mask<round_saeonly_name>): Remove.
1715 (avx512f_sfixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
1716 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
1717 (avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Remove.
1719 2018-11-11 Sandra Loosemore <sandra@codesourcery.com>
1722 * doc/extend.texi (Common Type Attributes): For the align type
1723 attribute, copy language about decreasing alignment from the
1724 corresponding variable attribute.
1726 2018-11-11 Xianmiao Qu <xianmiao_qu@c-sky.com>
1728 * config/csky/csky.md (*fpuv2_nmulsf3_1, *fpuv2_nmuldf3_1): Handle
1731 2018-11-11 Sandra Loosemore <sandra@codesourcery.com>
1734 * doc/invoke.texi (C++ Dialect Options): Add warning about mixing
1735 -frtti and -fno-rtti code.
1737 2018-11-11 Sandra Loosemore <sandra@codesourcery.com>
1740 * doc/extend.texi (Other Builtins): Document probability associated
1741 with __builtin_expect.
1743 2018-11-11 Uros Bizjak <ubizjak@gmail.com>
1746 * config/i386/i386.h (STACK_BOUNDARY): Use TARGET_64BIT_MS_ABI
1747 instead of (TARGET_64BIT && ix86_abi == MS_ABI).
1748 * config/i386/darwin.h (STACK_BOUNDARY): Ditto.
1749 * config/i386/cygming.h (STACK_BOUNDARY): Remove.
1751 2018-11-11 Xianmiao Qu <xianmiao_qu@c-sky.com>
1753 * config/csky/csky-linux-elf.h (CC1_SPEC): Support -profile.
1755 2018-11-11 Xianmiao Qu <xianmiao_qu@c-sky.com>
1757 * config/csky/csky.h (ASM_PREFERRED_EH_DATA_FORMAT): Define.
1759 2018-11-11 Richard Biener <rguenther@suse.de>
1761 * tree-vrp.h (class value_range_base): New base class for
1762 value_range containing all but the m_equiv member.
1763 (dump_value_range_base): Add.
1764 (range_includes_zero_p): Work on value_range_base.
1765 * tree-vrp.c (value_range_base::set): Split out base handling
1767 (value_range::set): this.
1768 (value_range::set_equiv): New.
1769 (value_range_base::value_range_base): New constructors.
1770 (value_range_base::check): Split out base handling from...
1771 (value_range::check): this.
1772 (value_range::equal_p): Refactor in terms of
1773 ignore_equivs_equal_p which is now member of the base.
1774 (value_range_base::set_undefined): New.
1775 (value_range_base::set_varying): Likewise.
1776 (value_range_base::dump):Split out base handling from...
1777 (value_range::dump): this.
1778 (value_range_base::set_and_canonicalize): Split out base handling
1780 (value_range::set_and_canonicalize): this.
1781 (value_range_base::union_): New.
1782 * ipa-prop.h (struct ipa_jump_func): Use value_range_base *
1784 * ipa-cp.c (class ipcp_vr_lattice): Use value_range_base
1785 instead of value_range everywhere.
1786 (ipcp_vr_lattice::print): Use dump_value_range_base.
1787 (ipcp_vr_lattice::meet_with): Adjust.
1788 (ipcp_vr_lattice::meet_with_1): Likewise.
1789 (ipa_vr_operation_and_type_effects): Likewise.
1790 (propagate_vr_across_jump_function): Likewise.
1791 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Likewise.
1792 (ipa_get_value_range): Likewise.
1793 (ipa_set_jfunc_vr): Likewise.
1794 (ipa_compute_jump_functions_for_edge): Likewise.
1796 2018-11-10 Sandra Loosemore <sandra@codesourcery.com>
1799 * doc/invoke.texi (Optimize Options): Add @opindex entries
1800 for the positive forms of -fno-xxx and -mno-xxx options
1801 that were lacking them.
1803 2018-11-10 Segher Boessenkool <segher@kernel.crashing.org>
1805 * combine.c (make_more_copies): Only make an intermediate copy if the
1806 dest of a move is a pseudo.
1808 2018-11-09 Maya Rashish <coypu@sdf.org>
1811 * config/netbsd-elf.h (NETBSD_STARTFILE_SPEC): Use crtbeginS.o for PIE.
1812 (NETBSD_ENDFILE_SPEC): Use crtendS.o for PIE.
1814 2018-11-09 Sandra Loosemore <sandra@codesourcery.com>
1818 * doc/invoke.texi (Optimize Options): Clarify default behavior
1819 for -fno-toplevel-reorder, -fno-defer-pop, and -fno-branch-count-reg.
1821 2018-11-09 Bernd Edlinger <bernd.edlinger@hotmail.de>
1823 PR tree-optimization/87940
1824 * expr.c (string_constant): Don't strip NOPS in subexpressions.
1825 Fold PLUS_EXPR correctly.
1827 2018-11-09 Ilya Leoshkevich <iii@linux.ibm.com>
1830 * config/s390/s390.c (s390_safe_relative_long_p): New function.
1831 (annotate_constant_pool_refs): Skip insns which support
1832 relative addressing.
1833 (annotate_constant_pool_refs_1): New helper function.
1834 (find_constant_pool_ref): Skip insns which support relative
1836 (find_constant_pool_ref_1): New helper function.
1837 (replace_constant_pool_ref): Skip insns which support
1838 relative addressing.
1839 (replace_constant_pool_ref_1): New helper function.
1840 (s390_mainpool_start): Adapt to the new signature.
1841 (s390_mainpool_finish): Likewise.
1842 (s390_chunkify_start): Likewise.
1843 (s390_chunkify_finish): Likewise.
1844 (pass_s390_early_mach::execute): Likewise.
1845 (s390_prologue_plus_offset): Likewise.
1846 (s390_emit_prologue): Likewise.
1847 (s390_emit_epilogue): Likewise.
1849 2018-11-09 Jakub Jelinek <jakub@redhat.com>
1851 * gimplify.c (gimplify_scan_omp_clauses): Call sorry_at for valid
1852 but unsupported lastprivate with conditional modifier.
1854 2018-11-09 Jeff Law <law@redhat.com>
1856 * config/mips/mips.c (mips_loongson_ext2_prefetch_cookie): Handle
1857 unused argument better. Add gcc_unreachable to silence warning.
1859 2018-11-09 Martin Sebor <msebor@redhat.com>
1862 * attribs.c (has_attribute): New helper function.
1863 (decls_mismatched_attributes, maybe_diag_alias_attributes): Same.
1864 * attribs.h (decls_mismatched_attributes): Declare.
1865 * cgraphunit.c (handle_alias_pairs): Call maybe_diag_alias_attributes.
1866 (maybe_diag_incompatible_alias): Use OPT_Wattribute_alias_.
1867 * common.opt (-Wattribute-alias): Take an argument.
1868 (-Wno-attribute-alias): New option.
1869 * doc/extend.texi (Common Function Attributes): Document copy.
1870 (Common Variable Attributes): Same.
1871 * doc/invoke.texi (-Wmissing-attributes): Document enhancement.
1872 (-Wattribute-alias): Document new option argument.
1874 2018-11-09 Richard Earnshaw <rearnsha@arm.com>
1876 * config/arm/parsecpu.awk (/alias/): Tighten invisible alias
1877 matching criteria. Remove unused array initializer.
1879 2018-11-09 Bill Schmidt <wschmidt@linux.ibm.com>
1880 Jinsong Ji <jji@us.ibm.com>
1882 * config/rs6000/xmmintrin.h (_mm_cvtss_si32): Fix incorrect
1883 constraints by introducing a new temporary.
1884 (_mm_cvtss_si64): Likewise.
1886 2018-11-09 Martin Liska <mliska@suse.cz>
1888 * common.opt: Add -fipa-stack-alignment flag.
1889 * doc/invoke.texi: Document it.
1890 * final.c (rest_of_clean_state): Guard stack
1891 shrinking with flag.
1893 2018-11-09 Martin Liska <mliska@suse.cz>
1895 * cgraph.h (ipa_discover_readonly_nonaddressable_vars): Rename
1897 (ipa_discover_variable_flags): ... this.
1898 * common.opt: Come up with new flag -fipa-reference-addressable.
1899 * doc/invoke.texi: Document it.
1900 * ipa-reference.c (propagate): Call the renamed fn.
1901 * ipa-visibility.c (whole_program_function_and_variable_visibility):
1903 * ipa.c (ipa_discover_readonly_nonaddressable_vars): Renamed to
1905 (ipa_discover_variable_flags): ... this. Discover
1906 non-addressable variables only with the newly added flag.
1907 * opts.c: Enable the newly added flag with -O1 and higher
1910 2018-11-09 David Malcolm <dmalcolm@redhat.com>
1912 * json.cc (selftest::test_writing_literals): Fix comment.
1914 2018-11-09 Martin Liska <mliska@suse.cz>
1916 * config/aarch64/aarch64.c (aarch64_parse_arch): Do not copy
1917 string to a stack buffer.
1918 (aarch64_parse_cpu): Likewise.
1919 (aarch64_parse_tune): Likewise.
1921 2018-11-09 Richard Biener <rguenther@suse.de>
1923 PR tree-optimization/87953
1924 * tree-vect-loop.c (vectorizable_reduction): For analysis
1925 always pass ops[0] to vectorizable_condition.
1927 2018-11-09 Stafford Horne <shorne@gmail.com>
1928 Richard Henderson <rth@twiddle.net>
1929 Joel Sherrill <joel@rtems.org>
1931 * common/config/or1k/or1k-common.c: New file.
1932 * config/or1k/*: New.
1933 * config.gcc (or1k*-*-*): New.
1934 * configure.ac (or1k*-*-*): New test for openrisc tls.
1935 * configure: Regenerated.
1936 * doc/install.texi: Document OpenRISC triplets.
1937 * doc/invoke.texi: Document OpenRISC arguments.
1938 * doc/md.texi: Document OpenRISC.
1940 2018-11-09 Richard Earnshaw <rearnsha@arm.com>
1942 * config/arm/arm-cpus.in (arm7tdmi): Add an alias for arm7tdmi-s.
1943 (arm7tdmi-s): Delete CPU.
1944 (arm710t): Add aliases for arm720t and arm740t.
1945 (arm720t, arm740t): Delete CPUs.
1946 (arm920t): Add aliases for arm920, arm922t and arm940t.
1947 (arm920, arm922t, arm940t): Delete CPUs.
1948 (arm10tdmi): Add alias for arm1020t.
1949 (arm1020t): Delete CPU.
1950 (arm9e): Add aliases for arm946e-s, arm966e-s and arm968e-s.
1951 (arm946e-s, arm966e-s, arm968e-s): Delete CPUs.
1952 (arm10e): Add aliases for arm1020e and arm1022e.
1953 (arm1020e, arm1022e): Delete CPU.
1954 * config/arm/arm.md (generic_sched): Remove entries that are now
1956 (generic_vfp): Likewise.
1957 * config/arm/arm1020e.md: Simplify tuning selection based on alias
1959 * config/arm/arm-tune.md: Regenerated.
1960 * config/arm/arm-tables.opt: Regenerated.
1962 2018-11-09 Richard Biener <rguenther@suse.de>
1964 PR tree-optimization/87621
1965 * tree-vect-loop.c (vectorizable_reduction): Handle reduction
1966 op with only phi inputs.
1967 * tree-ssa-loop-ch.c: Include tree-ssa-sccvn.h.
1968 (ch_base::copy_headers): Run CSE on copied loop headers.
1969 (pass_ch_vect::process_loop_p): Simplify.
1971 2018-11-09 Alexandre Oliva <oliva@adacore.com>
1973 * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Adjust
1974 for non-w64 x86_64 biarch.
1976 2018-11-09 Alexandre Oliva <aoliva@redhat.com>
1978 PR rtl-optimization/86438
1979 * compare-elim.c (try_eliminate_compare): Use SET_SRC instead
1980 of in_b for the compare if in_b is SET_DEST.
1983 * config/i386/i386.c (ix86_const_not_ok_for_debug_p): Reject
1984 non-toplevel UNSPEC.
1986 2018-11-08 Aldy Hernandez <aldyh@redhat.com>
1988 * tree-vrp.c (value_range::check): Do not access internals
1990 (value_range::singleton_p): Same.
1991 (value_range::type): Same.
1992 (vrp_finalize): Use value_range API.
1994 2018-11-08 Aldy Hernandez <aldyh@redhat.com>
1996 * tree-vrp.c (may_contain_p): Do not access m_min/m_max directly.
1998 2018-11-08 Aldy Hernandez <aldyh@redhat.com>
2000 * vr-values.c (vr_values::get_value_range): Use value_range API
2001 instead of piecing together ranges.
2002 (vr_values::update_value_range): Same.
2004 2018-11-08 Aldy Hernandez <aldyh@redhat.com>
2006 * gimple-fold.c (size_must_be_zero_p): Use value_range API instead
2007 of performing ad-hoc calculations.
2008 * tree-ssanames.c (set_range_info): New overloaded function
2009 accepting value_range &.
2010 (get_range_info): Same.
2011 * tree-ssanames.h (set_range_info_raw): Remove.
2012 (set_range_info): New prototype.
2013 (get_range_info): Same.
2014 * tree-vrp.h (value_range::null_p): Rename to zero_p.
2015 * tree-vrp.c (value_range::null_p): Same.
2017 2018-11-09 Jan Hubicka <jh@suse.cz>
2019 * tree.c (fld_type_variant_equal_p): Test user align flag.
2020 (flt_type_variant): Copy user align flag.
2021 (fld_incomplete_type_of): Clear it.
2023 2018-11-09 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2025 * config/arm/neon.md (div<mode>3): New pattern.
2027 2018-11-08 Andi Kleen <ak@linux.intel.com>
2029 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PTWRITE_SET): New.
2030 (OPTION_MASK_ISA_PTWRITE_UNSET): New.
2031 (ix86_handle_option): Handle OPT_mptwrite.
2032 * config/i386/cpuid.h (bit_PTWRITE): Add.
2033 * config/i386/driver-i386.c (host_detect_local_cpu): Detect ptwrite.
2034 * config/i386/i386-builtin.def (BDESC): Add ptwrite32/64.
2035 * config/i386/i386-c.c (ix86_target_macros_internal): Define __PTWRITE__.
2036 * config/i386/i386.c (ix86_target_string): Handle ptwrite.
2037 (ix86_option_override_internal): Handle PTA_PTWRITE.
2038 (ix86_valid_target_attribute_inner_p): Define ptwrite.
2039 (def_builtin2): Force UINT64 to be 64bit only.
2040 * config/i386/i386.h (TARGET_PTWRITE): Add.
2041 (TARGET_PTWRITE_P): Add.
2043 * config/i386/i386.md: Define ptwrite.
2044 * config/i386/i386.opt: Add -mptwrite.
2045 * config/i386/immintrin.h (_ptwrite64): Add.
2047 * doc/extend.texi: Document __builtin_ia32_ptwrite*.
2048 * doc/invoke.texi: Document -mptwrite.
2050 2018-11-08 Peter Bergner <bergner@linux.ibm.com>
2052 PR rtl-optimization/87600
2053 * cfgexpand.c (expand_asm_stmt): Catch illegal asm constraint usage.
2054 * lra-constraints.c (process_alt_operands): Skip illegal hard
2055 register usage. Prefer reloading non hard register operands.
2057 2018-11-08 Sandra Loosemore <sandra@codesourcery.com>
2060 * doc/invoke.texi (Optimize Options): Clarify default behavior
2061 for -fno-sched-interblock and -fno-sched-spec.
2063 2018-11-08 Roman Geissler <roman.geissler@amadeus.com>
2065 * collect2.c (linker_select): Add USE_LLD_LD.
2066 (ld_suffixes): Add ld.lld.
2067 (main): Handle -fuse-ld=lld.
2068 * common.opt (-fuse-ld=lld): New option.
2069 * doc/invoke.texi (-fuse-ld=lld): Document.
2070 * opts.c (common_handle_option): Handle OPT_fuse_ld_lld.
2072 2018-11-08 Paul Koning <ni1d@arrl.net>
2074 * config/pdp11/constraints.md: Add "Z" series constraints for use
2075 with pre-dec and post-inc addressing.
2076 * config/pdp11/pdp11-protos.m (expand_block_move): Delete.
2077 (pdp11_expand_operands): Add int argument (word count).
2078 (pdp11_sp_frame_offset): Delete.
2079 (pdp11_cmp_length): New function.
2080 (pushpop_regeq): New function.
2081 * config/pdp11/pdp11.c (TARGET_STACK_PROTECT_RUNTIME_ENABLED_P):
2083 (pdp11_expand_prologue, pdp11_expand_epilogue): Rewrite for new
2085 (pdp11_initial_elimination_offset): Ditto.
2086 (pdp11_expand_operands): Add word count argument. Bugfixes.
2087 (output_move_multiple): Change how pointer adjustment is done.
2088 (pdp11_gen_int_label): Correct format.
2089 (output_ascii): Ditto.
2090 (pdp11_asm_output_var): Add code for DEC assembler case.
2091 (pdp11_asm_print_operand): Bugfix for CONST_DOUBLE holding integer
2093 (legitimate_const_double_p): Ditto.
2094 (pdp11_register_move_cost): Adjust for new register classes.
2095 (pdp11_regno_reg_class): Ditto.
2096 (expand_block_move): Delete.
2097 (pushpop_regeq): New function.
2098 (pdp11_legitimate_address_p): Bugfix in check for constant
2100 (pdp11_sp_frame_offset): Delete.
2101 (pdp11_reg_save_size): New helper function for new frame layout.
2102 (output_addr_const_pdp11): Remove CONST_DOUBLE case.
2103 (pdp11_expand_shift): Bugfix in check for constant shift count.
2104 (pdp11_shift_length): Ditto.
2105 (pdp11_assemble_shift): Copy input to pdp11_expand_operands.
2106 (pdp11_cmp_length): New function.
2107 * config/pdp11/pdp11.h (TARGET_CPU_CPP_BUILTINS): Add macros for
2108 some compile options.
2109 (FIXED_REGISTERS): Remove HARD_FRAME_POINTER_REGNUM.
2110 (CALL_USED_REGISTERS): Ditto.
2111 (ELIMINABLE_REGS): Ditto.
2112 (REGISTER_NAMES): Ditto.
2113 (reg_class): Add classes NOTR0_REG through NOTSP_REG for use by Z
2115 (REG_CLASS_NAMES): Ditto.
2116 (REG_CLASS_CONTENTS): Ditto. Also remove
2117 HARD_FRAME_POINTER_REGNUM.
2118 (CPU_REG_CLASS): New macro.
2119 (CLASS_MAX_NREGS): Adjust for new register classes.
2120 (FUNCTION_PROFILER): Make no-op.
2121 (may_call_alloca): Remove unused declaration.
2122 (ASM_OUTPUT_ALIGN): Add workaround for PR87795.
2123 (ASM_OUTPUT_SKIP): Fix format.
2124 * config/pdp11/pdp11.md (unspecv): Add UNSPECV_MOVMEM.
2125 (HARD_FRAME_POINTER_REGNUM): Remove.
2127 (*rts): Rename. Remove epilogue related checks.
2128 (cmpsi, cmpdi): New insn.
2129 (cbranch<mode>4): Change to apply to SI and DI modes as well.
2130 (mov<mode>): Change constraints to enforce that push/pop
2131 destination cannot use the same register as source.
2132 (*mov<mode><cc_cc>): Ditto.
2133 (movmemhi, movmemhi1, movmemhi_nocc): Change to expand block move
2134 at assembly output rather than as RTL expander.
2135 (zero_extendqihi2): Bugfix in check for same registers.
2136 (adddi3_nocc): Bugfix in check for constant operand.
2137 (addsi3_nocc): Ditto.
2138 (subdi3_nocc): Ditto.
2139 (subsi3_nocc): Ditto.
2140 (negdi2_nocc): Copy input to pdp11_expand_operands.
2141 (negsi2_nocc): Ditto.
2142 (bswap2_nocc): Ditto.
2143 * config/pdp11/pdp11.opt (mlra): Fix documentation.
2144 * config/pdp11/t-pdp11: Use -Os.
2146 2018-11-08 Richard Earnshaw <rearnsha@arm.com>
2148 * config/arm/parsecpu.awk (/alias/): New parsing rule.
2149 (/begin cpu/): Check that the cpu name hasn't been previously defined.
2150 (gen_comm_data): Print out CPU alias tables.
2151 (check_cpu): Match aliases when checking the CPU name.
2152 * config/arm/arm-protos.h (cpu_alias): New structure.
2153 (cpu_option): Add entry for aliases.
2154 * config/arm/arm-cpus.in (strongarm): Add aliases for strongarm110
2155 strongarm1100 and strongarm1110.
2156 (strongarm110, strongarm1100, strongarm1110): Delete CPU entries.
2157 (config/arm/arm-generic.md): Remove redundant references to
2158 strongarm110, strongarm1100 and strongarm1110.
2159 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
2160 Scan aliases for additional hints.
2161 (arm_parse_cpu_option_name): Also match a cpu name against the list
2163 * config/arm/arm-tables.opt: Regenerated.
2164 * config/arm/arm-tune.md: Regenerated.
2166 2018-11-08 Jakub Jelinek <jakub@redhat.com>
2168 * builtin-types.def (BT_FN_VOID_BOOL, BT_FN_VOID_SIZE_SIZE_PTR,
2169 BT_FN_UINT_UINT_PTR_PTR, BT_FN_UINT_OMPFN_PTR_UINT_UINT,
2170 BT_FN_BOOL_UINT_LONGPTR_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
2171 BT_FN_BOOL_UINT_ULLPTR_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR,
2172 BT_FN_BOOL_LONG_LONG_LONG_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
2173 BT_FN_BOOL_BOOL_ULL_ULL_ULL_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR): New.
2174 * gengtype.c (open_base_files): Add omp-general.h.
2175 * gimple.c (gimple_build_omp_critical):
2176 (gimple_build_omp_taskgroup): Add CLAUSES argument. Call
2177 gimple_omp_taskgroup_set_clauses.
2178 (gimple_build_omp_atomic_load): Add mo argument, call
2179 gimple_omp_atomic_set_memory_order.
2180 (gimple_build_omp_atomic_store): Likewise.
2181 (gimple_copy): Adjust handling of GIMPLE_OMP_TASKGROUP.
2182 * gimple.def (GIMPLE_OMP_TASKGROUP): Use GSS_OMP_SINGLE_LAYOUT
2184 (GIMPLE_OMP_TEAMS): Use GSS_OMP_PARALLEL_LAYOUT instead
2185 of GSS_OMP_SINGLE_LAYOUT, adjust comments.
2186 * gimple.h (enum gf_mask): Add GF_OMP_TEAMS_HOST, GF_OMP_TASK_TASKWAIT
2187 and GF_OMP_ATOMIC_MEMORY_ORDER. Remove GF_OMP_ATOMIC_SEQ_CST, use
2188 different value for GF_OMP_ATOMIC_NEED_VALUE.
2189 (struct gimple_statement_omp_taskreg): Add GIMPLE_OMP_TEAMS to
2191 (struct gimple_statement_omp_single_layout): And remove here.
2192 (struct gomp_teams): Inherit from gimple_statement_omp_taskreg rather
2193 than gimple_statement_omp_single_layout.
2194 (is_a_helper <gimple_statement_omp_taskreg *>::test): Allow
2196 (is_a_helper <const gimple_statement_omp_taskreg *>::test): Likewise.
2197 (gimple_omp_subcode): Formatting fix.
2198 (gimple_omp_teams_child_fn, gimple_omp_teams_child_fn_ptr,
2199 gimple_omp_teams_set_child_fn, gimple_omp_teams_data_arg,
2200 gimple_omp_teams_data_arg_ptr, gimple_omp_teams_set_data_arg,
2201 gimple_omp_teams_host, gimple_omp_teams_set_host,
2202 gimple_omp_task_taskwait_p, gimple_omp_task_set_taskwait_p,
2203 gimple_omp_taskgroup_clauses, gimple_omp_taskgroup_clauses_ptr,
2204 gimple_omp_taskgroup_set_clauses): New inline functions.
2205 (gimple_build_omp_atomic_load): Add enum omp_memory_order argument.
2206 (gimple_build_omp_atomic_store): Likewise.
2207 (gimple_omp_atomic_seq_cst_p): Remove.
2208 (gimple_omp_atomic_memory_order): New function.
2209 (gimple_omp_atomic_set_seq_cst): Remove.
2210 (gimple_omp_atomic_set_memory_order): New function.
2211 (gimple_build_omp_taskgroup): Add clauses argument.
2212 * gimple-pretty-print.c (dump_gimple_omp_taskgroup): New function.
2213 (dump_gimple_omp_task): Print taskwait with depend clauses.
2214 (dump_gimple_omp_atomic_load, dump_gimple_omp_atomic_store): Use
2215 dump_omp_atomic_memory_order.
2216 (pp_gimple_stmt_1): Handle GIMPLE_OMP_TASKGROUP.
2217 * gimplify.c (enum gimplify_omp_var_data): Add GOVD_MAP_ALLOC_ONLY,
2218 GOVD_MAP_FROM_ONLY and GOVD_NONTEMPORAL.
2219 (enum omp_region_type): Reserve bits 1 and 2 for auxiliary flags,
2220 renumber values of most of ORT_* enumerators, add ORT_HOST_TEAMS,
2221 ORT_COMBINED_HOST_TEAMS, ORT_TASKGROUP, ORT_TASKLOOP and
2222 ORT_UNTIED_TASKLOOP enumerators.
2223 (enum gimplify_defaultmap_kind): New.
2224 (struct gimplify_omp_ctx): Remove target_map_scalars_firstprivate and
2225 target_map_pointers_as_0len_arrays members, add defaultmap.
2226 (new_omp_context): Initialize defaultmap member.
2227 (gimple_add_tmp_var): Handle ORT_TASKGROUP like ORT_WORKSHARE.
2228 (maybe_fold_stmt): Don't fold even in host teams regions.
2229 (omp_firstprivatize_variable): Handle ORT_TASKGROUP like
2230 ORT_WORKSHARE. Test ctx->defaultmap[GDMK_SCALAR] instead of
2231 ctx->omp_firstprivatize_variable.
2232 (omp_add_variable): Don't add private/firstprivate for VLAs in
2234 (omp_default_clause): Print "taskloop" rather than "task" if
2236 (omp_notice_variable): Handle ORT_TASKGROUP like ORT_WORKSHARE.
2237 Handle new defaultmap clause kinds.
2238 (omp_is_private): Handle ORT_TASKGROUP like ORT_WORKSHARE. Allow simd
2239 iterator to be lastprivate or private. Fix up diagnostics if linear
2240 is used on collapse>1 simd iterator.
2241 (omp_check_private): Handle ORT_TASKGROUP like ORT_WORKSHARE.
2242 (gimplify_omp_depend): New function.
2243 (gimplify_scan_omp_clauses): Add shared clause on parallel for
2244 combined parallel master taskloop{, simd} if taskloop has
2245 firstprivate, lastprivate or reduction clause. Handle
2246 OMP_CLAUSE_REDUCTION_TASK diagnostics. Adjust tests for
2247 ORT_COMBINED_TEAMS. Gimplify depend clauses with iterators. Handle
2248 cancel and simd OMP_CLAUSE_IF_MODIFIERs. Handle
2249 OMP_CLAUSE_NONTEMPORAL. Handle new defaultmap clause kinds. Handle
2250 OMP_CLAUSE_{TASK,IN}_REDUCTION. Diagnose invalid conditional
2252 (gimplify_adjust_omp_clauses_1): Ignore GOVD_NONTEMPORAL. Handle
2253 GOVD_MAP_ALLOC_ONLY and GOVD_MAP_FROM_ONLY.
2254 (gimplify_adjust_omp_clauses): Handle OMP_CLAUSE_NONTEMPORAL. Handle
2255 OMP_CLAUSE_{TASK,IN}_REDUCTION.
2256 (gimplify_omp_task): Handle taskwait with depend clauses.
2257 (gimplify_omp_for): Add shared clause on parallel for combined
2258 parallel master taskloop{, simd} if taskloop has firstprivate,
2259 lastprivate or reduction clause. Use ORT_TASKLOOP or
2260 ORT_UNTIED_TASKLOOP instead of ORT_TASK or ORT_UNTIED_TASK. Adjust
2261 tests for ORT_COMBINED_TEAMS. Handle C++ range for loops with
2262 NULL TREE_PURPOSE in OMP_FOR_ORIG_DECLS. Firstprivatize
2263 __for_end and __for_range temporaries on OMP_PARALLEL for
2264 distribute parallel for{, simd}. Move OMP_CLAUSE_REDUCTION
2265 and OMP_CLAUSE_IN_REDUCTION from taskloop to the task construct
2266 sandwiched in between two taskloops.
2267 (computable_teams_clause): Test ctx->defaultmap[GDMK_SCALAR]
2268 instead of ctx->omp_firstprivatize_variable.
2269 (gimplify_omp_workshare): Set ort to ORT_HOST_TEAMS or
2270 ORT_COMBINED_HOST_TEAMS if not inside of target construct. If
2271 host teams, use gimplify_and_return_first etc. for body like
2272 for target or target data constructs, and at the end call
2273 gimple_omp_teams_set_host on the GIMPLE_OMP_TEAMS object.
2274 (gimplify_omp_atomic): Use OMP_ATOMIC_MEMORY_ORDER instead
2275 of OMP_ATOMIC_SEQ_CST, pass it as new argument to
2276 gimple_build_omp_atomic_load and gimple_build_omp_atomic_store, remove
2277 gimple_omp_atomic_set_seq_cst calls.
2278 (gimplify_expr) <case OMP_TASKGROUP>: Move handling into a separate
2279 case, handle taskgroup clauses.
2280 * lto-streamer-out.c (hash_tree): Handle
2281 OMP_CLAUSE_{TASK,IN}_REDUCTION.
2282 * Makefile.in (GTFILES): Add omp-general.h.
2283 * omp-builtins.def (BUILT_IN_GOMP_TASKWAIT_DEPEND,
2284 BUILT_IN_GOMP_LOOP_NONMONOTONIC_RUNTIME_START,
2285 BUILT_IN_GOMP_LOOP_MAYBE_NONMONOTONIC_RUNTIME_START,
2286 BUILT_IN_GOMP_LOOP_START, BUILT_IN_GOMP_LOOP_ORDERED_START,
2287 BUILT_IN_GOMP_LOOP_DOACROSS_START,
2288 BUILT_IN_GOMP_LOOP_NONMONOTONIC_RUNTIME_NEXT,
2289 BUILT_IN_GOMP_LOOP_MAYBE_NONMONOTONIC_RUNTIME_NEXT,
2290 BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_RUNTIME_START,
2291 BUILT_IN_GOMP_LOOP_ULL_MAYBE_NONMONOTONIC_RUNTIME_START,
2292 BUILT_IN_GOMP_LOOP_ULL_START, BUILT_IN_GOMP_LOOP_ULL_ORDERED_START,
2293 BUILT_IN_GOMP_LOOP_ULL_DOACROSS_START,
2294 BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_RUNTIME_NEXT,
2295 BUILT_IN_GOMP_LOOP_ULL_MAYBE_NONMONOTONIC_RUNTIME_NEXT,
2296 BUILT_IN_GOMP_PARALLEL_LOOP_NONMONOTONIC_RUNTIME,
2297 BUILT_IN_GOMP_PARALLEL_LOOP_MAYBE_NONMONOTONIC_RUNTIME,
2298 BUILT_IN_GOMP_PARALLEL_REDUCTIONS, BUILT_IN_GOMP_SECTIONS2_START,
2299 BUILT_IN_GOMP_TEAMS_REG, BUILT_IN_GOMP_TASKGROUP_REDUCTION_REGISTER,
2300 BUILT_IN_GOMP_TASKGROUP_REDUCTION_UNREGISTER,
2301 BUILT_IN_GOMP_TASK_REDUCTION_REMAP,
2302 BUILT_IN_GOMP_WORKSHARE_TASK_REDUCTION_UNREGISTER): New builtins.
2303 * omp-expand.c (workshare_safe_to_combine_p): Return false for
2304 non-worksharing loops.
2305 (omp_adjust_chunk_size): Don't adjust anything if chunk_size is zero.
2306 (determine_parallel_type): Don't combine parallel with worksharing
2307 which has _reductemp_ clause.
2308 (expand_parallel_call): Emit the GOMP_*nonmonotonic_runtime* or
2309 GOMP_*maybe_nonmonotonic_runtime* builtins instead of GOMP_*runtime*
2310 if there is nonmonotonic modifier or if there is no modifier and no
2311 ordered clause. For dynamic and guided schedule without monotonic
2312 and nonmonotonic modifier, default to nonmonotonic.
2313 (expand_omp_for): Likewise. Adjust expand_omp_for_generic caller, use
2314 GOMP_loop{,_ull}{,_ordered,_doacross}_start builtins if there are
2316 (expand_task_call): Add GOMP_TASK_FLAG_REDUCTION flag to flags if
2317 there are any reduction clauses.
2318 (expand_taskwait_call): New function.
2319 (expand_teams_call): New function.
2320 (expand_omp_taskreg): Allow GIMPLE_OMP_TEAMS and call
2321 expand_teams_call for it. Formatting fix. Handle taskwait with
2323 (expand_omp_for_generic): Add SCHED_ARG argument. Handle expansion
2324 of worksharing loops with task reductions.
2325 (expand_omp_for_static_nochunk, expand_omp_for_static_chunk): Handle
2326 expansion of worksharing loops with task reductions.
2327 (expand_omp_sections): Handle expansion of sections with task
2329 (expand_omp_synch): For host teams call expand_omp_taskreg.
2330 (omp_memory_order_to_memmodel): New function.
2331 (expand_omp_atomic_load, expand_omp_atomic_store,
2332 expand_omp_atomic_fetch_op): Use it and gimple_omp_atomic_memory_order
2333 instead of gimple_omp_atomic_seq_cst_p.
2334 (build_omp_regions_1, omp_make_gimple_edges): Treat taskwait with
2335 depend clauses as a standalone directive.
2336 * omp-general.c (enum omp_requires): New variable.
2337 (omp_extract_for_data): Initialize have_reductemp member. Allow
2338 NE_EXPR even in OpenMP loops, transform them into LT_EXPR or
2339 GT_EXPR loops depending on incr sign. Formatting fixes.
2340 * omp-general.h (struct omp_for_data): Add have_reductemp member.
2341 (enum omp_requires): New enum.
2342 (omp_requires_mask): Declare.
2343 * omp-grid.c (grid_eliminate_combined_simd_part): Formatting fix.
2345 * omp-low.c (struct omp_context): Add task_reductions and
2346 task_reduction_map fields.
2347 (is_host_teams_ctx): New function.
2348 (is_taskreg_ctx): Return true also if is_host_teams_ctx.
2349 (use_pointer_for_field): Use is_global_var instead of
2350 TREE_STATIC || DECL_EXTERNAL, and apply only if not privatized
2352 (build_outer_var_ref): Ignore taskgroup outer contexts.
2353 (delete_omp_context): Release task_reductions and task_reduction_map.
2354 (scan_sharing_clauses): Don't add any fields for reduction clause on
2355 taskloop. Handle OMP_CLAUSE__REDUCTEMP_. Handle
2356 OMP_CLAUSE_{IN,TASK}_REDUCTION and OMP_CLAUSE_REDUCTION with task
2357 modifier. Don't ignore shared clauses in is_host_teams_ctx contexts.
2358 Handle OMP_CLAUSE_NONTEMPORAL.
2359 (add_taskreg_looptemp_clauses): Add OMP_CLAUSE__REDUCTEMP_ clause if
2361 (scan_omp_parallel): Add _reductemp_ clause if there are any reduction
2362 clauses with task modifier.
2363 (scan_omp_task): Handle taskwait with depend clauses.
2364 (finish_taskreg_scan): Move field corresponding to _reductemp_ clause
2365 first. Move also OMP_CLAUSE__REDUCTEMP_ clause in front if present.
2366 Handle GIMPLE_OMP_TEAMS like GIMPLE_OMP_PARALLEL.
2367 (scan_omp_for): Fix comment formatting.
2368 (scan_omp_teams): Handle host teams constructs.
2369 (check_omp_nesting_restrictions): Allow teams with no outer
2370 OpenMP context. Adjust diagnostics for teams strictly nested into
2371 some explicit OpenMP construct other than target. Allow OpenMP atomics
2372 inside of simd regions.
2373 (scan_omp_1_stmt): Call scan_sharing_clauses for taskgroups.
2374 (scan_omp_1_stmt) <case GIMPLE_OMP_TEAMS>: Temporarily bump
2375 taskreg_nesting_level while scanning host teams construct.
2376 (task_reduction_read): New function.
2377 (lower_rec_input_clauses): Handle OMP_CLAUSE_REDUCTION on taskloop
2378 construct. Handle OMP_CLAUSE_IN_REDUCTION and OMP_CLAUSE__REDUCTEMP_
2379 clauses. Handle OMP_CLAUSE_REDUCTION with task modifier. Remove
2380 second argument create_tmp_var if it is NULL. Don't ignore shared
2381 clauses in is_host_teams_ctx contexts. Handle
2382 OMP_CLAUSE_FIRSTPRIVATE_NO_REFERENCE on OMP_CLAUSE_FIRSTPRIVATE
2384 (lower_reduction_clauses): Ignore reduction clauses with task
2385 modifier. Remove second argument create_tmp_var if it is NULL.
2386 Initialize OMP_ATOMIC_MEMORY_ORDER to relaxed.
2387 (lower_send_clauses): Ignore reduction clauses with task modifier.
2388 Handle OMP_CLAUSE__REDUCTEMP_. Don't send anything for
2389 OMP_CLAUSE_REDUCTION on taskloop. Handle OMP_CLAUSE_IN_REDUCTION.
2390 (maybe_add_implicit_barrier_cancel): Add OMP_RETURN argument, don't
2391 rely that it is the last stmt in body so far. Ignore outer taskgroup
2393 (omp_task_reductions_find_first, omp_task_reduction_iterate,
2394 lower_omp_task_reductions): New functions.
2395 (lower_omp_sections): Handle reduction clauses with taskgroup
2396 modifiers. Adjust maybe_add_implicit_barrier_cancel caller.
2397 (lower_omp_single): Adjust maybe_add_implicit_barrier_cancel caller.
2398 (lower_omp_for): Likewise. Handle reduction clauses with taskgroup
2400 (lower_omp_taskgroup): Handle taskgroup reductions.
2401 (create_task_copyfn): Copy over OMP_CLAUSE__REDUCTEMP_ pointer.
2402 Handle OMP_CLAUSE_IN_REDUCTION and OMP_CLAUSE_REDUCTION clauses.
2403 (lower_depend_clauses): If there are any
2404 OMP_CLAUSE_DEPEND_DEPOBJ or OMP_CLAUSE_DEPEND_MUTEXINOUTSET
2405 depend clauses, use a new array format. If OMP_CLAUSE_DEPEND_LAST is
2406 seen, assume lowering is done already and return early. Set kind
2407 on artificial depend clause to OMP_CLAUSE_DEPEND_LAST.
2408 (lower_omp_taskreg): Handle reduction clauses with task modifier on
2409 parallel construct. Handle reduction clause on taskloop construct.
2410 Handle taskwait with depend clauses.
2411 (lower_omp_1): Use lower_omp_taskreg instead of lower_omp_teams
2412 for host teams constructs.
2413 * tree.c (omp_clause_num_ops): Add in_reduction, task_reduction,
2414 nontemporal and _reductemp_ clause entries.
2415 (omp_clause_code_name): Likewise.
2416 (walk_tree_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION,
2417 OMP_CLAUSE_NONTEMPORAL and OMP_CLAUSE__REDUCTEMP_.
2418 * tree-core.h (enum omp_clause_code): Add
2419 OMP_CLAUSE_{{IN,TASK}_REDUCTION,NONTEMPORAL,_REDUCTEMP_}.
2420 (enum omp_clause_defaultmap_kind, enum omp_memory_order): New.
2421 (struct tree_base): Add omp_atomic_memory_order field into union.
2422 Remove OMP_ATOMIC_SEQ_CST comment.
2423 (enum omp_clause_depend_kind): Add OMP_CLAUSE_DEPEND_MUTEXINOUTSET
2424 and OMP_CLAUSE_DEPEND_DEPOBJ.
2425 (struct tree_omp_clause): Add subcode.defaultmap_kind.
2426 * tree.def (OMP_TASKGROUP): Add another operand, move next to other
2427 OpenMP constructs with body and clauses operands.
2428 * tree.h (OMP_BODY): Use OMP_MASTER instead of OMP_TASKGROUP.
2429 (OMP_CLAUSES): Use OMP_TASKGROUP instead of OMP_SINGLE.
2430 (OMP_TASKGROUP_CLAUSES): Define.
2431 (OMP_CLAUSE_DECL): Use OMP_CLAUSE__REDUCTEMP_ instead of
2432 OMP_CLAUSE__LOOPTEMP_.
2433 (OMP_ATOMIC_SEQ_CST): Remove.
2434 (OMP_ATOMIC_MEMORY_ORDER, OMP_CLAUSE_FIRSTPRIVATE_NO_REFERENCE,
2435 OMP_CLAUSE_LASTPRIVATE_CONDITIONAL): Define.
2436 (OMP_CLAUSE_REDUCTION_CODE, OMP_CLAUSE_REDUCTION_INIT,
2437 OMP_CLAUSE_REDUCTION_MERGE, OMP_CLAUSE_REDUCTION_PLACEHOLDER,
2438 OMP_CLAUSE_REDUCTION_DECL_PLACEHOLDER,
2439 OMP_CLAUSE_REDUCTION_OMP_ORIG_REF): Handle
2440 OMP_CLAUSE_{,IN_,TASK_}REDUCTION.
2441 (OMP_CLAUSE_REDUCTION_TASK, OMP_CLAUSE_REDUCTION_INSCAN,
2442 OMP_CLAUSE_DEFAULTMAP_KIND, OMP_CLAUSE_DEFAULTMAP_CATEGORY,
2443 OMP_CLAUSE_DEFAULTMAP_BEHAVIOR, OMP_CLAUSE_DEFAULTMAP_SET_KIND):
2445 * tree-inline.c (remap_gimple_stmt): Remap taskgroup clauses.
2446 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
2447 OMP_CLAUSE__REDUCTEMP_, OMP_CLAUSE_NONTEMPORAL.
2448 (convert_local_omp_clauses): Likewise. Remove useless test.
2449 * tree-parloops.c (create_call_for_reduction_1): Pass
2450 OMP_MEMORY_ORDER_RELAXED as new argument to
2451 dump_gimple_omp_atomic_load and dump_gimple_omp_atomic_store.
2452 * tree-pretty-print.c (dump_omp_iterators): New function.
2453 (dump_omp_clause): Handle OMP_CLAUSE__REDUCTEMP_,
2454 OMP_CLAUSE_NONTEMPORAL, OMP_CLAUSE_{TASK,IN}_REDUCTION. Print
2455 reduction modifiers. Handle OMP_CLAUSE_DEPEND_DEPOBJ and
2456 OMP_CLAUSE_DEPEND_MUTEXINOUTSET. Print iterators in depend clauses.
2457 Print __internal__ for OMP_CLAUSE_DEPEND_LAST. Handle cancel and
2458 simd OMP_CLAUSE_IF_MODIFIERs. Handle new kinds of
2459 OMP_CLAUSE_DEFAULTMAP. Print conditional: for
2460 OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
2461 (dump_omp_atomic_memory_order): New function.
2462 (dump_generic_node): Use it. Print taskgroup clauses. Print
2463 taskwait with depend clauses.
2464 * tree-pretty-print.h (dump_omp_atomic_memory_order): Declare.
2465 * tree-streamer-in.c (unpack_ts_omp_clause_value_fields):
2466 Handle OMP_CLAUSE_{TASK,IN}_REDUCTION.
2467 * tree-streamer-out.c (pack_ts_omp_clause_value_fields,
2468 write_ts_omp_clause_tree_pointers): Likewise.
2470 2018-11-08 David Malcolm <dmalcolm@redhat.com>
2473 * doc/invoke.texi (-fdump-ipa-): Document the "-optimized",
2474 "-missed", "-note", and "-all" sub-options.
2475 * ipa-inline.c (caller_growth_limits): Port from fprintf to dump
2477 (can_early_inline_edge_p): Likewise.
2478 (want_early_inline_function_p): Likewise.
2479 (want_inline_self_recursive_call_p): Likewise.
2480 (recursive_inlining): Likewise.
2481 (inline_small_functions): Likewise.
2482 (flatten_function): Likewise.
2483 (ipa_inline): Likewise.
2484 (inline_always_inline_functions): Likewise.
2485 (early_inline_small_functions): Likewise.
2486 (early_inliner): Likewise.
2487 * tree-inline.c (expand_call_inline): Likewise.
2489 2018-11-08 David Malcolm <dmalcolm@redhat.com>
2491 * pretty-print.c (pp_format): Handle %f.
2492 (selftest::test_pp_format): Add test of %f.
2493 * pretty-print.h (pp_double): New macro.
2495 2018-11-08 David Malcolm <dmalcolm@redhat.com>
2497 * dump-context.h (ASSERT_IS_CGRAPH_NODE): New macro.
2498 * dumpfile.c (make_item_for_dump_cgraph_node): Move to before...
2499 (dump_pretty_printer::decode_format): Implement "%C" for
2501 (selftest::test_capture_of_dump_calls): Rename "where" to
2502 "stmt_loc". Convert test_decl to a function decl and set its
2503 location. Add a symbol_table_test RAII instance and a
2504 cgraph_node, using it to test "%C" and dump_symtab_node.
2506 2018-11-08 Eric Botcazou <ebotcazou@adacore.com>
2509 * cgraphclones.c (duplicate_thunk_for_node): Also set DECL_IGNORED_P.
2511 2018-11-08 David Malcolm <dmalcolm@redhat.com>
2513 * cgraph.c: Include "selftest.h".
2514 (saved_symtab): New variable.
2515 (selftest::symbol_table_test::symbol_table_test): New ctor.
2516 (selftest::symbol_table_test::~symbol_table_test): New dtor.
2517 (selftest::test_symbol_table_test): New test.
2518 (selftest::cgraph_c_tests): New.
2519 * cgraph.h (saved_symtab): New decl.
2520 (selftest::symbol_table_test): New class.
2521 * selftest-run-tests.c (selftest::run_tests): Call
2522 selftest::cgraph_c_tests.
2523 * selftest.h (selftest::cgraph_c_tests): New decl.
2525 2018-11-08 Richard Biener <rguenther@suse.de>
2527 * tree-data-ref.h (lambda_int): New typedef.
2528 (lambda_vector_gcd): Adjust.
2529 (lambda_vector_new): Likewise.
2530 (lambda_matrix_new): Likewise.
2531 * tree-data-ref.c (print_lambda_vector): Adjust.
2533 2018-11-08 Richard Biener <rguenther@suse.de>
2535 PR tree-optimization/87929
2536 * tree-complex.c (expand_complex_comparison): Clean EH.
2538 2018-11-08 Martin Liska <mliska@suse.cz>
2540 * doc/extend.texi: Reword.
2541 * predict.c (expr_expected_value_1): Likewise.
2543 2018-11-08 Richard Biener <rguenther@suse.de>
2545 PR tree-optimization/87913
2546 * tree-ssa-phiopt.c (minmax_replacement): Turn EQ/NE compares
2547 of extreme values to ordered comparisons.
2549 2018-11-07 Sandra Loosemore <sandra@codesourcery.com>
2552 * doc/invoke.texi (Code Gen Options): Clarify -fno-common behavior.
2554 2018-11-07 Sandra Loosemore <sandra@codesourcery.com>
2556 * doc/invoke.texi: Remove leading dash from @opindex entries
2557 throughout the file.
2559 2018-11-07 Sandra Loosemore <sandra@codesourcery.com>
2562 * doc/invoke.texi (Option Summary): Add -e and --entry.
2563 (Link Options): Likewise.
2565 2018-11-07 Nathan Sidwell <nathan@acm.org>
2568 * Makefile.in (bitmap.o-warn): Add -Wno-error to unbreak
2569 --disable-checking bootstrap.
2571 2018-11-07 Hafiz Abid Qadeer <abidh@codesourcery.com>
2573 * configure: Regenerated.
2575 2018-11-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2578 * stor-layout.c (compute_record_mode): Set TYPE_MODE of UNION_TYPE
2579 to the mode of the widest field iff the widest field has mode class
2580 MODE_INT, or MODE_PARTIAL_INT and the union would be passed by
2583 2018-11-07 Nikolai Merinov <n.merinov@inango-systems.com>
2585 * common.opt: Add -Wattribute-warning.
2586 * doc/invoke.texi: Add documentation for -Wno-attribute-warning.
2587 * expr.c (expand_expr_real_1): Add new attribute to warning_at
2588 call to allow user configure behavior of "warning" attribute.
2590 2018-11-07 Segher Boessenkool <segher@kernel.crashing.org>
2592 * target.def: Put @: after every vs., e.g., and i.e. where it is
2593 followed by whitespace.
2594 * doc/extend.texi: Ditto.
2595 * doc/fragments.texi: Ditto.
2596 * doc/gimple.texi: Ditto.
2597 * doc/implement-c.texi: Ditto.
2598 * doc/install.texi: Ditto.
2599 * doc/invoke.texi: Ditto.
2600 * doc/md.texi: Ditto.
2601 * doc/plugins.texi: Ditto.
2602 * doc/rtl.texi: Ditto.
2603 * doc/sourcebuild.texi: Ditto.
2604 * doc/tm.texi.in: Ditto.
2605 * doc/ux.texi: Ditto.
2606 * doc/tm.texi: Regenerate.
2608 2018-11-07 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2610 * config/arm/arm-cpus.in (ares): New entry.
2611 * config/arm/arm-tables.opt: Regenerate.
2612 * config/arm/arm-tune.md: Likewise.
2613 * doc/invoke.texi (ARM Options): Document ares.
2615 2018-11-07 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2617 * config/aarch64/aarch64-cores.def (ares): Define.
2618 * config/aarch64/aarch64-tune.md: Regenerate.
2619 * doc/invoke.texi (AArch64 Options): Document ares value for mtune.
2621 2018-11-07 Jan Hubicka <jh@suse.cz>
2623 * tree.c (fld_incomplete_type_of): Clear TREE_ADDRESSABLE.
2624 (free_lang_data_in_decl): Set TREE_ADDRESSABLE for public vars and
2625 functions; clear TYPE_DECL_SUPPRESS_DEBUG and DECL_MODE for
2628 2018-11-07 Richard Biener <rguenther@suse.de>
2630 PR tree-optimization/87914
2631 * tree-vect-loop.c (vect_is_simple_reduction): Improve detection
2633 (vectorizable_reduction): Handle shifts and rotates by dispatching
2634 to vectorizable_shift.
2635 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Handle
2636 in-loop uses of vect_nested_cycle defs. Merge cycle and internal
2638 (vectorizable_shift): Export and handle being called as
2640 (vect_analyze_stmt): Call vectorizable_shift after
2641 vectorizable_reduction.
2642 * tree-vectorizer.h (vectorizable_shift): Declare.
2644 2018-11-07 Jan Hubicka <jh@suse.cz>
2646 * ipa-devirt.c (odr_types_equivalent_p): Expect constants
2647 than const decls in TREE_VALUE of enum.
2648 (dump_type_inheritance_graph): Improve duplicate dumping.
2649 (free_enum_values): New.
2650 (build_type_inheritance_graph): Use it.
2651 * tree.c (free_lang_data_in_type): Free TYPE_VALUES of enums
2652 which are not main variants or not ODR types.
2653 (verify_type_variant): Expect variants to have no TYPE_VALUES.
2655 2018-11-07 Richard Biener <rguenther@suse.de>
2657 * ipa-inline.c (want_inline_small_function_p): Compute
2658 big_speedup_p lazily and last.
2660 2018-11-07 Jan Hubicka <jh@suse.cz>
2662 * tree.c (fld_type_variant_equal_p): Skip TYPE_ALIGN check when
2663 building incomplete variant of complete type.
2664 (fld_type_variant): Do not copy TYPE_ALIGN when building incomplete
2665 variant of complete type.
2667 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
2669 * config/mips/mips.c: Fix typo in documentation of
2670 mips_loongson_ext2_prefetch_cookie.
2671 (mips_option_override): fix brain twister logical.
2672 * config/mips/mips.h: Fix typo in documentation of
2673 ISA_HAS_CTZ_CTO and define pattern.
2674 * config/mips/mips.md (prefetch): Hoist EXT2 above
2676 (prefetch_indexed): Hoist EXT2 above the EXT block.
2678 2018-11-07 Jan Hubicka <jh@suse.cz>
2680 * tree.c (free_lang_data_in_type): Add fld parameter; simplify
2681 return and parameter types of function and method types.
2682 (free_lang_data_in_cgraph): Update.
2684 2018-11-07 Martin Liska <mliska@suse.cz>
2686 PR rtl-optimization/87868
2687 * postreload-gcse.c (eliminate_partially_redundant_load): Set
2688 threshold to max_count if we would overflow.
2689 * profile-count.h: Make max_count a public constant.
2691 2018-11-07 Martin Liska <mliska@suse.cz>
2693 * mem-stats.h: Fix GNU coding style.
2695 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
2697 * config/mips/gs264e.md: New.
2698 * config/mips/mips-cpus.def: Define gs264e.
2699 * config/mips/mips-tables.opt: Regenerate.
2700 * config/mips/mips.c (mips_rtx_cost_data): Add DEFAULT_COSTS for
2702 (mips_issue_rate): Add support for gs264e.
2703 (mips_multipass_dfa_lookahead): Likewise.
2704 * config/mips/mips.h: Define TARGET_GS264E and TUNE_GS264E.
2705 (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs264e.
2706 (MIPS_ASE_MSA_SPEC): New.
2707 (BASE_DRIVER_SELF_SPECS): march=gs264e implies -mmsa.
2708 (ISA_HAS_FUSED_MADD4): Enable for TARGET_GS264E.
2709 (ISA_HAS_UNFUSED_MADD4): Exclude TARGET_GS264E.
2710 * config/mips/mips.md: Include gs264e.md.
2711 (processor): Add gs264e.
2712 * config/mips/mips.opt (MSA): Use Mask instead of Var.
2713 * doc/invoke.texi: Add gs264e to supported architectures.
2715 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
2717 * config/mips/gs464e.md: New.
2718 * config/mips/mips-cpus.def: Define gs464e.
2719 * config/mips/mips-tables.opt: Regenerate.
2720 * config/mips/mips.c (mips_rtx_cost_data): Add DEFAULT_COSTS for
2722 (mips_issue_rate): Add support for gs464e.
2723 (mips_multipass_dfa_lookahead): Likewise.
2724 (mips_option_override): Enable MMI, EXT and EXT2 for gs464e.
2725 * config/mips/mips.h: Define TARGET_GS464E and TUNE_GS464E.
2726 (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs464e.
2727 (ISA_HAS_FUSED_MADD4): Enable for TARGET_GS464E.
2728 (ISA_HAS_UNFUSED_MADD4): Exclude TARGET_GS464E.
2729 * config/mips/mips.md: Include gs464e.md.
2730 (processor): Add gs464e.
2731 * doc/invoke.texi: Add gs464e to supported architectures.
2733 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
2735 * config/mips/loongson3a.md: Rename to ...
2736 * config/mips/gs464.md: ... here.
2737 * config/mips/mips-cpus.def: Define gs464; Add loongson3a
2738 as an alias of gs464 processor.
2739 * config/mips/mips-tables.opt: Regenerate.
2740 * config/mips/mips.c (mips_issue_rate): Use PROCESSOR_GS464
2741 instead of PROCESSOR_LOONGSON_3A.
2742 (mips_multipass_dfa_lookahead): Use TUNE_GS464 instead of
2744 (mips_option_override): Enable MMI and EXT for gs464.
2745 * config/mips/mips.h: Rename TARGET_LOONGSON_3A to TARGET_GS464;
2746 Rename TUNE_LOONGSON_3A to TUNE_GS464.
2747 (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs464.
2748 (ISA_HAS_ODD_SPREG, ISA_AVOID_DIV_HILO, ISA_HAS_FUSED_MADD4,
2749 ISA_HAS_UNFUSED_MADD4): Use TARGET_GS464 instead of
2751 * config/mips/mips.md: Include gs464.md instead of loongson3a.md.
2752 (processor): Add gs464;
2753 * doc/invoke.texi: Add gs464 to supported architectures.
2755 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
2757 * config/mips/mips-protos.h
2758 (mips_loongson_ext2_prefetch_cookie): New prototype.
2759 * config/mips/mips.c (mips_loongson_ext2_prefetch_cookie): New.
2760 (mips_option_override): Enable TARGET_LOONGSON_EXT when
2761 TARGET_LOONGSON_EXT2 is true.
2762 * config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Define
2763 __mips_loongson_ext2, __mips_loongson_ext_rev=2.
2764 (ISA_HAS_CTZ_CTO): New, true if TARGET_LOONGSON_EXT2.
2765 (ISA_HAS_PREFETCH): Include TARGET_LOONGSON_EXT and
2766 TARGET_LOONGSON_EXT2.
2767 (ASM_SPEC): Add mloongson-ext2 and mno-loongson-ext2.
2768 (define_insn "ctz<mode>2"): New insn pattern.
2769 (define_insn "prefetch"): Include TARGET_LOONGSON_EXT2.
2770 (define_insn "prefetch_indexed_<mode>"): Include
2771 TARGET_LOONGSON_EXT and TARGET_LOONGSON_EXT2.
2772 * config/mips/mips.opt (-mloongson-ext2): Add option.
2773 * gcc/doc/invoke.texi (-mloongson-ext2): Document.
2775 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
2777 * config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Add
2778 __mips_loongson_ext.
2779 (MIPS_ASE_LOONGSON_EXT_SPEC): New.
2780 (BASE_DRIVER_SELF_SPECS): march=loongson3a implies
2782 (ASM_SPEC): Add mloongson-ext and mno-loongson-ext.
2783 * config/mips/mips.md (mul<mode>3, mul<mode>3_mul3_nohilo,
2784 <u>div<mode>3, <u>mod<mode>3, prefetch): Use TARGET_LOONGSON_EXT
2785 instead of TARGET_LOONGSON_3A.
2786 * config/mips/mips.opt (-mloongson-ext): Add option.
2787 * gcc/doc/invoke.texi (-mloongson-ext): Document.
2789 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
2791 * config.gcc (extra_headers): Add loongson-mmiintrin.h.
2792 * config/mips/loongson.md: Move to ...
2793 * config/mips/loongson-mmi.md: here; Adjustment.
2794 * config/mips/loongson.h: Move to ...
2795 State as deprecated. Include loongson-mmiintrin.h for back
2796 compatibility and warning.
2797 * config/mips/loongson-mmiintrin.h: ... here.
2798 * config/mips/mips.c (mips_hard_regno_mode_ok_uncached,
2799 mips_vector_mode_supported_p, AVAIL_NON_MIPS16): Use
2800 TARGET_LOONGSON_MMI instead of TARGET_LOONGSON_VECTORS.
2801 (mips_option_override): Make sure MMI use hard float;
2802 (mips_shift_truncation_mask, mips_expand_vpc_loongson_even_odd,
2803 mips_expand_vpc_loongson_pshufh, mips_expand_vpc_loongson_bcast,
2804 mips_expand_vector_init): Use TARGET_LOONGSON_MMI instead of
2805 TARGET_LOONGSON_VECTORS.
2806 * gcc/config/mips/mips.h (TARGET_LOONGSON_VECTORS): Delete.
2807 (TARGET_CPU_CPP_BUILTINS): Add __mips_loongson_mmi.
2808 (MIPS_ASE_DSP_SPEC, MIPS_ASE_LOONGSON_MMI_SPEC): New.
2809 (BASE_DRIVER_SELF_SPECS): march=loongson2e/2f/3a implies
2811 (SHIFT_COUNT_TRUNCATED): Use TARGET_LOONGSON_MMI instead of
2812 TARGET_LOONGSON_VECTORS.
2813 * gcc/config/mips/mips.md (MOVE64, MOVE128): Use
2814 TARGET_LOONGSON_MMI instead of TARGET_LOONGSON_VECTORS.
2815 (Loongson MMI patterns): Include loongson-mmi.md instead of
2817 * gcc/config/mips/mips.opt (-mloongson-mmi): New option.
2818 * gcc/doc/invoke.texi (-mloongson-mmi): Document.
2820 2018-11-07 Richard Biener <rguenther@suse.de>
2823 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Fixup
2824 BLOCK_ABSTRACT_ORIGIN to be the ultimate origin.
2826 2018-11-07 Alexandre Oliva <aoliva@redhat.com>
2828 PR rtl-optimization/87874
2829 * lra.c (lra_substitute_pseudo): Do not create a subreg for
2832 2018-11-06 Aaron Sawdey <acsawdey@linux.ibm.com>
2834 * config/rs6000/rs6000.md (bswap<mode>2): Force address into register
2835 if not in indexed or indirect form.
2836 (bswap<mode>2_load): Change predicate to indexed_or_indirect_operand.
2837 (bswap<mode>2_store): Ditto.
2839 2018-11-06 Richard Earnshaw <rearnsha@arm.com>
2841 * config/aarch64/aarch64.md (speculation_tracker): Set the mode for
2844 2018-11-06 Richard Biener <rguenther@suse.de>
2846 PR tree-optimization/86850
2847 * vec.h (vec<T, va_heap, vl_ptr>::splice): Check src.length ()
2848 instead of src.m_vec.
2850 2018-11-06 Jan Hubicka <jh@suse.cz>
2852 * tree.c (fld_simplified_type_name): Break out form ...
2853 (free_lang_data_in_type): ... here.
2854 (fld_type_variant_equal_p): Use it.
2856 2018-11-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2858 * config/default-d.c: Include memmodel.h.
2860 * config/sol2-d.c: New file.
2861 * config/t-sol2 (sol2-d.o): New rule.
2862 * config.gcc <*-*-solaris2*>: Set d_target_objs,
2863 target_has_targetdm.
2865 2018-11-06 Jan Hubicka <jh@suse.cz>
2867 * tree.c (fld_type_variant): Also copy alignment; be sure that
2868 new variant is equal.
2870 2018-11-06 Ilya Leoshkevich <iii@linux.ibm.com>
2873 * config/s390/s390.md: Add relative_long attribute.
2875 2018-11-06 Jan Hubicka <jh@suse.cz>
2877 * ipa-pure-const.c (check_decl): Do not test TYPE_NEEDS_CONSTRUCTING.
2878 * lto-streamer-out.c (hash_tree): Do not hash TYPE_NEEDS_CONSTRUCTING.
2879 * tree-streamer-in.c (unpack_ts_type_common_value_fields): Do not
2880 stream TYPE_NEEDS_CONSTRUCTING.
2881 * tree-streamer-out.c (pack_ts_type_common_value_fields): Likewise.
2882 * tree.c (free_lang_data_in_type): Clear TYPE_NEEDS_CONSTRUCTING.
2884 2018-11-06 Richard Biener <rguenther@suse.de>
2886 * tree-vect-slp.c (vect_slp_bb): Move opening of vect_slp_analyze_bb
2888 (vect_slp_analyze_bb_1): ... here to avoid hiding optimized locations.
2890 2018-11-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2892 * gcc/config/msp430/msp430.h (REG_CLASS_CONTENTS): Add R0 to
2893 REG_CLASS_CONTENTS[GEN_REGS].
2894 (REGNO_REG_CLASS): Return NO_REGS for R2 and R3.
2896 2018-11-06 Jan Hubicka <jh@suse.cz>
2898 * tree.c (fld_simplified_type_of): Clear TYPELESS_STORAGE flag.
2900 2018-11-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2903 * config/sol2.h (ASAN_CC1_SPEC): Define.
2904 (LD_WHOLE_ARCHIVE_OPTION): Define.
2905 (LD_NO_WHOLE_ARCHIVE_OPTION): Define.
2906 (ASAN_REJECT_SPEC): Provide default.
2907 (LIBASAN_EARLY_SPEC): Define.
2908 (LIBTSAN_EARLY_SPEC): Define.
2909 (LIBLSAN_EARLY_SPEC): Define.
2910 * config/i386/sol2.h (CC1_SPEC): Redefine.
2911 (ASAN_REJECT_SPEC): Define.
2913 * config/sparc/sparc.c (sparc_asan_shadow_offset): Declare.
2914 (TARGET_ASAN_SHADOW_OFFSET): Define.
2915 (sparc_asan_shadow_offset): New function.
2916 * config/sparc/sol2.h (CC1_SPEC): Append ASAN_CC1_SPEC.
2917 (ASAN_REJECT_SPEC): Define.
2919 2018-11-06 Jan Hubicka <jh@suse.cz>
2921 * tree.c (fld_type_variant): Copy canonical type.
2922 (fld_incomplete_type_of): Check that canonical types looks sane;
2923 copy canonical type.
2924 (verify_type): Accept when incomplete type has complete canonical type.
2926 2018-11-06 Jan Hubicka <jh@suse.cz>
2928 * tree.c (free_lang_data): Reset overwite_assembler_name,
2929 print_xnode, print_decl, print_type and print_identifier of
2932 2018-11-06 Richard Biener <rguenther@suse.de>
2934 PR tree-optimization/87889
2935 * tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges):
2936 Do nothing if old and new arg are the same
2938 2018-11-06 Andreas Krebbel <krebbel@linux.ibm.com>
2941 * config/s390/s390.md ("*r<noxa>sbg_di_rotl"): Remove mode
2942 attributes for operands 3 and 4.
2944 2018-11-06 Richard Biener <rguenther@suse.de>
2947 * simplify-rtx.c (simplify_binary_operation_1): Add pattern
2948 matching bitfield insertion.
2950 2018-11-06 Alexandre Oliva <aoliva@redhat.com>
2952 * auto-inc-dec.c: Include valtrack.h. Improve comments.
2953 (reg_next_debug_use): New.
2954 (attempt_change): Propagate adjusted expression into affected
2956 (merge_in_block): Track uses in debug insns.
2957 (pass_inc_dec::execute): Allocate and release
2960 2018-11-06 Wei Xiao <wei3.xiao@intel.com>
2962 * config/i386/avx512fintrin.h: Update VFIXUPIMM* intrinsics.
2963 (_mm512_fixupimm_round_pd): Update parameters and builtin.
2964 (_mm512_maskz_fixupimm_round_pd): Ditto.
2965 (_mm512_fixupimm_round_ps): Ditto.
2966 (_mm512_maskz_fixupimm_round_ps): Ditto.
2967 (_mm_fixupimm_round_sd): Ditto.
2968 (_mm_maskz_fixupimm_round_sd): Ditto.
2969 (_mm_fixupimm_round_ss): Ditto.
2970 (_mm_maskz_fixupimm_round_ss): Ditto.
2971 (_mm512_fixupimm_pd): Ditto.
2972 (_mm512_maskz_fixupimm_pd): Ditto.
2973 (_mm512_fixupimm_ps): Ditto.
2974 (_mm512_maskz_fixupimm_ps): Ditto.
2975 (_mm_fixupimm_sd): Ditto.
2976 (_mm_maskz_fixupimm_sd): Ditto.
2977 (_mm_fixupimm_ss): Ditto.
2978 (_mm_maskz_fixupimm_ss): Ditto.
2979 (_mm512_mask_fixupimm_round_pd): Update builtin.
2980 (_mm512_mask_fixupimm_round_ps): Ditto.
2981 (_mm_mask_fixupimm_round_sd): Ditto.
2982 (_mm_mask_fixupimm_round_ss): Ditto.
2983 (_mm512_mask_fixupimm_pd): Ditto.
2984 (_mm512_mask_fixupimm_ps): Ditto.
2985 (_mm_mask_fixupimm_sd): Ditto.
2986 (_mm_mask_fixupimm_ss): Ditto.
2987 * config/i386/avx512vlintrin.h:
2988 (_mm256_fixupimm_pd): Update parameters and builtin.
2989 (_mm256_maskz_fixupimm_pd): Ditto.
2990 (_mm256_fixupimm_ps): Ditto.
2991 (_mm256_maskz_fixupimm_ps): Ditto.
2992 (_mm_fixupimm_pd): Ditto.
2993 (_mm_maskz_fixupimm_pd): Ditto.
2994 (_mm_fixupimm_ps): Ditto.
2995 (_mm_maskz_fixupimm_ps): Ditto.
2996 (_mm256_mask_fixupimm_pd): Update builtin.
2997 (_mm256_mask_fixupimm_ps): Ditto.
2998 (_mm_mask_fixupimm_pd): Ditto.
2999 (_mm_mask_fixupimm_ps): Ditto.
3000 * config/i386/i386-builtin-types.def: Add new types and remove useless ones.
3001 * config/i386/i386-builtin.def: Update builtin definitions.
3002 * config/i386/i386.c: Handle new builtin types and remove useless ones.
3003 * config/i386/sse.md: Update VFIXUPIMM* patterns.
3004 (<avx512>_fixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
3005 (<avx512>_fixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
3006 (<avx512>_fixupimm<mode>_mask<round_saeonly_name>): Update.
3007 (avx512f_sfixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
3008 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
3009 (avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Update.
3010 * config/i386/subst.md:
3011 (round_saeonly_sd_mask_operand4): Add new subst_attr.
3012 (round_saeonly_sd_mask_op4): Ditto.
3013 (round_saeonly_expand_operand5): Ditto.
3014 (round_saeonly_expand): Update.
3016 2018-11-05 Max Filippov <jcmvbkbc@gmail.com>
3018 * config/xtensa/uclinux.h (XTENSA_ALWAYS_PIC): Change to 0.
3020 2018-11-05 Segher Boessenkool <segher@kernel.crashing.org>
3022 PR rtl-optimization/87871
3023 * combine.c (make_more_copies): Skip if dest is frame_pointer_rtx.
3025 2018-11-05 Paul Koning <ni1d@arrl.net>
3027 * doc/sourcebuild.texi (target attributes): Document new "inf"
3028 effective target keyword.
3030 2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
3032 * config/s390/s390.c (s390_register_move_cost): Increase costs for
3033 moves involving the CC reg.
3035 2018-11-05 Richard Biener <rguenther@suse.de>
3037 PR tree-optimization/87873
3038 * tree-ssa-loop-manip.h (split_loop_exit_edge): Add copy_constants_p
3040 * tree-ssa-loop-manip.c (split_loop_exit_edge): Likewise.
3041 * tree-vect-loop.c (vect_transform_loop): When splitting the
3042 loop exit also create forwarder PHIs for constants.
3043 * tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges):
3044 Handle constant to_arg, add extra checking we match up the correct
3047 2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
3049 * config/s390/s390.md: QImode and HImode for load on condition.
3051 2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
3053 * config/s390/predicates.md: Fix typo.
3054 * config/s390/s390.md: Allow immediates for load on condition.
3056 2018-11-05 Martin Liska <mliska@suse.cz>
3058 * alloc-pool.h (struct pool_usage): Use SIZE_AMOUNT.
3059 * bitmap.h (struct bitmap_usage): Likewise.
3060 * ggc-common.c (SCALE): Remove.
3062 (struct ggc_usage): Use SIZE_AMOUNT. And update
3064 * ggc-page.c (SCALE): Remove.
3065 (STAT_LABEL): Remove.
3066 (ggc_print_statistics): Use SIZE_AMOUNT.
3067 * gimple.h (SCALE): Remove.
3069 * input.c (ONE_K): Remove.
3072 (STAT_LABEL): Likewise.
3073 (FORMAT_AMOUNT): Likewise.
3074 (dump_line_table_statistics): Use SIZE_AMOUNT.
3075 * mem-stats.h (struct mem_usage): Likewise.
3076 * rtl.c (dump_rtx_statistics): Likewise.
3077 (rtx_alloc_counts): Change type to size_t.
3078 (rtx_alloc_sizes): Likewise.
3079 (rtx_count_cmp): New.
3080 (dump_rtx_statistics): Sort first based on counts.
3081 * tree.c (tree_nodes_cmp): New.
3082 (tree_codes_cmp): New.
3083 (dump_tree_statistics): Sort first based on counts.
3084 * system.h (ONE_K): New.
3086 (SIZE_SCALE): Likewise.
3087 (SIZE_LABEL): Likewise.
3088 (SIZE_AMOUNT): Likewise.
3089 * tree-cfg.c (dump_cfg_stats): Use SIZE_AMOUNT.
3090 * tree-dfa.c (dump_dfa_stats): Likewise.
3091 * tree-phinodes.c (phinodes_print_statistics): Likewise.
3092 * tree-ssanames.c (ssanames_print_statistics): Likewise.
3093 * tree.c (dump_tree_statistics): Likewise.
3094 * vec.c (struct vec_usage): Likewise.
3095 * trans-mem.c (tm_mangle): Enlarge buffer in order to not
3096 trigger a -Werror=format-overflow with
3097 --enable-gather-detailed-stats.
3099 2018-11-05 Martin Liska <mliska@suse.cz>
3101 * mem-stats.h (mem_alloc_description::release_instance_overhead):
3103 * vec.c (struct vec_usage): Register m_element_size.
3104 (vec_prefix::register_overhead): New arguments: elements and
3106 (vec_prefix::release_overhead): Subtract elements.
3107 * vec.h (struct vec_prefix): Change signature.
3108 (va_heap::reserve): Pass proper arguments.
3109 (va_heap::release): Likewise.
3111 2018-11-05 Martin Liska <mliska@suse.cz>
3113 * mem-stats.h (mem_alloc_description::get_list): Fix GNU coding
3117 2018-11-05 Richard Biener <rguenther@suse.de>
3119 * tree-scalar-evolution.h (final_value_replacement_loop): Update
3121 * tree-scalar-evolution.c (final_value_replacement_loop): Return
3122 whether anything was done.
3123 (scev_const_prop): Remove constant propagation part, fold
3125 * tree-ssa-loop.c (pass_scev_cprop::execute): ... here.
3126 (pass_data_scev_cprop): TODO_cleanup_cfg is now done
3129 2018-11-05 Jakub Jelinek <jakub@redhat.com>
3131 PR tree-optimization/87859
3132 * gimple-ssa-store-merging.c (struct merged_store_group): Add
3133 only_constants and first_nonmergeable_order members.
3134 (merged_store_group::merged_store_group): Initialize them.
3135 (merged_store_group::do_merge): Clear only_constants member if
3136 adding something other than INTEGER_CST store.
3137 (imm_store_chain_info::coalesce_immediate_stores): Don't merge
3138 stores with order >= first_nonmergeable_order. Use
3139 merged_store->only_constants instead of always recomputing it.
3140 Set merged_store->first_nonmergeable_order if we've skipped any
3141 stores. Attempt to merge overlapping INTEGER_CST stores that
3142 we would otherwise skip.
3145 * match.pd (X + Y < X): Don't optimize if TYPE_OVERFLOW_SANITIZED.
3147 2018-11-05 Xuepeng Guo <xuepeng.guo@intel.com>
3150 * config/i386/emmintrin.h (__v16qs): New to cope with option
3152 (_mm_cmpeq_epi8): Replace __v16qi with __v16qs.
3153 (_mm_cmplt_epi8): Likewise.
3154 (_mm_cmpgt_epi8): Likewise.
3156 2018-11-05 Richard Biener <rguenther@suse.de>
3158 PR rtl-optimization/87852
3159 * fwprop.c (use_killed_between): Only consider single-defs of the
3160 use whose definition statement dominates the use.
3162 2018-11-05 Martin Liska <mliska@suse.cz>
3165 * doc/invoke.texi: Remove options that are
3166 not disabled with -Os.
3168 2018-11-05 Martin Liska <mliska@suse.cz>
3171 * doc/extend.texi: Update constrain about the last argument
3172 of __builtin_expect_with_probability.
3174 2018-11-05 Martin Liska <mliska@suse.cz>
3177 * predict.c (expr_expected_value_1): Verify
3178 that last argument is a real constants and emit
3181 2018-11-05 Martin Liska <mliska@suse.cz>
3183 PR gcov-profile/77698
3184 * ipa-profile.c (ipa_profile): Adjust hotness threshold
3187 2018-11-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
3189 PR tree-optimization/86572
3190 * builtins.c (c_strlen): Handle negative offsets in a safe way.
3192 2018-11-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
3194 PR tree-optimization/87672
3195 * gimple-fold.c (gimple_fold_builtin_stxcpy_chk): Gimplify.
3196 * tree-ssa-strlen.c (handle_builtin_strcat): Adjust object size.
3198 2018-11-04 Uros Bizjak <ubizjak@gmail.com>
3201 * cfgexpand.c (pass_expand::execute): Move the call to
3202 finish_eh_generation in front of the call to expand_stack_alignment.
3204 2018-11-04 Venkataramanan Kumar <venkataramanan.kumar@amd.com>
3206 * common/config/i386/i386-common.c (processor_alias_table): Add
3208 * config.gcc (i[34567]86-*-linux* | ...): Add znver2.
3209 (case ${target}): Add znver2.
3210 * config/i386/driver-i386.c: (host_detect_local_cpu): Let
3211 -march=native recognize znver2 processors.
3212 * config/i386/i386-c.c (ix86_target_macros_internal): Add znver2.
3213 * config/i386/i386.c (m_znver2): New definition.
3214 (m_ZNVER): New definition.
3215 (m_AMD_MULTIPLE): Includes m_znver2.
3216 (processor_cost_table): Add znver2 entry.
3217 (processor_target_table): Add znver2 entry.
3218 (get_builtin_code_for_version): Set priority for
3220 (processor_model): Add M_AMDFAM17H_ZNVER2.
3221 (arch_names_table): Ditto.
3222 (ix86_reassociation_width): Include znver2.
3223 * config/i386/i386.h (TARGET_znver2): New definition.
3224 (struct ix86_size_cost): Add TARGET_ZNVER2.
3225 (enum processor_type): Add PROCESSOR_ZNVER2.
3226 * config/i386/i386.md (define_attr "cpu"): Add znver2.
3227 * config/i386/x86-tune-costs.h: (processor_costs) Add znver2 costs.
3228 * config/i386/x86-tune-sched.c: (ix86_issue_rate): Add znver2.
3229 (ix86_adjust_cost): Add znver2.
3230 * config/i386/x86-tune.def: Replace m_ZNVER1 by m_ZNVER.
3231 * gcc/doc/extend.texi: Add details about znver2.
3232 * gcc/doc/invoke.texi: Add details about znver2.
3234 2018-11-03 Sandra Loosemore <sandra@codesourcery.com>
3238 * config/nios2/nios2.c (nios2_rtx_costs): Recognize <mul>sidi3
3241 2018-11-02 Aaron Sawdey <acsawdey@linux.ibm.com>
3243 * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Pay
3244 attention to TARGET_AVOID_XFORM and BYTES_BIG_ENDIAN.
3246 2018-11-02 Richard Earnshaw <rearnsha@arm.com>
3248 * config/aarch64/aarch64.c ((aarch64_override_options): Disable
3249 shrink-wrapping when -mtrack-speculation.
3251 2018-11-02 Richard Biener <rguenther@suse.de>
3253 * tree-ssa-coalesce.c (struct coalesce_list): Add obstack member.
3254 (pop_cost_one_pair): Do not free pair.
3255 (pop_best_coalesce): Likewise.
3256 (create_coalesce_list): Initialize obstack.
3257 (delete_coalesce_list): Free obstack.
3258 (find_coalesce_pair): Obstack-allocate coalesce pairs.
3259 (add_cost_one_coalesce): Likewise.
3260 (struct live_track): Remove bitmap pointer indirections.
3261 (new_live_track): Adjust.
3262 (delete_live_track): Likewise.
3263 (live_track_remove_partition): Likewise.
3264 (live_track_add_partition): Likewise.
3265 (live_track_live_p): Likewise.
3266 (live_track_process_def): Likewise.
3267 (live_track_clear_base_vars): Likewise.
3269 2018-11-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3271 * configure.ac (gcc_cv_as_sparc_register_op): Remove.
3272 * configure: Regenerate.
3273 * config.in: Regenerate.
3274 * config/sparc/sparc.c (sparc_output_scratch_registers): Remove
3275 HAVE_AS_REGISTER_PSEUDO_OP guard.
3276 * config/sparc/sparc.h (ASM_ARCH64_SPEC): Remove
3277 !HAVE_AS_REGISTER_PSEUDO_OP support.
3278 (ASM_DECLARE_REGISTER_GLOBAL): Remove HAVE_AS_REGISTER_PSEUDO_OP
3281 2018-11-02 Richard Biener <rguenther@suse.de>
3283 * dwarf2out.c (build_abbrev_table): Guard lookup_external_ref call
3286 2018-11-02 Richard Biener <rguenther@suse.de>
3288 PR tree-optimization/87776
3289 * tree-ssa-sccvn.c (do_rpo_vn): Do not mark backedges
3290 executable when iterating but running into rpo-vn-max-loop-depth
3291 and not eliding the iteration.
3293 2018-11-30 Jan Hubicka <jh@suse.cz>
3295 * tree.c (free_lang_data_in_decl): Free TREE_TYPE and alignment of
3298 2018-11-01 Aaron Sawdey <acsawdey@linux.ibm.com>
3300 * config/rs6000/rs6000-protos.h (rs6000_address_for_fpconvert): Remove
3302 * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem):
3303 Combine with rs6000_address_for_fpconvert.
3304 (rs6000_address_for_fpconvert): Combine with
3305 rs6000_force_indexed_or_indirect_mem.
3306 (rs6000_expand_vector_init): Change function call from
3307 rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
3308 * config/rs6000/rs6000.md (floatsi<mode>2_lfiwax): Change call from
3309 rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
3310 (floatsi<mode>2_lfiwax_mem): Ditto.
3311 (floatunssi<mode>2_lfiwzx): Ditto.
3312 (floatunssi<mode>2_lfiwzx_mem): Ditto.
3313 (float<QHI:mode><FP_ISA3:mode>2): Ditto.
3314 (floatuns<QHI:mode><FP_ISA3:mode>2): Ditto.
3315 (fix_trunc<mode>si2_stfiwx): Ditto.
3316 (fixuns_trunc<mode>si2_stfiwx): Ditto.
3317 (float_<mode>si2_hw): Ditto.
3318 (floatuns_<mode>si2_hw): Ditto.
3319 * config/rs6000/vsx.md (*vsx_extract_si): Ditto.
3320 (vsx_splat_<mode>): Ditto.
3322 2018-11-01 Joseph Myers <joseph@codesourcery.com>
3324 * configure.ac (gcc_cv_as_ia64_ltoffx_ldxmov_relocs): Add newline
3325 at end of assembler input text.
3326 * configure: Regenerate.
3328 2018-11-01 Jakub Jelinek <jakub@redhat.com>
3330 PR tree-optimization/87826
3331 * gimple-ssa-store-merging.c (do_shift_rotate): Punt if count is
3332 negative or larger or equal to type's precision.
3334 2018-10-31 Alexandre Oliva <aoliva@redhat.com>
3336 * opts.c (default_options_table): Do not enable
3337 OPT_fdelayed_branch at -Og.
3338 * doc/invoke.texi (-fdelayed-branch): Document it.
3340 2018-10-31 Richard Henderson <richard.henderson@linaro.org>
3342 * optabs-libfuncs.c (build_libfunc_function_visibility):
3343 New, split out from...
3344 (build_libfunc_function): ... here.
3345 (init_one_libfunc_visibility): New, split out from ...
3346 (init_one_libfunc): ... here.
3348 * config/aarch64/atomics.md (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse):
3349 scratch register need not be early-clobber. Document the reason
3350 why we cannot use ST<OP>.
3352 2018-10-31 Joseph Myers <joseph@codesourcery.com>
3355 * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE. Use single
3356 line for second argument of AC_DEFINE_UNQUOTED.
3357 * doc/install.texi (Tools/packages necessary for modifying GCC):
3358 Update to autoconf 2.69 and automake 1.15.1.
3359 * aclocal.m4, config.in, configure: Regenerate.
3361 2018-10-31 Pat Haugen <pthaugen@us.ibm.com>
3363 * tree-ssa-loop-ivcanon.c (try_peel_loop): Fix typo and remove dead
3366 2018-10-31 Martin Liska <mliska@suse.cz>
3369 * common/config/aarch64/aarch64-common.c (aarch64_parse_extension):
3370 Add new argument invalid_extension.
3371 (aarch64_get_all_extension_candidates): New function.
3372 (aarch64_rewrite_selected_cpu): Add NULL to function call.
3373 * config/aarch64/aarch64-protos.h (aarch64_parse_extension): Add
3375 (aarch64_get_all_extension_candidates): New function.
3376 * config/aarch64/aarch64.c (aarch64_parse_arch): Add new
3377 argument invalid_extension.
3378 (aarch64_parse_cpu): Likewise.
3379 (aarch64_print_hint_for_extensions): New function.
3380 (aarch64_validate_mcpu): Provide hint about invalid extension.
3381 (aarch64_validate_march): Likewise.
3382 (aarch64_handle_attr_arch): Pass new argument.
3383 (aarch64_handle_attr_cpu): Provide hint about invalid extension.
3384 (aarch64_handle_attr_isa_flags): Likewise.
3386 2018-10-31 Richard Biener <rguenther@suse.de>
3390 * tree-outof-ssa.c (insert_backedge_copies): Restrict
3391 copy generation to useful cases. Place the copy before
3392 the definition of the backedge value when possible.
3394 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
3396 * config/arc/arc-arch.h (ARC_TUNE_ARC7XX): New tune value.
3397 * config/arc/arc.c (arc_active_insn): New function.
3398 (check_store_cacheline_hazard): Likewise.
3399 (workaround_arc_anomaly): Use check_store_cacheline_hazard.
3400 (arc_override_options): Disable delay slot scheduler for older
3402 (arc_store_addr_hazard_p): New implementation, old one renamed to
3404 (arc_store_addr_hazard_internal_p): Renamed.
3405 (arc_reorg): Don't combine into brcc instructions which are part
3406 of hardware hazard solution.
3407 * config/arc/arc.md (attr tune): Consider new arc7xx tune value.
3408 (tune_arc700): Likewise.
3409 * config/arc/arc.opt (arc7xx): New tune value.
3410 * config/arc/arc700.md: Improve A7 scheduler.
3412 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
3414 * config/arc/arc.c (arc_override_options): Remove
3415 TARGET_COMPACT_CASESI.
3416 * config/arc/arc.h (ASM_OUTPUT_ADDR_DIFF_ELT): Update.
3417 (CASE_VECTOR_MODE): Likewise.
3418 (CASE_VECTOR_PC_RELATIVE): Likewise.
3419 (CASE_VECTOR_SHORTEN_MODE): Likewise.
3420 (CASE_VECTOR_SHORTEN_MODE1): Delete.
3421 (ADDR_VEC_ALIGN): Update.
3422 (ASM_OUTPUT_CASE_LABEL): Undefine.
3423 (ASM_OUTPUT_BEFORE_CASE_LABEL): Undefine.
3424 (TARGET_BI_BIH): Define.
3425 (DEFAULT_BRANCH_INDEX): Likewise.
3426 * config/arc/arc.md (casesi): Rework to accept BI/BIH
3427 instructions, remove compact_casesi use case.
3428 (casesi_compact_jump): Remove.
3429 (casesi_dispatch): New pattern.
3430 * config/arc/arc.opt: Add mbranch-index option. Deprecate
3431 compact_casesi option.
3432 * doc/invoke.texi: Document mbranch-index option.
3434 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
3436 * config/arc/arc.c (arc_get_tp): Remove function.
3437 (arc_emit_call_tls_get_addr): Likewise.
3438 (arc_call_tls_get_addr): New function.
3439 (arc_legitimize_tls_address): Make use of arc_call_tls_get_addr.
3440 * config/arc/arc.md (tls_load_tp_soft): Remove.
3441 (tls_gd_get_addr): Likewise.
3443 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
3445 * config/arc/arc.md (mulsi3): Remove call to mulsi_600_lib.
3446 (mulsi3_600_lib): Remove pattern.
3447 (umulsi3_highpart_600_lib_le): Likewise.
3448 (umulsi3_highpart): Remove call to umulsi3_highpart_600_lib_le.
3449 (umulsidi3): Remove call to umulsidi3_600_lib.
3450 (umulsidi3_600_lib): Remove pattern.
3451 (peephole2): Remove peephole using the above deprecated patterns.
3453 2018-10-31 Thomas Preud'homme <thomas.preudhomme@linaro.org>
3456 * config/arm/arm.c (arm_option_check_internal): Disable the combined
3457 use of -mslow-flash-data and -mword-relocations.
3458 (arm_option_override): Enable -mword-relocations if -fpic or -fPIC.
3459 * config/arm/arm.md (SYMBOL_REF MOVT splitter): Stop checking for
3461 * doc/invoke.texi (-mword-relocations): Mention conflict with
3463 (-mslow-flash-data): Reciprocally.
3465 2018-10-31 Richard Henderson <richard.henderson@linaro.org>
3467 * config/aarch64/aarch64.c (aarch64_hard_regno_mode_ok): Force
3468 16-byte modes held in GP registers to use an even regno.
3470 * config/aarch64/aarch64.c (aarch64_emit_bic): Remove.
3471 (aarch64_atomic_ldop_supported_p): Remove.
3472 (aarch64_gen_atomic_ldop): Remove.
3473 * config/aarch64/atomic.md (atomic_<atomic_optab><ALLI>):
3474 Fully expand LSE operations here.
3475 (atomic_fetch_<atomic_optab><ALLI>): Likewise.
3476 (atomic_<atomic_optab>_fetch<ALLI>): Likewise.
3477 (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse): Drop atomic_op iterator
3478 and use ATOMIC_LDOP instead; use register_operand for the input;
3479 drop the split and emit insns directly.
3480 (aarch64_atomic_fetch_<ATOMIC_LDOP><ALLI>_lse): Likewise.
3481 (aarch64_atomic_<atomic_op>_fetch<ALLI>_lse): Remove.
3482 (@aarch64_atomic_load<ATOMIC_LDOP><ALLI>): Remove.
3484 * config/aarch64/aarch64.c (aarch64_emit_atomic_swap): Remove.
3485 (aarch64_gen_atomic_ldop): Don't call it.
3486 * config/aarch64/atomics.md (atomic_exchange<ALLI>):
3487 Use aarch64_reg_or_zero.
3488 (aarch64_atomic_exchange<ALLI>): Likewise.
3489 (aarch64_atomic_exchange<ALLI>_lse): Remove split; remove & from
3490 operand 0; use aarch64_reg_or_zero for input; merge ...
3491 (@aarch64_atomic_swp<ALLI>): ... this and remove.
3493 * config/aarch64/aarch64.c (aarch64_gen_compare_reg_maybe_ze): New.
3494 (aarch64_split_compare_and_swap): Use it.
3495 (aarch64_expand_compare_and_swap): Likewise. Remove convert_modes;
3496 test oldval against the proper predicate.
3497 * config/aarch64/atomics.md (@atomic_compare_and_swap<ALLI>):
3498 Use nonmemory_operand for expected.
3499 (cas_short_expected_pred): New.
3500 (@aarch64_compare_and_swap<SHORT>): Use it; use "rn" not "rI" to match.
3501 (@aarch64_compare_and_swap<GPI>): Use "rn" not "rI" for expected.
3502 * config/aarch64/predicates.md (aarch64_plushi_immediate): New.
3503 (aarch64_plushi_operand): New.
3505 * config/aarch64/aarch64.c (aarch64_expand_compare_and_swap):
3506 Force oldval into the rval register for TARGET_LSE; emit the compare
3507 during initial expansion so that it may be deleted if unused.
3508 (aarch64_gen_atomic_cas): Remove.
3509 * config/aarch64/atomics.md (@aarch64_compare_and_swap<SHORT>_lse):
3510 Change =&r to +r for operand 0; use match_dup for operand 2;
3511 remove is_weak and mod_f operands as unused. Drop the split
3513 (@aarch64_atomic_cas<SHORT>): ... this pattern's output; remove.
3514 (@aarch64_compare_and_swap<GPI>_lse): Similarly.
3515 (@aarch64_atomic_cas<GPI>): Similarly.
3517 2018-10-31 Richard Biener <rguenther@suse.de>
3519 * tree-eh.c (replace_trapping_overflow): Simplify ABS_EXPR case
3522 2018-10-31 Sameera Deshpande <sameera.deshpande@linaro.org>
3524 * config/aarch64/aarch64-cores.def (saphira): Use saphira pipeline.
3525 * config/aarch64/aarch64.md: Include saphira.md
3526 * config/aarch64/saphira.md: New file for pipeline description.
3528 2018-10-30 Martin Sebor <msebor@redhat.com>
3531 * gimple-ssa-sprintf.c (format_directive): Use %G to include
3533 (sprintf_dom_walker::compute_format_length):
3534 Avoid setting POSUNDER4K here.
3535 (get_destination_size): Handle null argument values.
3536 (get_user_idx_format): New function.
3537 (sprintf_dom_walker::handle_gimple_call): Handle all printf-like
3538 functions, including user-defined with attribute format printf.
3539 Use %G to include inlining context.
3540 Set POSUNDER4K here.
3542 2018-10-30 Jan Hubicka <jh@suse.cz>
3544 * params.def (lto-partitions): Bump from 32 to 128.
3546 2018-10-30 Jan Hubicka <jh@suse.cz>
3549 (free_lang_data_d, add_tree_to_fld_list, fld_worklist_push): Move
3551 (free_lang_data_in_type): Forward declare.
3552 (fld_type_variant_equal_p): New function.
3553 (fld_type_variant): New function
3554 (fld_incomplete_types): New hash.
3555 (fld_incomplete_type_of): New function
3556 (fld_simplfied-type): New function.
3557 (free_lang_data_in_decl): Add fld parameter; simplify type of FIELD_DECL
3558 (free_lang_data): Allocate and free fld_incomplete_type; update call
3559 of free_lang_data_in_decl.
3561 2018-10-30 Eric Botcazou <ebotcazou@adacore.com>
3563 * gcov.c (output_lines): Remove duplicate line.
3565 2018-10-30 Aaron Sawdey <acsawdey@linux.ibm.com>
3567 * config/rs6000/rs6000.md (bswapdi2): Force address into register
3568 if not in indexed or indirect form.
3569 (bswapdi2_load): Change predicate to indexed_or_indirect_operand.
3570 (bswapdi2_store): Ditto.
3571 * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem): New
3573 * config/rs6000/rs6000-protos.h (rs6000_force_indexed_or_indirect_mem):
3574 Prototype for helper function.
3576 2018-10-30 Martin Sebor <msebor@redhat.com>
3578 * doc/extend.texi (optimize): Clarify/expand attribute documentation.
3579 (target, pragma GCC optimize, pragma GCC target): Ditto.
3581 2018-10-30 Jonathan Wakely <jwakely@redhat.com>
3583 * doc/extend.texi: Fix prototype and description of
3584 __builtin_expect_with_probability.
3586 2018-10-30 Michael Ploujnikov <michael.ploujnikov@oracle.com>
3588 * cgraph.h (clone_function_name_1): Replaced by new
3589 clone_function_name_numbered that takes name as string; for
3590 privatize_symbol_name_1 use only.
3591 (clone_function_name): Renamed to
3592 clone_function_name_numbered to be explicit about numbering.
3593 (clone_function_name): New two-argument function that does
3594 not number its output.
3595 (clone_function_name): New three-argument function that
3596 takes a number to append to its output.
3597 * cgraphclones.c (duplicate_thunk_for_node):
3598 (clone_function_name_1): Renamed.
3599 (clone_function_name_numbered): Two new functions.
3600 (clone_function_name): Improved documentation.
3601 (cgraph_node::create_virtual_clone): Use clone_function_name_numbered.
3602 * config/rs6000/rs6000.c (make_resolver_func): Ditto.
3603 * final.c (final_scan_insn_1): Use the new clone_function_name
3605 * multiple_target.c (create_dispatcher_calls): Ditto.
3606 (create_target_clone): Ditto.
3607 * omp-expand.c (grid_expand_target_grid_body): Ditto.
3608 * omp-low.c (create_omp_child_function_name): Ditto.
3609 * omp-simd-clone.c (simd_clone_create): Ditto.
3610 * symtab.c (simd_symtab_node::noninterposable_alias): Use the
3611 new clone_function_name without numbering.
3613 2018-10-30 Richard Earnshaw <rearnsha@arm.com>
3615 * alloc-pool.h (base_pool_allocator <TBlockAllocator>::initialize):
3616 Assert that the allocation size is not zero.
3618 2018-10-30 Richard Biener <rguenther@suse.de>
3620 PR tree-optimization/87800
3621 * tree-vect-slp.c (vect_build_slp_tree_2): Reject any
3622 non-induction or reduction PHIs.
3624 2018-10-30 Sameera Deshpande <sameera.deshpande@linaro.org
3626 * config/aarch64/falkor-tag-collision-avoidance.c
3627 (execute_tag_collision_avoidance): Call df_note_add_problem.
3629 2018-10-30 Martin Liska <mliska@suse.cz>
3631 * doc/extend.texi: Fix typo in documentation
3632 of __builtin_expect_with_probability.
3634 2018-10-29 David Malcolm <dmalcolm@redhat.com>
3637 * input.c (get_substring_ranges_for_loc): Detect if
3638 linemap_resolve_location gives us a NULL map, and reject
3641 2018-10-29 Iain Buclaw <ibuclaw@gdcproject.org>
3643 * config.gcc (xstormy16-*-elf): Set tm_d_file.
3645 2018-10-29 David Malcolm <dmalcolm@redhat.com>
3646 Martin Sebor <msebor@redhat.com>
3647 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3649 * doc/ux.texi (Quoting): New subsection, adapted from material at
3650 https://gcc.gnu.org/wiki/DiagnosticsGuidelines written by
3651 MartinSebor and ManuelLopezIbanez.
3652 (Fix-it hints): Note that fix-it hints shouldn't be marked for
3655 2018-10-29 Kugan Vivekanandarajah <kuganv@linaro.org>
3658 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Fix niter
3661 2018-10-29 Paul A. Clarke <pc@us.ibm.com>
3663 * gcc.target/powerpc/ssse3-check.h: Remove inaccurate comment.
3665 2018-10-29 Paul Koning <ni1d@arrl.net>
3667 * doc/rtl.texi (CONST_WIDE_INT_ELT): Give correct macro name.
3669 2018-10-29 Paul A. Clarke <pc@us.ibm.com>
3671 * gcc/config/rs6000/mmintrin.h (_mm_packs_pi16, _mm_packs_pi32,
3672 _mm_packs_pu16, _mm_unpackhi_pi8, _mm_unpacklo_pi8, _mm_add_pi8,
3673 _mm_add_pi16, _mm_add_pi32, _mm_sub_pi8, _mm_sub_pi16, _mm_sub_pi32,
3674 _mm_cmpgt_pi8, _mm_cmpeq_pi16, _mm_cmpgt_pi16, _mm_cmpeq_pi32,
3675 _mm_cmpgt_pi32, _mm_adds_pi8, _mm_adds_pi16, _mm_adds_pu8,
3676 _mm_adds_pu16, _mm_subs_pi8, _mm_subs_pi16, _mm_subs_pu8,
3677 _mm_subs_pu16, _mm_madd_pi16, _mm_mulhi_pi16, _mm_mullo_pi16,
3678 _mm_sll_pi16, _mm_sra_pi16, _mm_srl_pi16, _mm_set1_pi16, _mm_set1_pi8):
3679 Change 'vector' to '__vector'.
3680 * gcc/config/rs6000/xmmintrin.h (_mm_cvtps_pi32, _mm_cvttps_pi32,
3681 _mm_cvtps_pi16, _mm_cvtps_pi8, _mm_max_pi16, _mm_max_pu8, _mm_min_pi16,
3682 _mm_min_pu8, _mm_mulhi_pu16, _mm_shuffle_pi16, _mm_avg_pu8,
3683 _mm_avg_pu16): Likewise. And, whitespace corrections.
3685 2018-10-29 Richard Biener <rguenther@suse.de>
3687 PR tree-optimization/87785
3688 * tree-vect-slp.c (vect_gather_slp_loads): Only gather
3691 2018-10-29 Olivier Hainque <hainque@adacore.com>
3693 * VXWORKS_NET_LIBS_RTP: New macro, network part of VXWORKS_LIBS_RTP.
3695 2018-10-29 Olivier Hainque <hainque@adacore.com>
3697 * config/vxworks.h (VXWORKS_PERSONALITY): New VxWorks
3698 ports configuration macro, defaults to "gnu".
3699 (VXWORKS_OS_CPP_BUILTINS): Use it. Feed TOOL and
3700 TOOL_FAMILY instead of _VX_TOOL/_VXTOOL_FAMILY.
3702 2018-10-29 Olivier Hainque <hainque@adacore.com>
3704 * config/vxworks.h (CLEAR_INSN_CACHE): #undef before #define.
3706 2018-10-29 Richard Biener <rguenther@suse.de>
3708 PR tree-optimization/87790
3709 * tree-vect-slp.c (vect_mark_slp_stmts): Simplify.
3710 (vect_make_slp_decision): Adjust.
3711 (vect_slp_analyze_bb_1): Likewise.
3712 (vect_detect_hybrid_slp_stmts): Properly union SLP type over
3715 2018-10-29 Richard Biener <rguenther@suse.de>
3717 PR tree-optimization/87785
3718 * tree-vect-slp.c (vect_build_slp_tree_2): Remove loads argument
3720 (vect_build_slp_tree): Likewise.
3721 (vect_gather_slp_loads): New function.
3722 (vect_analyze_slp_instance): Gather loads separately from the
3725 2018-10-29 Martin Liska <mliska@suse.cz>
3727 * Makefile.in: Make dependency to json.o.
3728 * doc/gcov.texi: Document new JSON format, remove
3729 old intermediate format documentation.
3730 * gcov.c (struct function_info): Come up with m_name and
3732 (function_info::function_info): Initialize it.
3733 (function_info::~function_info): Release it.
3734 (main): Rename flag_intermediate_format to flag_json_format.
3735 (print_usage): Describe --json-format.
3736 (process_args): Set flag_json_format.
3737 (output_intermediate_line): Remove.
3738 (output_intermediate_json_line): Likewise.
3739 (get_gcov_intermediate_filename): Return new extension
3741 (output_intermediate_file): Implement JSON emission.
3742 (output_json_intermediate_file): Implement JSON emission.
3743 (generate_results): Use ::get_name for function name.
3744 Handle JSON output file.
3745 (read_graph_file): Use ::get_name instead of cplus_demangle.
3746 (read_count_file): Likewise.
3747 (solve_flow_graph): Likewise.
3748 (add_line_counts): Likewise.
3749 (accumulate_line_counts): Use new flag_json_format.
3750 (output_function_details): Use ::get_name instead of cplus_demangle.
3751 (output_lines): Likewise.
3752 * json.cc (test_writing_literals): Add new tests.
3753 * json.h (class literal): Add new boolean constructor.
3755 2018-10-29 Segher Boessenkool <segher@kernel.crashing.org>
3757 PR rtl-optimization/87701
3758 PR rtl-optimization/87780
3759 * combine.c (make_more_copies): Rewrite.
3761 2018-10-28 Kugan Vivekanandarajah <kuganv@linaro.org>
3763 * doc/generic.texi (ABSU_EXPR): Document.
3764 * match.pd (absu(x)*absu(x) -> x*x): Handle.
3765 (absu(absu(X)) -> absu(X)): Likewise.
3766 (absu(-X) -> absu(X)): Likewise.
3767 (absu(X) where X is nonnegative -> X): Likewise.
3769 2018-10-28 Iain Buclaw <ibuclaw@gdcproject.org>
3771 * Makefile.in (tm_d_file_list, tm_d_include_list): New variables.
3772 (TM_D_H, D_TARGET_DEF, D_TARGET_H, D_TARGET_OBJS): New variables.
3773 (tm_d.h, cs-tm_d.h, default-d.o): New rules.
3774 (d/d-target-hooks-def.h, s-d-target-hooks-def-h): New rules.
3775 (s-tm-texi): Also check timestamp on d-target.def.
3776 (generated_files): Add TM_D_H and d-target-hooks-def.h.
3777 (build/genhooks.o): Also depend on D_TARGET_DEF.
3778 * config.gcc (tm_d_file, d_target_objs, target_has_targetdm): New
3780 * config/aarch64/aarch64-d.c: New file.
3781 * config/aarch64/aarch64-linux.h (GNU_USER_TARGET_D_CRITSEC_SIZE):
3783 * config/aarch64/aarch64-protos.h (aarch64_d_target_versions): New
3785 * config/aarch64/aarch64.h (TARGET_D_CPU_VERSIONS): Define.
3786 * config/aarch64/t-aarch64 (aarch64-d.o): New rule.
3787 * config/arm/arm-d.c: New file.
3788 * config/arm/arm-protos.h (arm_d_target_versions): New prototype.
3789 * config/arm/arm.h (TARGET_D_CPU_VERSIONS): Define.
3790 * config/arm/linux-eabi.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
3791 * config/arm/t-arm (arm-d.o): New rule.
3792 * config/default-d.c: New file.
3793 * config/glibc-d.c: New file.
3794 * config/gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
3795 * config/i386/i386-d.c: New file.
3796 * config/i386/i386-protos.h (ix86_d_target_versions): New prototype.
3797 * config/i386/i386.h (TARGET_D_CPU_VERSIONS): Define.
3798 * config/i386/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
3799 (GNU_USER_TARGET_D_CRITSEC_SIZE): Define.
3800 * config/i386/t-i386 (i386-d.o): New rule.
3801 * config/kfreebsd-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
3802 * config/kopensolaris-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
3803 * config/linux-android.h (ANDROID_TARGET_D_OS_VERSIONS): Define.
3804 * config/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
3805 * config/mips/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
3806 * config/mips/mips-d.c: New file.
3807 * config/mips/mips-protos.h (mips_d_target_versions): New prototype.
3808 * config/mips/mips.h (TARGET_D_CPU_VERSIONS): Define.
3809 * config/mips/t-mips (mips-d.o): New rule.
3810 * config/powerpcspe/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
3811 * config/powerpcspe/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
3812 * config/powerpcspe/powerpcspe-d.c: New file.
3813 * config/powerpcspe/powerpcspe-protos.h (rs6000_d_target_versions):
3815 * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
3816 Support GNU D by using 0 as the language type.
3817 * config/powerpcspe/powerpcspe.h (TARGET_D_CPU_VERSIONS): Define.
3818 * config/powerpcspe/t-powerpcspe (powerpcspe-d.o): New rule.
3819 * config/riscv/riscv-d.c: New file.
3820 * config/riscv/riscv-protos.h (riscv_d_target_versions): New
3822 * config/riscv/riscv.h (TARGET_D_CPU_VERSIONS): Define.
3823 * config/riscv/t-riscv (riscv-d.o): New rule.
3824 * config/rs6000/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
3825 * config/rs6000/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
3826 * config/rs6000/rs6000-d.c: New file.
3827 * config/rs6000/rs6000-protos.h (rs6000_d_target_versions): New
3829 * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
3830 Support GNU D by using 0 as the language type.
3831 * config/rs6000/rs6000.h (TARGET_D_CPU_VERSIONS): Define.
3832 * config/rs6000/t-rs6000 (rs6000-d.o): New rule.
3833 * config/s390/s390-d.c: New file.
3834 * config/s390/s390-protos.h (s390_d_target_versions): New prototype.
3835 * config/s390/s390.h (TARGET_D_CPU_VERSIONS): Define.
3836 * config/s390/t-s390 (s390-d.o): New rule.
3837 * config/sparc/sparc-d.c: New file.
3838 * config/sparc/sparc-protos.h (sparc_d_target_versions): New
3840 * config/sparc/sparc.h (TARGET_D_CPU_VERSIONS): Define.
3841 * config/sparc/t-sparc (sparc-d.o): New rule.
3842 * config/t-glibc (glibc-d.o): New rule.
3843 * configure: Regenerated.
3844 * configure.ac (tm_d_file): New variable.
3845 (tm_d_file_list, tm_d_include_list, d_target_objs): Add substitutes.
3846 * doc/contrib.texi (Contributors): Add self for the D frontend.
3847 * doc/frontends.texi (G++ and GCC): Mention D as a supported language.
3848 * doc/install.texi (Configuration): Mention libphobos as an option for
3849 --enable-shared. Mention d as an option for --enable-languages.
3850 (Testing): Mention check-d as a target.
3851 * doc/invoke.texi (Overall Options): Mention .d, .dd, and .di as file
3852 name suffixes. Mention d as a -x option.
3853 * doc/sourcebuild.texi (Top Level): Mention libphobos.
3854 * doc/standards.texi (Standards): Add section on D language.
3855 * doc/tm.texi: Regenerated.
3856 * doc/tm.texi.in: Add @node for D language and ABI, and @hook for
3857 TARGET_CPU_VERSIONS, TARGET_D_OS_VERSIONS, and TARGET_D_CRITSEC_SIZE.
3858 * dwarf2out.c (is_dlang): New function.
3859 (gen_compile_unit_die): Use DW_LANG_D for D.
3860 (declare_in_namespace): Return module die for D, instead of adding
3861 extra declarations into the namespace.
3862 (gen_namespace_die): Generate DW_TAG_module for D.
3863 (gen_decl_die): Handle CONST_DECLSs for D.
3864 (dwarf2out_decl): Likewise.
3865 (prune_unused_types_walk_local_classes): Handle DW_tag_interface_type.
3866 (prune_unused_types_walk): Handle DW_tag_interface_type same as other
3867 kinds of aggregates.
3868 * gcc.c (default_compilers): Add entries for .d, .dd and .di.
3869 * genhooks.c: Include d/d-target.def.
3871 2018-10-28 Iain Sandoe <iain@sandoe.co.uk>
3874 * config/rs6000/darwin.h (STACK_BOUNDARY): New.
3875 (RS6000_STARTING_FRAME_OFFSET): Adjust to preserve 16byte alignment.
3876 (STACK_DYNAMIC_OFFSET): Likewise.
3878 2018-10-27 Sandra Loosemore <sandra@codesourcery.com>
3881 * config/nios2/nios2.c (nios2_valid_target_attribute_rec): Fix
3884 2018-10-26 Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
3886 * doc/extend.texi (PowerPC builtins): Fix __builtin_unpack_ibm128
3887 return type and other typos.
3889 2018-10-26 Aaron Sawdey <acsawdey@linux.ibm.com>
3891 * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Change to
3892 a shorter sequence with fewer branches.
3893 (emit_final_str_compare_gpr): Ditto.
3895 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
3897 * config/rs6000/tmmintrin.h: New file.
3898 * config.gcc (powerpc*-*-*): Add tmmintrin.h to extra_headers.
3900 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
3902 * config/rs6000/mmintrin.h: Enable 32bit compilation.
3903 * config/rs6000/xmmintrin.h: Likewise.
3905 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
3907 * config/rs6000/xmmintrin.h (_mm_extract_pi16): Fix for big-endian.
3909 2018-10-26 Richard Biener <rguenther@suse.de>
3911 * tree-vect-slp.c (vect_mark_slp_stmts): Add visited hash_set
3913 (vect_mark_slp_stmts_relevant): Likewise.
3914 (vect_detect_hybrid_slp_stmts): Likewise.
3915 (vect_bb_slp_scalar_cost): Likewise.
3916 (vect_remove_slp_scalar_calls): Likewise.
3918 2018-10-26 Jan Hubicka <jh@suse.cz>
3920 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix recursion.
3921 (warn_types_mismatch): Fix walk of DECL_NAME.
3922 (odr_types_equivalent_p): Fix overactive assert.
3924 2018-10-26 Richard Biener <rguenther@suse.de>
3926 PR tree-optimization/87105
3927 * tree-vectorizer.h (_slp_tree::refcnt): New member.
3928 * tree-vect-slp.c (vect_free_slp_tree): Decrement and honor
3930 (vect_create_new_slp_node): Initialize refcnt to one.
3932 (scalar_stmts_set_t, bst_fail): Remove.
3933 (vect_build_slp_tree_2): Add bst_map argument and adjust calls.
3934 (vect_build_slp_tree): Add bst_map argument and lookup
3935 already created SLP nodes.
3936 (vect_print_slp_tree): Handle a SLP graph, print SLP node
3938 (vect_slp_rearrange_stmts): Handle a SLP graph.
3939 (vect_analyze_slp_instance): Adjust and free SLP nodes from
3940 the CSE map. Fix indenting.
3941 (vect_schedule_slp_instance): Add short-cut.
3943 2018-10-26 Martin Liska <mliska@suse.cz>
3946 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Hash with
3947 addr_expr and not with pointers.
3949 2018-10-26 Jan Hubicka <jh@suse.cz>
3951 * tree.c (free_lang_data_in_type): Only check main variants.
3952 * ipa-devirt.c (warn_odr): Make static.
3953 (types_same_for_odr): Drop strict variant.
3954 (types_odr_comparable): Likewise.
3955 (odr_or_derived_type_p): Look for main variants.
3956 (odr_name_hasher::equal): Cleanup comment.
3957 (odr_subtypes_equivalent): Add warn and warned arguments; check main
3959 (type_variants_equivalent_p): break out from ...
3960 (odr_types_equivalent): ... here; go for main variants where needed.
3961 (warn_odr): ... here; turn static.
3962 (warn_types_mismatch): Compare mangled names of main variants.
3963 * ipa-utils.h (types_odr_comparable): Drop strict parameter.
3964 (type_with_linkage_p): Sanity check that we look at main variant.
3965 * lto.c (lto_read_decls): Only consider main variant to be ODR type.
3966 * tree.h (types_same_for_odr): Drop strict argument.
3968 2018-10-26 Richard Biener <rguenther@suse.de>
3970 PR tree-optimization/87746
3971 * tree-vect-data-refs.c (vect_update_misalignment_for_peel):
3972 Simplify and fix WRT strided store groups with size not
3973 equal to step in element count.
3974 (vect_analyze_group_access_1): Dump the whole group.
3976 2018-10-25 Carl Love <cel@us.ibm.com>
3978 * config/rs6000/rs6000-c.c (P9V_BUILTIN_VEC_VSCEDPGT,
3979 P9V_BUILTIN_VEC_VSCEDPLT, P9V_BUILTIN_VEC_VSCEDPEQ,
3980 P9V_BUILTIN_VEC_VSCEDPUO): Rename base overloaded name. Add quad
3981 precicion entry for each overloaded builtin.
3982 * config/rs6000/rs6000-builtin.def (VSCEDPGT, VSCEDPLT, VSCEDPEQ,
3983 VSCEDPUO): Rename overloaded name.
3984 (VSCEDPGT, VSCEQPGT, VSCEDPLT, VSCEQPLT, VSCEDPEQ, VSCEQPEQ,
3985 VSCEDPUO, VSCEQPUO): Add defitions for overloaded builtins.
3986 * config/rs6000/vsx.md (xscmpexpqp_<code>_<mode>): Add
3987 define_expand for xscmpexqp instruction.
3988 (*xscmpexpqp): Add define_insn for the xscmpexqp instruction.
3990 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
3991 Jinsong Ji <jji@us.ibm.com>
3993 * config/rs6000/emmintrin.h (_mm_slli_epi16): Replace deprecated
3994 function with vec_sl.
3995 (_mm_slli_epi32): Likewise.
3996 (_mm_slli_epi64): Likewise.
3997 (_mm_srai_epi16): Replace deprecated function with vec_sra.
3998 (_mm_srai_epi32): Likewise.
3999 (_mm_srli_epi16): Replace deprecated function with vec_sr.
4000 (_mm_srli_epi32): Likewise.
4001 (_mm_srli_epi64): Likewise.
4002 (_mm_sll_epi16): Replace deprecated function with vec_sl.
4003 (_mm_sll_epi32): Likewise.
4004 (_mm_sll_epi64): Likewise.
4005 (_mm_sra_epi16): Replace deprecated function with vec_sra.
4006 (_mm_sra_epi32): Likewise.
4007 (_mm_srl_epi16): Replace deprecated function with vec_sr.
4008 (_mm_srl_epi32): Likewise.
4009 (_mm_srl_epi64): Likewise.
4011 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
4012 Jinsong Ji <jji@us.ibm.com>
4014 * gcc/config/rs6000/emmintrin.h (_mm_sll_epi16): Replace
4015 comparison operators with vec_cmp* for compatibility due to
4016 unfortunate history; clean up formatting and use types more
4018 (_mm_sll_epi32): Likewise.
4019 (_mm_sll_epi64): Likewise.
4020 (_mm_srl_epi16): Likewise.
4021 (_mm_srl_epi32): Likewise.
4022 (_mm_srl_epi64): Likewise.
4024 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
4025 Jinsong Ji <jji@us.ibm.com>
4027 * config/rs6000/emmintrin.h (_mm_sll_epi64): Remove wrong cast.
4028 * config/rs6000/xmmintrin.h (_mm_min_ps): Change m's type to
4029 __vector __bool int. Use vec_cmpgt in preference to deprecated
4030 function vec_vcmpgtfp.
4031 (_mm_max_ps): Likewise.
4033 2018-10-25 Jeff Law <law@redhat.com>
4035 * config/rl78/rl78.c (insn_ok_now): Always re-recognize the insn
4038 2018-10-25 Martin Sebor <msebor@redhat.com>
4040 * doc/extend.texi (aligned): Expand attribute description.
4041 (Alignment): Rename section. Discuss function arguments.
4043 2018-10-25 Jan Hubicka <jh@suse.cz>
4045 * ipa-devirt.c (main_odr_variant): Remove.
4046 (hash_odr_name, types_same_for_odr, types_odr_comparable,
4047 odr_name_hasher::equal, odr_subtypes_equivalent_p):
4048 Drop use of main_odr_variant.
4049 (add_type_duplicate): Silence confused warnings on integer types.
4050 (get_odr_type): Always look for main variant.
4051 (register_odr_type): Simplify.
4053 2018-10-25 Richard Biener <rguenther@suse.de>
4055 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses):
4056 Initialize ng to silence error with release checking bootstrap.
4058 2018-10-25 Richard Biener <rguenther@suse.de>
4060 * tree-if-conv.c: Include tree-ssa-sccvn.h.
4061 (tree_if_conversion): Run CSE on the if-converted loop body.
4063 2018-10-25 Ilya Leoshkevich <iii@linux.ibm.com>
4065 * config/s390/constraints.md (ZL): New constraint.
4066 * config/s390/s390.c (legitimate_pic_operand_p): Accept LARL
4068 * config/s390/s390.md (movdi_larl): Remove.
4069 (movdi_64): Add the LARL alternative.
4071 2018-10-25 Ilya Leoshkevich <iii@linux.ibm.com>
4074 * rtl.c (RTX_CODE_HWINT_P_1): New helper macro.
4075 (RTX_CODE_HWINT_P): New macro.
4076 (rtx_code_size): Use RTX_CODE_HWINT_P ().
4078 2018-10-25 Jan Hubicka <jh@suse.cz>
4080 * ipa-devirt.c (odr_types_equivalent_p): Do not ICE if one of types
4083 2018-10-25 Richard Biener <rguenther@suse.de>
4085 PR tree-optimization/87665
4086 PR tree-optimization/87745
4087 * tree-vectorizer.h (get_earlier_stmt): Remove.
4088 (get_later_stmt): Pick up UID from the original non-pattern stmt.
4090 2018-10-25 Sam Tebbs <sam.tebbs@arm.com>
4092 * options.texi (Deprecated): Move list to Var section.
4094 2018-10-24 Bill Schmidt <wschmidt@linux.ibm.com>
4095 Jinsong Ji <jji@us.ibm.com>
4097 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Change deprecated
4098 __vector long to __vector long long.
4099 (_mm_cvtpd_ps): Likewise.
4100 (_mm_cvttpd_epi32): Likewise.
4101 (_mm_cvtpi32_pd): Likewise.
4102 (_mm_unpackhi_epi64): Likewise.
4103 (_mm_unpacklo_epi64): Likewise.
4105 2018-10-24 Segher Boessenkool <segher@kernel.crashing.org>
4107 PR rtl-optimization/87720
4108 * combine.c (make_more_copies): Skip if the dest is pc_rtx.
4110 2018-10-24 Alexandre Oliva <aoliva@redhat.com>
4112 * gimple-ssa-isolate-paths.c
4113 (find_implicit_erroneous_behavior): Do not change code if the
4114 pass is running for warnings only.
4115 (find_explicit_erroneous_behavior): Likewise.
4117 2018-10-24 Michael Meissner <meissner@linux.ibm.com>
4119 * config/rs6000/rs6000.c (TARGET_MANGLE_DECL_ASSEMBLER_NAME):
4120 Define as rs6000_mangle_decl_assembler_name.
4121 (rs6000_mangle_decl_assembler_name): If the user switched from IBM
4122 long double to IEEE long double, switch the names of the long
4123 double built-in functions to be <func>f128 instead of <func>l.
4125 2018-10-24 Martin Sebor <msebor@redhat.com>
4127 * doc/extend.texi (nonnull): List no-argument form. Reference
4128 -fno-delete-null-pointer-checks and -fisolate-erroneous-paths-attribute.
4130 2018-10-24 Richard Biener <rguenther@suse.de>
4132 * tree-ssa-sccvn.c (do_rpo_vn): Free rpo_state.
4134 2018-10-24 Martin Liska <mliska@suse.cz>
4136 PR tree-optimization/84436
4137 * tree-switch-conversion.c (switch_conversion::contains_same_values_p):
4139 (switch_conversion::contains_linear_function_p): New.
4140 (switch_conversion::build_one_array): Support linear
4141 transformation on input.
4142 * tree-switch-conversion.h (struct switch_conversion): Add
4143 contains_linear_function_p declaration.
4145 2018-10-24 Richard Biener <rguenther@suse.de>
4147 * varasm.c (const_hash_1): Return hash of ADDR_EXPR
4148 if its argument is CONSTANT_CLASS_P.
4150 2018-10-11 Jan Hubicka <hubicka@ucw.cz>
4152 * ipa-utils.h (type_with_linkage_p): No longer check for TYPE_STUB_DECL;
4153 it is wrong for forward declarations.
4155 2018-10-24 Ilya Leoshkevich <iii@linux.ibm.com>
4157 * config/s390/s390.c (s390_check_qrst_address): Add the missing
4158 SYMBOL_REF_P () check.
4160 2018-10-24 Richard Biener <rguenther@suse.de>
4162 PR tree-optimization/87105
4163 * tree-vect-data-refs.c (vect_analyze_group_access_1): Adjust
4164 dump classification.
4165 (vect_analyze_data_ref_accesses): Handle duplicate loads and
4166 stores by splitting the affected group after the fact.
4167 * tree-vect-slp.c (vect_build_slp_tree_2): Dump when we
4168 fail the SLP build because of size constraints.
4170 2018-10-24 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4172 * configure.ac (gcc_cv_ld_aligned_shf_merge): New test.
4173 * configure: Regenerate.
4174 * config.in: Regenerate.
4175 * varasm.c (mergeable_string_section): Use readonly_data_section
4176 if linker doesn't support SHF_MERGE with alignment > 8.
4177 (mergeable_constant_section): Likewise.
4179 2018-10-24 Richard Biener <rguenther@suse.de>
4181 PR tree-optimization/84013
4182 * tree-ssa-structalias.c (struct msdi_data): New struct for
4183 marshalling data to walk_stmt_load_store_ops.
4184 (maybe_set_dependence_info): Refactor as callback for
4185 walk_stmt_load_store_ops.
4186 (compute_dependence_clique): Set restrict info on all stmt kinds.
4188 2018-10-24 Martin Liska <mliska@suse.cz>
4190 * cgraph.c (cgraph_node::dump):
4191 Remove reduntant dumps and make tp_first_run dump more compact.
4193 2018-10-24 Richard Biener <rguenther@suse.de>
4195 PR tree-optimization/87665
4196 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Adjust
4199 2018-10-12 Jeff Law <law@redhat.com>
4201 * config/h8300/h8300.c (h8300_expand_prologue): Fix stm generation
4204 2018-10-23 Richard Biener <rguenther@suse.de>
4206 * tree-vrp.c (add_assert_info): Guard dump_printf with
4208 * gimple-ssa-evrp-analyze.c
4209 (evrp_range_analyzer::record_ranges_from_incoming_edge):
4210 Use value_range::ignore_equivs_equal_p.
4212 2018-10-23 Richard Biener <rguenther@suse.de>
4214 PR tree-optimization/87105
4215 PR tree-optimization/87608
4216 * passes.def (pass_all_early_optimizations): Add early phi-opt
4218 * tree-ssa-phiopt.c (value_replacement): Ignore NOPs and predicts in
4219 addition to debug stmts.
4220 (tree_ssa_phiopt_worker): Add early_p argument, do only min/max
4221 and abs replacement early.
4222 * tree-cfg.c (gimple_empty_block_p): Likewise.
4224 2018-10-23 Richard Earnshaw <rearnsha@arm.com>
4227 * config.gcc (arm*-*-netbsdelf*): Default to StrongARM if no CPU
4228 specified to configure.
4229 (arm*-*-*): Use ARM7TDMI as the target CPU if no default provided.
4231 2018-10-23 Richard Biener <rguenther@suse.de>
4233 PR tree-optimization/87700
4234 * tree-ssa-copy.c (set_copy_of_val): Fix change detection logic.
4236 2018-10-23 Jakub Jelinek <jakub@redhat.com>
4239 * config/i386/avx512vlintrin.h (_mm_mask_mullo_epi32): Change type of
4240 second argument from __mmask16 to __mmask8.
4241 * config/i386/avx512vlbwintrin.h (_mm_mask_packus_epi32,
4242 _mm_mask_packs_epi32): Likewise.
4243 * config/i386/avx512pfintrin.h (_mm512_mask_prefetch_i64scatter_ps):
4245 (_mm512_mask_prefetch_i64scatter_pd): Likewise. Formatting fix.
4247 2018-10-23 Richard Biener <rguenther@suse.de>
4249 * tree-vect-stmts.c (vect_analyze_stmt): Fix typo in comment.
4251 2018-10-23 Richard Biener <rguenther@suse.de>
4253 PR tree-optimization/86144
4254 * tree-vect-stmts.c (vect_analyze_stmt): Prefer -mveclibabi
4255 over simd attribute.
4257 2018-10-23 Richard Biener <rguenther@suse.de>
4259 PR tree-optimization/87693
4260 * tree-ssa-threadedge.c (thread_around_empty_blocks): Handle
4261 the case we do not find the taken edge.
4263 2018-10-22 Bill Schmidt <wschmidt@linux.ibm.com>
4264 Jinsong Ji <jji@us.ibm.com>
4266 * config/rs6000/emmintrin.h (_MM_SHUFFLE2): Comment cleanup.
4267 (_mm_store_pd): Use unaligned vector type for pointer cast.
4268 (_mm_maskmoveu_si128): Likewise.
4269 * config/rs6000/xmmintrin.h (__m128_u): New typedef.
4270 (_mm_store_ps): Use unaligned vector type for pointer cast.
4272 2018-10-22 Paul Koning <ni1d@arrl.net>
4274 * symtab.c (symtab_node::increase_alignment): Correct max
4277 2018-10-22 Yury Gribov <tetra2005@gmail.com>
4279 PR tree-optimization/87633
4280 * match.pd: Do not generate unordered integer comparisons.
4282 2018-10-22 Segher Boessenkool <segher@kernel.crashing.org>
4284 PR rtl-optimization/87600
4285 * combine.c: Add include of expr.h.
4286 (cant_combine_insn_p): Do not combine moves from any hard non-fixed
4287 register to a pseudo.
4288 (make_more_copies): New function, add a copy to a new pseudo after
4289 the moves from hard registers into pseudos.
4290 (rest_of_handle_combine): Declare rebuild_jump_labels_after_combine
4291 later. Call make_more_copies.
4293 2018-10-22 Andrew Stubbs <ams@codesourcery.com>
4295 * lra-constraints.c (process_alt_operands): New local array,
4296 matching_early_clobber. Check matching_early_clobber before
4297 decrementing reject, and set matching_early_clobber after.
4299 2018-10-22 Segher Boessenkool <segher@kernel.crashing.org>
4302 * config/rs6000/rs6000.c (print_operand_address): For unexpected RTL
4303 call output_addr_const and hope for the best.
4305 2018-10-22 Richard Biener <rguenther@suse.de>
4307 * gimple-ssa-evrp-analyze.c
4308 (evrp_range_analyzer::record_ranges_from_incoming_edge): Be
4309 smarter about what ranges to use.
4310 * tree-vrp.c (add_assert_info): Dump here.
4311 (register_edge_assert_for_2): Instead of here at multiple but
4314 * gcc.dg/tree-ssa/evrp12.c: New testcase.
4315 * gcc.dg/predict-6.c: Adjust.
4316 * gcc.dg/tree-ssa/vrp33.c: Disable EVRP.
4317 * gcc.dg/tree-ssa/vrp02.c: Likewise.
4318 * gcc.dg/tree-ssa/cunroll-9.c: Likewise.
4320 2018-10-22 Steven Bosscher <steven@gcc.gnu.org>
4321 Richard Biener <rguenther@suse.de>
4323 * bitmap.h: Update data structure documentation, including a
4324 description of bitmap views as either linked-lists or splay trees.
4325 (struct bitmap_element_def): Update comments for splay tree bitmaps.
4326 (struct bitmap_head_def): Likewise.
4327 (bitmap_list_view, bitmap_tree_view): New prototypes.
4328 (bitmap_initialize_stat): Initialize a bitmap_head's indx and
4330 (bmp_iter_set_init): Assert the iterated bitmaps are in list form.
4331 (bmp_iter_and_init, bmp_iter_and_compl_init): Likewise.
4332 * bitmap.c (bitmap_elem_to_freelist): Unregister overhead of a
4333 released bitmap element here.
4334 (bitmap_element_free): Remove.
4335 (bitmap_elt_clear_from): Work on splay tree bitmaps.
4336 (bitmap_list_link_element): Renamed from bitmap_element_link. Move
4337 this function similar ones such that linked-list bitmap implementation
4338 functions are grouped.
4339 (bitmap_list_unlink_element): Renamed from bitmap_element_unlink,
4340 and moved for grouping.
4341 (bitmap_list_insert_element_after): Renamed from
4342 bitmap_elt_insert_after, and moved for grouping.
4343 (bitmap_list_find_element): New function spliced from bitmap_find_bit.
4344 (bitmap_tree_link_left, bitmap_tree_link_right,
4345 bitmap_tree_rotate_left, bitmap_tree_rotate_right, bitmap_tree_splay,
4346 bitmap_tree_link_element, bitmap_tree_unlink_element,
4347 bitmap_tree_find_element): New functions for splay-tree bitmap
4349 (bitmap_element_link, bitmap_element_unlink, bitmap_elt_insert_after):
4350 Renamed and moved, see above entries.
4351 (bitmap_tree_listify_from): New function to convert part of a splay
4352 tree bitmap to a linked-list bitmap.
4353 (bitmap_list_view): Convert a splay tree bitmap to linked-list form.
4354 (bitmap_tree_view): Convert a linked-list bitmap to splay tree form.
4355 (bitmap_find_bit): Remove.
4356 (bitmap_clear, bitmap_clear_bit, bitmap_set_bit,
4357 bitmap_single_bit_set_p, bitmap_first_set_bit, bitmap_last_set_bit):
4358 Handle splay tree bitmaps.
4359 (bitmap_copy, bitmap_count_bits, bitmap_and, bitmap_and_into,
4360 bitmap_elt_copy, bitmap_and_compl, bitmap_and_compl_into,
4361 bitmap_compl_and_into, bitmap_elt_ior, bitmap_ior, bitmap_ior_into,
4362 bitmap_xor, bitmap_xor_into, bitmap_equal_p, bitmap_intersect_p,
4363 bitmap_intersect_compl_p, bitmap_ior_and_compl,
4364 bitmap_ior_and_compl_into, bitmap_set_range, bitmap_clear_range,
4365 bitmap_hash): Reject trying to act on splay tree bitmaps. Make
4366 corresponding changes to use linked-list specific bitmap_element
4367 manipulation functions as applicable for efficiency.
4368 (bitmap_tree_to_vec): New function.
4369 (debug_bitmap_elt_file): New function split out from ...
4370 (debug_bitmap_file): ... here. Handle splay tree bitmaps.
4371 (bitmap_print): Likewise.
4373 PR tree-optimization/63155
4374 * tree-ssa-propagate.c (ssa_prop_init): Use tree-view for the
4376 * tree-ssa-coalesce.c (coalesce_ssa_name): Populate used_in_copies
4379 2018-10-22 Martin Liska <mliska@suse.cz>
4381 PR tree-optimization/87686
4383 2018-08-29 Martin Liska <mliska@suse.cz>
4385 * tree-switch-conversion.c (switch_conversion::expand):
4386 Strenghten assumption about gswitch statements.
4388 2018-10-22 Martin Liska <mliska@suse.cz>
4390 * ipa-icf.c (sem_item::compare_attributes): Remove.
4391 (sem_item::compare_referenced_symbol_properties): Use
4392 attribute_list_equal instead.
4393 (sem_function::equals_wpa): Likewise.
4394 * ipa-icf.h: Remove compare_attributes.
4396 2018-10-22 Richard Biener <rguenther@suse.de>
4399 * mem-stats.h (mem_usage::operator==): Fix pasto.
4401 2018-10-22 Richard Biener <rguenther@suse.de>
4403 PR tree-optimization/87640
4404 * tree-vrp.c (set_value_range_with_overflow): Decompose
4406 (extract_range_from_binary_expr_1): Adjust.
4408 2018-10-22 Martin Jambor <mjambor@suse.cz>
4410 * tree-eh.h (stmt_could_throw_p): Add function parameter.
4411 (stmt_can_throw_external): Likewise.
4412 (stmt_can_throw_internal): Likewise.
4413 * tree-eh.c (lower_eh_constructs_2): Pass cfun to stmt_could_throw_p.
4414 (lower_eh_constructs_2): Likewise.
4415 (stmt_could_throw_p): Add fun parameter, use it instead of cfun.
4416 (stmt_can_throw_external): Likewise.
4417 (stmt_can_throw_internal): Likewise.
4418 (maybe_clean_eh_stmt_fn): Pass cfun to stmt_could_throw_p.
4419 (maybe_clean_or_replace_eh_stmt): Pass cfun to stmt_could_throw_p.
4420 (maybe_duplicate_eh_stmt_fn): Pass new_fun to stmt_could_throw_p.
4421 (maybe_duplicate_eh_stmt): Pass cfun to stmt_could_throw_p.
4422 (pass_lower_eh_dispatch::execute): Pass cfun to
4423 stmt_can_throw_external.
4424 (cleanup_empty_eh): Likewise.
4425 (verify_eh_edges): Pass cfun to stmt_could_throw_p.
4426 * cgraph.c (cgraph_edge::set_call_stmt): Pass a function to
4427 stmt_can_throw_external instead of pushing it to cfun.
4428 (symbol_table::create_edge): Likewise.
4429 * gimple-fold.c (fold_builtin_atomic_compare_exchange): Pass cfun to
4430 stmt_can_throw_internal.
4431 * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Pass cfun
4432 to stmt_could_throw_p.
4433 * gimple-ssa-store-merging.c (handled_load): Pass cfun to
4434 stmt_can_throw_internal.
4435 (pass_store_merging::execute): Likewise.
4436 * gimple-ssa-strength-reduction.c
4437 (find_candidates_dom_walker::before_dom_children): Pass cfun to
4439 * gimplify-me.c (gimple_regimplify_operands): Pass cfun to
4440 stmt_can_throw_internal.
4441 * ipa-pure-const.c (check_call): Pass cfun to stmt_could_throw_p and
4442 to stmt_can_throw_external.
4443 (check_stmt): Pass cfun to stmt_could_throw_p.
4444 (check_stmt): Pass cfun to stmt_can_throw_external.
4445 (pass_nothrow::execute): Likewise.
4446 * trans-mem.c (expand_call_tm): Pass cfun to stmt_can_throw_internal.
4447 * tree-cfg.c (is_ctrl_altering_stmt): Pass cfun to
4448 stmt_can_throw_internal.
4449 (verify_gimple_in_cfg): Pass cfun to stmt_could_throw_p.
4450 (stmt_can_terminate_bb_p): Pass cfun to stmt_can_throw_external.
4451 (gimple_purge_dead_eh_edges): Pass cfun to stmt_can_throw_internal.
4452 * tree-complex.c (expand_complex_libcall): Pass cfun to
4453 stmt_could_throw_p and to stmt_can_throw_internal.
4454 (expand_complex_multiplication): Pass cfun to stmt_can_throw_internal.
4455 * tree-inline.c (copy_edges_for_bb): Likewise.
4456 (maybe_move_debug_stmts_to_successors): Likewise.
4457 * tree-outof-ssa.c (ssa_is_replaceable_p): Pass cfun to
4459 * tree-parloops.c (oacc_entry_exit_ok_1): Likewise.
4460 * tree-sra.c (scan_function): Pass cfun to stmt_can_throw_external.
4461 * tree-ssa-alias.c (stmt_kills_ref_p): Pass cfun to
4462 stmt_can_throw_internal.
4463 * tree-ssa-ccp.c (optimize_atomic_bit_test_and): Likewise.
4464 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Pass cfun to
4466 (mark_aliased_reaching_defs_necessary_1): Pass cfun to
4467 stmt_can_throw_internal.
4468 * tree-ssa-forwprop.c (pass_forwprop::execute): Likewise.
4469 * tree-ssa-loop-im.c (movement_possibility): Pass cfun to
4471 * tree-ssa-loop-ivopts.c (find_givs_in_stmt_scev): Likewise.
4472 (add_autoinc_candidates): Pass cfun to stmt_can_throw_internal.
4473 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
4474 (convert_mult_to_fma_1): Likewise.
4475 (convert_to_divmod): Likewise.
4476 * tree-ssa-phiprop.c (propagate_with_phi): Likewise.
4477 * tree-ssa-pre.c (compute_avail): Pass cfun to stmt_could_throw_p.
4478 * tree-ssa-propagate.c
4479 (substitute_and_fold_dom_walker::before_dom_children): Likewise.
4480 * tree-ssa-reassoc.c (suitable_cond_bb): Likewise.
4481 (maybe_optimize_range_tests): Likewise.
4482 (linearize_expr_tree): Likewise.
4483 (reassociate_bb): Likewise.
4484 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
4485 * tree-ssa-scopedtables.c (hashable_expr_equal_p): Likewise.
4486 * tree-ssa-strlen.c (adjust_last_stmt): Likewise.
4487 (handle_char_store): Likewise.
4488 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Pass cfun to
4489 stmt_can_throw_internal.
4490 * tree-vect-patterns.c (check_bool_pattern): Pass cfun to
4492 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
4493 (vectorizable_call): Pass cfun to stmt_can_throw_internal.
4494 (vectorizable_simd_clone_call): Likewise.
4495 * value-prof.c (gimple_ic): Pass cfun to stmt_could_throw_p.
4496 (gimple_stringop_fixed_value): Likewise.
4498 2018-10-22 Ilya Leoshkevich <iii@linux.ibm.com>
4500 * config/s390/s390.c (s390_loadrelative_operand_p): Accept
4501 literal pool references.
4502 (s390_check_qrst_address): Adapt to the new behavior of
4503 s390_loadrelative_operand_p ().
4505 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
4508 * config/i386/sse.md (*andnot<mode>3_bcst): New.
4510 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
4513 * config/i386/sse.md (*<code><mode>3_bcst): New.
4515 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
4518 * config/i386/sse.md (avx512bcst): Updated for V4SI, V2DI, V8SI,
4519 V4DI, V16SI and V8DI.
4520 (*sub<mode>3<mask_name>_bcst): New.
4521 (*add<mode>3<mask_name>_bcst): Likewise.
4523 2018-10-21 Bill Schmidt <wschmidt@linux.ibm.com>
4524 Jinsong Ji <jji@us.ibm.com>
4526 * config/rs6000/emmintrin.h (_mm_movemask_pd): Replace __vector
4527 __m64 with __vector unsigned long long for compatibility.
4528 (_mm_movemask_epi8): Likewise.
4529 * config/rs6000/xmmintrin.h (_mm_cvtps_pi32): Likewise.
4530 (_mm_cvttps_pi32): Likewise.
4531 (_mm_cvtpi32_ps): Likewise.
4532 (_mm_cvtps_pi16): Likewise.
4533 (_mm_loadh_pi): Likewise.
4534 (_mm_storeh_pi): Likewise.
4535 (_mm_movehl_ps): Likewise.
4536 (_mm_movelh_ps): Likewise.
4537 (_mm_loadl_pi): Likewise.
4538 (_mm_storel_pi): Likewise.
4539 (_mm_movemask_ps): Likewise.
4540 (_mm_shuffle_pi16): Likewise.
4542 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
4545 * config/i386/avx512fintrin.h (_mm512_fnmsub_round_pd): Use
4546 __builtin_ia32_vfnmsubpd512_mask.
4547 (_mm512_mask_fnmsub_round_pd): Likewise.
4548 (_mm512_fnmsub_pd): Likewise.
4549 (_mm512_mask_fnmsub_pd): Likewise.
4550 (_mm512_maskz_fnmsub_round_pd): Use
4551 __builtin_ia32_vfnmsubpd512_maskz.
4552 (_mm512_maskz_fnmsub_pd): Likewise.
4553 (_mm512_fnmsub_round_ps): Use __builtin_ia32_vfnmsubps512_mask.
4554 (_mm512_mask_fnmsub_round_ps): Likewise.
4555 (_mm512_fnmsub_ps): Likewise.
4556 (_mm512_mask_fnmsub_ps): Likewise.
4557 (_mm512_maskz_fnmsub_round_ps): Use
4558 __builtin_ia32_vfnmsubps512_maskz.
4559 (_mm512_maskz_fnmsub_ps): Likewise.
4560 * config/i386/avx512vlintrin.h (_mm256_mask_fnmsub_pd): Use
4561 __builtin_ia32_vfnmsubpd256_mask.
4562 (_mm256_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256_maskz.
4563 (_mm_mask_fnmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
4564 (_mm_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd128_maskz.
4565 (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
4566 (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
4567 (_mm256_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_maskz.
4568 (_mm_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_mask.
4569 (_mm_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_maskz.
4570 * config/i386/fmaintrin.h (_mm_fnmsub_pd): Use
4571 __builtin_ia32_vfnmsubpd.
4572 (_mm256_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256.
4573 (_mm_fnmsub_ps): Use __builtin_ia32_vfnmsubps.
4574 (_mm256_fnmsub_ps): Use __builtin_ia32_vfnmsubps256.
4575 (_mm_fnmsub_sd): Use __builtin_ia32_vfnmsubsd3.
4576 (_mm_fnmsub_ss): Use __builtin_ia32_vfnmsubss3.
4577 * config/i386/i386-builtin.def: Add
4578 __builtin_ia32_vfnmsubpd256_mask,
4579 __builtin_ia32_vfnmsubpd256_maskz,
4580 __builtin_ia32_vfnmsubpd128_mask,
4581 __builtin_ia32_vfnmsubpd128_maskz,
4582 __builtin_ia32_vfnmsubps256_mask,
4583 __builtin_ia32_vfnmsubps256_maskz,
4584 __builtin_ia32_vfnmsubps128_mask,
4585 __builtin_ia32_vfnmsubps128_maskz,
4586 __builtin_ia32_vfnmsubpd512_mask,
4587 __builtin_ia32_vfnmsubpd512_maskz,
4588 __builtin_ia32_vfnmsubps512_mask,
4589 __builtin_ia32_vfnmsubps512_maskz, __builtin_ia32_vfnmsubss3,
4590 __builtin_ia32_vfnmsubsd3, __builtin_ia32_vfnmsubps,
4591 __builtin_ia32_vfnmsubpd, __builtin_ia32_vfnmsubps256 and.
4592 __builtin_ia32_vfnmsubpd256.
4593 * config/i386/sse.md (fma4i_fnmsub_<mode>): New.
4594 (<avx512>_fnmsub_<mode>_maskz<round_expand_name>): Likewise.
4595 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_1):
4597 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_2):
4599 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_3):
4601 (fmai_vmfnmsub_<mode><round_name>): Likewise.
4603 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
4606 * config/i386/avx512fintrin.h (_mm512_fnmadd_round_pd): Use
4607 __builtin_ia32_vfnmaddpd512_mask.
4608 (_mm512_mask_fnmadd_round_pd): Likewise.
4609 (_mm512_fnmadd_pd): Likewise.
4610 (_mm512_mask_fnmadd_pd): Likewise.
4611 (_mm512_maskz_fnmadd_round_pd): Use
4612 __builtin_ia32_vfnmaddpd512_maskz.
4613 (_mm512_maskz_fnmadd_pd): Likewise.
4614 (_mm512_fnmadd_round_ps): Use __builtin_ia32_vfnmaddps512_mask.
4615 (_mm512_mask_fnmadd_round_ps): Likewise.
4616 (_mm512_fnmadd_ps): Likewise.
4617 (_mm512_mask_fnmadd_ps): Likewise.
4618 (_mm512_maskz_fnmadd_round_ps): Use
4619 __builtin_ia32_vfnmaddps512_maskz.
4620 (_mm512_maskz_fnmadd_ps): Likewise.
4621 * config/i386/avx512vlintrin.h (_mm256_mask_fnmadd_pd): Use
4622 __builtin_ia32_vfnmaddpd256_mask.
4623 (_mm256_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256_maskz.
4624 (_mm_mask_fnmadd_pd): Use __builtin_ia32_vfmaddpd128_mask
4625 (_mm_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd128_maskz.
4626 (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
4627 (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
4628 (_mm256_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_maskz.
4629 (_mm_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_mask.
4630 (_mm_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_maskz.
4631 * config/i386/fmaintrin.h (_mm_fnmadd_pd): Use
4632 __builtin_ia32_vfnmaddpd.
4633 (_mm256_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256.
4634 (_mm_fnmadd_ps): Use __builtin_ia32_vfnmaddps.
4635 (_mm256_fnmadd_ps): Use __builtin_ia32_vfnmaddps256.
4636 (_mm_fnmadd_sd): Use __builtin_ia32_vfnmaddsd3.
4637 (_mm_fnmadd_ss): Use __builtin_ia32_vfnmaddss3.
4638 * config/i386/i386-builtin.def: Add
4639 __builtin_ia32_vfnmaddpd256_mask,
4640 __builtin_ia32_vfnmaddpd256_maskz,
4641 __builtin_ia32_vfnmaddpd128_mask,
4642 __builtin_ia32_vfnmaddpd128_maskz,
4643 __builtin_ia32_vfnmaddps256_mask,
4644 __builtin_ia32_vfnmaddps256_maskz,
4645 __builtin_ia32_vfnmaddps128_mask,
4646 __builtin_ia32_vfnmaddps128_maskz,
4647 __builtin_ia32_vfnmaddpd512_mask,
4648 __builtin_ia32_vfnmaddpd512_maskz,
4649 __builtin_ia32_vfnmaddps512_mask,
4650 __builtin_ia32_vfnmaddps512_maskz, __builtin_ia32_vfnmaddss3,
4651 __builtin_ia32_vfnmaddsd3, __builtin_ia32_vfnmaddps,
4652 __builtin_ia32_vfnmaddpd, __builtin_ia32_vfnmaddps256 and.
4653 __builtin_ia32_vfnmaddpd256.
4654 * config/i386/sse.md (fma4i_fnmadd_<mode>): New.
4655 (<avx512>_fnmadd_<mode>_maskz<round_expand_name>): Likewise.
4656 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_1):
4658 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_2):
4660 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_3):
4662 (fmai_vmfnmadd_<mode><round_name>): Likewise.
4664 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
4667 * config/i386/avx512fintrin.h (_mm512_fmsub_round_pd): Use
4668 __builtin_ia32_vfmsubpd512_mask.
4669 (_mm512_mask_fmsub_round_pd): Likewise.
4670 (_mm512_fmsub_pd): Likewise.
4671 (_mm512_mask_fmsub_pd): Likewise.
4672 (_mm512_maskz_fmsub_round_pd): Use
4673 __builtin_ia32_vfmsubpd512_maskz.
4674 (_mm512_maskz_fmsub_pd): Likewise.
4675 (_mm512_fmsub_round_ps): Use __builtin_ia32_vfmsubps512_mask.
4676 (_mm512_mask_fmsub_round_ps): Likewise.
4677 (_mm512_fmsub_ps): Likewise.
4678 (_mm512_mask_fmsub_ps): Likewise.
4679 (_mm512_maskz_fmsub_round_ps): Use
4680 __builtin_ia32_vfmsubps512_maskz.
4681 (_mm512_maskz_fmsub_ps): Likewise.
4682 * config/i386/avx512vlintrin.h (_mm256_mask_fmsub_pd): Use
4683 __builtin_ia32_vfmsubpd256_mask.
4684 (_mm256_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd256_maskz.
4685 (_mm_mask_fmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
4686 (_mm_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd128_maskz.
4687 (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
4688 (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
4689 (_mm256_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps256_maskz.
4690 (_mm_mask_fmsub_ps): Use __builtin_ia32_vfmsubps128_mask.
4691 (_mm_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps128_maskz.
4692 * config/i386/fmaintrin.h (_mm_fmsub_pd): Use
4693 __builtin_ia32_vfmsubpd.
4694 (_mm256_fmsub_pd): Use __builtin_ia32_vfmsubpd256.
4695 (_mm_fmsub_ps): Use __builtin_ia32_vfmsubps.
4696 (_mm256_fmsub_ps): Use __builtin_ia32_vfmsubps256.
4697 (_mm_fmsub_sd): Use __builtin_ia32_vfmsubsd3.
4698 (_mm_fmsub_ss): Use __builtin_ia32_vfmsubss3.
4699 * config/i386/i386-builtin.def: Add
4700 __builtin_ia32_vfmsubpd256_mask,
4701 __builtin_ia32_vfmsubpd256_maskz,
4702 __builtin_ia32_vfmsubpd128_mask,
4703 __builtin_ia32_vfmsubpd128_maskz,
4704 __builtin_ia32_vfmsubps256_mask,
4705 __builtin_ia32_vfmsubps256_maskz,
4706 __builtin_ia32_vfmsubps128_mask,
4707 __builtin_ia32_vfmsubps128_maskz,
4708 __builtin_ia32_vfmsubpd512_mask,
4709 __builtin_ia32_vfmsubpd512_maskz,
4710 __builtin_ia32_vfmsubps512_mask,
4711 __builtin_ia32_vfmsubps512_maskz, __builtin_ia32_vfmsubss3,
4712 __builtin_ia32_vfmsubsd3, __builtin_ia32_vfmsubps,
4713 __builtin_ia32_vfmsubpd, __builtin_ia32_vfmsubps256 and.
4714 __builtin_ia32_vfmsubpd256.
4715 * config/i386/sse.md (fma4i_fmsub_<mode>): New.
4716 (<avx512>_fmsub_<mode>_maskz<round_expand_name>): Likewise.
4717 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_1):
4719 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_2):
4721 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_3):
4723 (fmai_vmfmsub_<mode><round_name>): Likewise.
4725 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
4727 * config/i386/sse.md (*<plusminus_insn><mode>3<mask_name>_bcst_1):
4728 Remove plus. Renamed to ...
4729 (*sub<mode>3<mask_name>_bcst): This.
4730 (*add<mode>3<mask_name>_bcst_2): Renamede to ...
4731 (*add<mode>3<mask_name>_bcst): This.
4733 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
4736 * config/i386/sse.md (*mul<mode>3<mask_name>_bcst): New.
4738 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
4741 * i386/avx512vlintrin.h (_mm256_or_epi32): New.
4742 (_mm_or_epi32): Likewise.
4743 (_mm256_xor_epi32): Likewise.
4744 (_mm_xor_epi32): Likewise.
4745 (_mm256_or_epi64): Likewise.
4746 (_mm_or_epi64): Likewise.
4747 (_mm256_xor_epi64): Likewise.
4748 (_mm_xor_epi64): Likewise.
4750 2018-10-20 H.J. Lu <hongjiu.lu@intel.com>
4753 * config/i386/sse.md (*<avx512>_div<mode>3<mask_name>_bcst): New.
4755 2018-10-20 Jakub Jelinek <jakub@redhat.com>
4758 * varasm.c (decode_addr_const): Handle COMPOUND_LITERAL_EXPR.
4760 2018-10-20 Andreas Schwab <schwab@linux-m68k.org>
4762 * doc/ux.texi: Move @section directly after @node.
4764 2018-10-19 Jakub Jelinek <jakub@redhat.com>
4768 * omp-low.c (check_omp_nesting_restrictions): Diagnose ordered without
4769 depend closely nested inside of loop with ordered clause with
4772 2018-10-19 David Malcolm <dmalcolm@redhat.com>
4774 * Makefile.in (TEXI_GCCINT_FILES): Add ux.texi.
4775 * doc/gccint.texi: Include ux.texi and use it in top-level menu.
4776 * doc/ux.texi: New file.
4778 2018-10-19 Segher Boessenkool <segher@kernel.crashing.org>
4780 * config/rs6000/rs6000.h (REG_ALLOC_ORDER): Move 68 (that is, CR0) to
4781 be the first CR field allocated.
4783 2018-10-19 Richard Biener <rguenther@suse.de>
4786 * config/i386/i386.c (ix86_builtin_vectorization_cost): Use
4787 TYPE_VECTOR_SUBPARTS and avoid relying on vector mode.
4789 2018-10-19 H.J. Lu <hongjiu.lu@intel.com>
4792 * config/i386/sse.md
4793 (*<plusminus_insn><mode>3<mask_name>_bcst_1): New.
4794 (*add<mode>3<mask_name>_bcst_2): Likewise.
4796 2018-10-19 H.J. Lu <hongjiu.lu@intel.com>
4798 * config/i386/sse.md
4799 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
4800 Replace nonimmediate_operand with register_operand.
4801 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
4803 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
4806 2018-10-19 Ilya Leoshkevich <iii@linux.ibm.com>
4808 PR rtl-optimization/87596
4809 * lra-constraints.c (spill_hard_reg_in_range): Use INSN_P () +
4810 lra_get_insn_recog_data () instead of lra_insn_recog_data[]
4811 for instructions in FROM..TO range.
4813 2018-10-19 Eric Botcazou <ebotcazou@adacore.com>
4815 * cfgexpand.c (expand_one_var): Use specific wording in error message
4816 for non-local frame variables.
4817 * stor-layout.c (layout_decl): Do not issue a warning for them.
4819 2018-10-19 Robin Dapp <rdapp@linux.ibm.com>
4821 * haifa-sched.c (priority): Add force_recompute parameter.
4822 (apply_replacement): Call priority () with force_recompute = true.
4823 (restore_pattern): Likewise.
4825 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
4827 * simplify-rtx.c (simplify_subreg): Limit mask of vec_merge to
4828 HOST_BITS_PER_WIDE_INT.
4829 (test_vector_ops_duplicate): Likewise.
4831 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
4834 * config/i386/sse.md (VF_AVX512): New.
4835 (avx512bcst): Likewise.
4836 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
4838 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
4840 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
4843 2018-10-18 Jonathan Wakely <jwakely@redhat.com>
4845 * doc/invoke.texi (-dumpversion): Improve grammar.
4846 (-dumpfullversion): Make more consistent with -dumpversion.
4848 2018-10-18 Uros Bizjak <ubizjak@gmail.com>
4850 * config/i386/i386.c (ix86_emit_fp_unordered_jump):
4851 Set JUMP_LABEL to the jump insn.
4852 (ix86_emit_i387_log1p): Use ix86_expand_branch to expand branch.
4853 Predict emitted jump and add label to jump insn.
4855 2018-10-18 David Malcolm <dmalcolm@redhat.com>
4857 PR tree-optimization/87562
4858 * input.c (get_substring_ranges_for_loc): Use
4859 LRK_SPELLING_LOCATION rather than LRK_MACRO_EXPANSION_POINT when
4860 getting the linemap for the endpoint. Verify that it's either
4861 in the same linemap as the start point's spelling location, or
4862 at least in the same file.
4864 2018-10-18 Richard Biener <rguenther@suse.de>
4866 * config/i386/i386.c (ix86_builtin_vectorization_cost): Do not
4867 feed width-specific load/store costs through ix86_vec_cost.
4868 * config/i386/x86-tune-costs.h (athlon_cost): Adjust.
4869 (k8_cost): Likewise.
4870 (bdver_cost): Likewise.
4871 (znver1_cost): Likewise.
4872 (btver1_cost): Likewise.
4873 (btver2_cost): Likewise.
4875 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
4877 * simplify-rtx.c (simplify_subreg): Call simplify_gen_subreg
4878 to simplify subreg of vec_merge.
4880 2018-10-18 Richard Biener <rguenther@suse.de>
4882 * config/i386/i386.c: Fix costing of vector FMA.
4884 2018-10-18 Richard Biener <rguenther@suse.de>
4886 * config/i386/i386.c (ix86_vec_cost): Remove !parallel path
4888 (ix86_builtin_vectorization_cost): For vec_construct properly
4889 cost insertion into SSE regs.
4890 (...): Adjust calls to ix86_vec_cost.
4892 2018-10-18 Richard Biener <rguenther@suse.de>
4896 2018-02-07 Richard Biener <rguenther@suse.de>
4898 PR tree-optimization/84204
4899 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
4902 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
4905 * simplify-rtx.c (simplify_subreg): Simplify subreg of vec_merge
4907 (test_vector_ops_duplicate): Add test for a scalar subreg of a
4908 VEC_MERGE of a VEC_DUPLICATE.
4910 2018-10-17 Joseph Myers <joseph@codesourcery.com>
4912 * doc/cpp.texi (__STDC_VERSION__): Document C2X handling.
4913 * doc/invoke.texi (-std=c2x, -std=gnu2x): Document new options.
4914 * doc/standards.texi (C Language): Document C2X.
4915 * dwarf2out.c (highest_c_language), config/rl78/rl78.c
4916 (rl78_option_override): Handle "GNU C2X" language name.
4918 2018-10-17 Joseph Myers <joseph@codesourcery.com>
4920 * doc/invoke.texi (-std=c17), doc/standards.texi (C Language):
4921 Document C17 as published in 2018.
4923 2018-10-17 Eric Botcazou <ebotcazou@adacore.com>
4926 * fold-const.c (fold_truth_andor_1): If the right side is not constant,
4927 bail out if both sides do not have the same storage order.
4929 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
4931 * bitmap.c (bitmap_head::dump): New.
4932 * bitmap.h (bitmap_head): Add dump().
4933 * gimple-ssa-evrp-analyze.c
4934 (evrp_range_analyzer::try_find_new_range): Adjust for value_range API.
4935 (evrp_range_analyzer::set_ssa_range_info): Same.
4936 (evrp_range_analyzer::record_ranges_from_phis): Same.
4937 (evrp_range_analyzer::record_ranges_from_stmt): Same.
4938 * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Same.
4939 * gimple-ssa-sprintf.c (get_int_range): Same.
4940 (format_integer): Same.
4941 (sprintf_dom_walker::handle_gimple_call): Same.
4942 * ipa-cp.c (ipcp_vr_lattice::meet_with_1): Same.
4943 (ipcp_vr_lattice::top_p): Same.
4944 (ipcp_vr_lattice::bottom_p): Same.
4945 (ipcp_vr_lattice::set_to_bottom): Same.
4946 (ipa_vr_operation_and_type_effects): Same.
4947 (propagate_vr_across_jump_function): Same.
4948 (ipcp_store_vr_results): Same.
4949 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Same.
4950 (ipa_print_node_jump_functions_for_edge): Same.
4951 (ipa_get_value_range): Same.
4952 (ipa_compute_jump_functions_for_edge): Same.
4953 (ipa_write_jump_function): Same.
4954 * tree-ssa-dom.c (simplify_stmt_for_jump_threading): Same.
4955 * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
4957 * vr-values.c (set_value_range_to_nonnegative): Same.
4958 (set_value_range_to_truthvalue): Same.
4959 (vr_values::get_value_range): Same.
4960 (vr_values::set_defs_to_varying): Same.
4961 (vr_values::update_value_range): Same.
4962 (symbolic_range_based_on_p): Same.
4963 (vr_values::op_with_boolean_value_range_p): Same.
4964 (vr_values::extract_range_for_var_from_comparison_expr): Same.
4965 (vr_values::extract_range_from_ssa_name): Same.
4966 (vr_values::extract_range_from_binary_expr): Same.
4967 (vr_values::extract_range_from_unary_expr): Same.
4968 (vr_values::extract_range_from_cond_expr): Same.
4969 (vr_values::extract_range_from_comparison): Same.
4970 (vr_values::check_for_binary_op_overflow): Same.
4971 (vr_values::extract_range_basic): Same.
4972 (vr_values::extract_range_from_assignment): Same.
4973 (compare_ranges): Same.
4974 (compare_range_with_value): Same.
4975 (vr_values::adjust_range_with_scev): Same.
4976 (vrp_valueize): Same.
4977 (vrp_valueize_1): Same.
4978 (vr_values::get_vr_for_comparison): Same.
4979 (vr_values::compare_name_with_value): Same.
4980 (vr_values::compare_names): Same.
4981 (vr_values::vrp_evaluate_conditional): Same.
4982 (find_case_label_ranges): Same.
4983 (vr_values::vrp_visit_switch_stmt): Same.
4984 (vr_values::extract_range_from_phi_node): Same.
4985 (vr_values::simplify_div_or_mod_using_ranges): Same.
4986 (vr_values::simplify_bit_ops_using_ranges): Same.
4987 (test_for_singularity): Same.
4988 (range_fits_type_p): Same.
4989 (vr_values::simplify_cond_using_ranges_1): Same.
4990 (vr_values::simplify_switch_using_ranges): Same.
4991 (vr_values::simplify_float_conversion_using_ranges): Same.
4992 (vr_values::two_valued_val_range_p): Same.
4993 (vr_values::add_equivalence): Move to value_range::equiv_add.
4994 * vr-values.h (vr_values::add_equivalence): Remove.
4995 (VR_INITIALIZER): Remove.
4996 * tree-vrp.c (value_range::set): New.
4997 (value_range::equiv_add): New.
4998 (value_range::value_range): New.
4999 (value_range::deep_copy): New.
5000 (value_range::check): New.
5001 (value_range::equal_p): New.
5002 (value_range::ignore_equivs_equal_p): New.
5003 (value_range::operator==): New.
5004 (value_range::operator!=): New.
5005 (value_range::symbolic_p): New.
5006 (value_range::numeric_p): New.
5007 (value_range::set_undefined): New.
5008 (value_range::set_varying): New.
5009 (value_range::may_contain_p): New.
5010 (value_range::equiv_clear): New.
5011 (value_range::singleton_p): New.
5012 (value_range::intersect): New.
5013 (value_range::dump): New.
5014 (value_range::set_and_canonicalize): New.
5015 (set_value_range): Adjust for value_range API.
5016 (set_value_range_to_undefined): Same.
5017 (set_value_range_to_varying): Same.
5018 (set_and_canonicalize_value_range): Same.
5019 (set_value_range_to_nonnull): Same.
5020 (set_value_range_to_null): Same.
5021 (range_is_null): Same.
5022 (range_is_nonnull): Same.
5023 (range_int_cst_p): Same.
5024 (range_int_cst_singleton_p): Same.
5025 (symbolic_range_p): Same.
5026 (range_includes_zero_p): Same.
5027 (value_range_constant_singleton): Same.
5028 (vrp_set_zero_nonzero_bits): Same.
5029 (ranges_from_anti_range): Same.
5030 (extract_range_into_wide_ints): Same.
5031 (extract_range_from_multiplicative_op): Same.
5032 (set_value_range_with_overflow): Same.
5033 (extract_range_from_binary_expr_1): Same.
5034 (extract_range_from_unary_expr): Same.
5035 (dump_value_range): Same.
5036 (debug_value_range): Same.
5037 (vrp_prop::check_array_ref): Same.
5038 (vrp_prop::check_mem_ref): Same.
5039 (vrp_prop::vrp_initialize): Same.
5040 (vrp_prop::visit_stmt): Same.
5041 (intersect_ranges): Same.
5042 (vrp_prop::visit_phi): Same.
5043 (vrp_prop::vrp_finalize): Same.
5044 (determine_value_range_1): Same.
5045 (determine_value_range): Same.
5046 (vrp_intersect_ranges_1): Rename to...
5047 (vrp_intersect_1): this.
5048 (vrp_intersect_ranges): Rename to...
5049 (value_range::intersect_helper): ...this.
5050 (vrp_meet_1): Rename to...
5051 (value_range::union_helper): ...this.
5052 (vrp_meet): Rename to...
5053 (value_range::union_): ...this.
5054 (copy_value_range): Remove.
5055 * tree-vrp.h (struct value_range): Rewrite into a proper class.
5056 (value_range::vrtype): New.
5057 (value_range::type): New.
5058 (value_range::equiv): New.
5059 (value_range::min): New.
5060 (value_range::max): New.
5061 (value_range::varying_p): New.
5062 (value_range::undefined_p): New.
5063 (value_range::null_p): New.
5064 (value_range::equiv_add): New.
5065 (copy_value_range): Remove.
5067 2018-10-17 David Malcolm <dmalcolm@redhat.com>
5069 * Makefile.in (SELFTEST_TARGETS): New.
5070 (selftest) Change from s-selftest-c to $(SELFTEST_TARGETS).
5071 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
5072 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move to
5074 (CPP_SELFTEST_FLAGS, CPP_SELFTEST_DEPS, s-selftest-c++)
5075 (selftest-c++-gdb, selftest-c++-valgrind): Move to
5077 * configure: Regenerate.
5078 * configure.ac (selftest_languages): New.
5080 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
5082 * tree-vrp.c (extract_range_from_multiplicative_op): Remove
5083 overflow wraps argument.
5084 (extract_range_from_binary_expr_1): Do not pass overflow wraps to
5085 wide_int_range_multiplicative_op.
5086 * wide-int-range.cc (wide_int_range_mult_wrapping): Remove
5087 overflow wraps argument.
5088 (wide_int_range_multiplicative_op): Same.
5089 (wide_int_range_lshift): Same.
5090 (wide_int_range_div): Same.
5091 * wide-int-range.h (wide_int_range_multiplicative_op): Same.
5092 (wide_int_range_lshift): Same.
5093 (wide_int_range_div): Same.
5095 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
5097 * wide-int-range.h (wide_int_range_shift_undefined_p): Adjust to
5098 use sign as argument.
5099 * tree-vrp.c (extract_range_from_binary_expr_1): Pass sign to
5100 wide_int_range_shift_undefined_p.
5102 2018-10-16 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5104 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>):
5106 (@despeculate_copy<ALLI_TI:mode>): ... This.
5107 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): Remove
5110 2018-10-16 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5112 * config.gcc: Obsolete *-*-solaris2.10*.
5113 * doc/install.texi (Specific, *-*-solaris2*): Document it.
5115 2018-10-12 Jeff Law <law@redhat.com>
5117 * config/ft32/ft32.md (ft32_general_movsrc_operand): Disable
5118 reg + sym +- const_int addressing modes.
5120 2018-10-15 David Malcolm <dmalcolm@redhat.com>
5122 * common.opt (fdiagnostics-minimum-margin-width=): New option.
5123 * diagnostic-show-locus.c (layout::layout): Apply the minimum
5125 (layout::start_annotation_line): Only print up to 3 of the
5126 margin character, to avoid touching the left-hand side.
5127 (selftest::test_diagnostic_show_locus_fixit_lines): Update for
5128 minimum margin width, as set by test_diagnostic_context's ctor.
5129 (selftest::test_fixit_insert_containing_newline): Likewise.
5130 (selftest::test_fixit_insert_containing_newline_2): Likewise.
5131 (selftest::test_line_numbers_multiline_range): Clear
5132 dc.min_margin_width.
5133 * diagnostic.c (diagnostic_initialize): Initialize
5135 * diagnostic.h (struct diagnostic_context): Add field
5137 * doc/invoke.texi: Add -fdiagnostics-minimum-margin-width=.
5138 * opts.c (common_handle_option): Handle
5139 OPT_fdiagnostics_minimum_margin_width_.
5140 * selftest-diagnostic.c
5141 (selftest::test_diagnostic_context::test_diagnostic_context):
5142 Initialize min_margin_width to 6.
5143 * toplev.c (general_init): Initialize global_dc->min_margin_width.
5145 2018-10-15 David Malcolm <dmalcolm@redhat.com>
5147 * gcc-rich-location.h (gcc_rich_location::add_location_if_nearby):
5148 Fix usage of "error_at_rich_loc" in the comment.
5150 2018-10-15 Renlin Li <renlin.li@arm.com>
5153 * tree-vectorizer.c (try_vectorize_loop_1): Don't use
5154 if-conversioned loop when it contains ifn with types not
5155 supported by backend.
5156 * internal-fn.c (expand_direct_optab_fn): Add an assert.
5157 (direct_internal_fn_supported_p): New helper function.
5158 * internal-fn.h (direct_internal_fn_supported_p): Declare.
5160 2018-10-15 Jakub Jelinek <jakub@redhat.com>
5163 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
5164 Remove OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
5165 OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
5167 2018-10-15 Bin Cheng <bin.cheng@linux.alibaba.com>
5169 PR tree-optimization/87022
5170 * tree-loop-distribution.c (pg_add_dependence_edges): Check all
5171 bits in dist vector rather than the first one.
5173 2018-10-15 Richard Biener <rguenther@suse.de>
5176 * tree-ssa-structalias.c (struct vls_data): Add escaped_p member.
5177 (visit_loadstore): When a used restrict tag escaped verify that
5178 the points-to solution of "other" pointers do not include
5180 (compute_dependence_clique): If a used restrict tag escaped
5181 communicated that down to visit_loadstore.
5183 2018-10-15 Andreas Krebbel <krebbel@linux.ibm.com>
5185 * config/s390/s390.c (s390_expand_vec_init): Force vector element
5186 into reg if it isn't a general operand.
5188 2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
5191 * config/i386/sse.md (*vec_dupv2di): Add register source to
5194 2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
5197 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
5198 Add OPTION_MASK_ISA_AVX512IFMA_UNSET,
5199 OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
5200 OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
5202 2018-10-13 Eric Botcazou <ebotcazou@adacore.com>
5204 * dwarf2cfi.c (struct dw_trace_info): Add args_size_defined_for_eh.
5205 (notice_args_size): Set it in the current trace if no insn that can
5206 throw internally has been seen yet.
5207 (connect_traces): When connecting args_size between traces, allow the
5208 incoming values not to match if there is an insn setting it before the
5209 first insn that can throw internally; in that case, force the creation
5210 of a CFI note on this latter insn.
5212 2018-10-13 Jonathan Wakely <jwakely@redhat.com>
5214 * opt-problem.h (opt_wrapper): Use template-argument-list when naming
5215 the base class, because using the injected-class-name was not clearly
5216 specified until DR 176.
5218 2018-10-12 Paul Koning <ni1d@arrl.net>
5220 * config/pdp11/pdp11.md (doloop_end): New expander.
5221 (doloop_end_insn): renamed from "doloop_end".
5222 (addqi3): New pattern.
5223 (subqi3): New pattern.
5224 * config/pdp11/predicates.md (incdec_operand): New predicate.
5226 2018-10-12 Yury Gribov <tetra2005@gmail.com>
5229 * real.c (format_helper::can_represent_integral_type_p): New function
5230 * real.h (format_helper::can_represent_integral_type_p): Ditto.
5231 * match.pd: New pattern.
5233 2018-10-12 Alexandre Oliva <oliva@adacore.com>
5235 * configure.ac: Introduce --enable-large-address-aware
5236 to define MINGW_DEFAULT_LARGE_ADDR_AWARE.
5237 * doc/install.texi: Document it.
5238 * configure, config.in: Rebuilt.
5239 * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Define,
5240 based on MINGW_DEFAULT_LARGE_ADDR_AWARE.
5241 (LINK_SPEC): Insert it.
5242 * config/i386/mingw-w64.h: Likewise.
5244 * cygming.h (HAVE_GAS_ALIGNED_COMM): Fallback-define.
5246 2018-10-12 Peter Bergner <bergner@linux.ibm.com>
5248 PR rtl-optimization/87600
5249 * ira-lives (non_conflicting_reg_copy_p): Disable for non LRA targets.
5251 2018-10-12 Paul Koning <ni1d@arrl.net>
5253 * doc/md.texi (doloop_end): Document that the pattern code may
5254 need to check operand mode.
5256 2018-10-12 Wilco Dijkstra <wdijkstr@arm.com>
5258 * config/aarch64/aarch64.md (zero_extendsidi2_aarch64): Add alternatives
5259 to zero-extend between int and floating-point registers.
5260 (load_pair_zero_extendsidi2_aarch64): Add alternative for zero-extended
5261 ldp into floating-point registers. Add type and arch attributes.
5262 (zero_extend<SHORT:mode><GPI:mode>2_aarch64): Add arch attribute.
5263 Use f_loads for type attribute.
5265 2018-10-11 Martin Sebor <msebor@redhat.com>
5267 * doc/extend.texi (attribute packed): Correct typos.
5269 2018-10-11 Martin Sebor <msebor@redhat.com>
5271 * doc/extend.texi (attribute flatten): Mention interaction with
5274 2018-10-11 Jan Hubicka <hubicka@ucw.cz>
5277 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
5278 Set new_decl virtual flag to zero.
5280 2018-10-11 Martin Sebor <msebor@redhat.com>
5283 * doc/extend.texi (attribute format_arg): Discuss using multiple
5284 attributes on a single function.
5286 2018-10-11 Giuliano Belinassi <giuliano.belinassi@usp.br>
5288 PR tree-optimization/86829
5289 * match.pd (sin (atan (x))): New simplification rules.
5290 (cos (atan (x))): Likewise.
5291 * real.c (build_sinatan_real): New function.
5292 * real.h (build_sinatan_real): Prototype.
5294 2018-10-11 Will Schmidt <will_schmidt@vnet.ibm.com>
5296 * config/rs6000/rs6000.c (map_to_integral_tree_type): New helper
5298 (fold_mergeeo_helper): New helper function.
5299 (rs6000_gimple_fold_builtin): Add hooks for vec_mergee and vec_mergeo
5300 intrinsics. Correct some whitespace indentation issues.
5302 2018-10-11 Wilco Dijkstra <wdijkstr@arm.com>
5305 * config/aarch64/aarch64.c (aarch64_mask_and_shift_for_ubfiz_p):
5306 Use HOST_WIDE_INT_1U for shift.
5308 2018-10-11 Doug Rupp <rupp@adacore.com>
5309 Olivier Hainque <hainque@adacore.com>
5311 * config/rs6000/vxworks.h (VXWORKS_RELAX_LINK_SPEC): New macro.
5312 Pass --relax to the linker for RTPs.
5313 (LINK_SPEC): Append VXWORKS_RELAX_LINK_SPEC.
5315 2018-10-11 Andrew Stubbs <ams@codesourcery.com>
5316 Jan Hubicka <jh@suse.cz>
5317 Martin Jambor <mjambor@suse.cz>
5319 * print-rtl.c (print_rtx_operand_codes_E_and_V): Print how many times
5320 the same elements are repeated rather than printing all of them.
5321 * read-rtl.c (rtx_reader::read_rtx_operand): Recognize and expand
5322 "repeated" elements.
5323 * read-rtl-function.c (test_loading_repeat): New function.
5324 (read_rtl_function_c_tests): Call test_loading_repeat.
5325 * rtl-tests.c (test_dumping_repeat): New function.
5326 (rtl_tests_c_tests): Call test_dumping_repeat.
5328 2018-10-11 Richard Biener <rguenther@suse.de>
5330 * config/i386/x86-tune-costs.h (bdver?_memcpy, bdver?_memset,
5331 bdver?_cost): Unify to ...
5332 (bdver_memcpy, bdver_memset, bdver_cost): ... this.
5333 * config/i386/i386.c (processor_cost_table): Adjust.
5335 2018-10-10 Eric Botcazou <ebotcazou@adacore.com>
5338 * cgraphunit.c (cgraph_node::expand_thunk): Force DECL_IGNORED_P on
5339 the thunk when expanding to GIMPLE.
5341 2018-10-10 Bernd Edlinger <bernd.edlinger@hotmail.de>
5343 * varasm.c (mergeable_string_section): Don't try to move zero-length
5344 strings to the merge section.
5346 2018-10-10 Uros Bizjak <ubizjak@gmail.com>
5349 * config/i386/mmx.md (const_vector 0 -> mem splitter): New splitter.
5351 2018-10-10 Jakub Jelinek <jakub@redhat.com>
5354 * config/i386/i386-builtin.def (IX86_BUILTIN_RDPMC): Move from args set
5355 to special_args set.
5357 2018-10-10 Richard Biener <rguenther@suse.de>
5359 * config/i386/sse.md (reduc_plus_scal_v8df, reduc_plus_scal_v4df,
5360 reduc_plus_scal_v2df, reduc_plus_scal_v16sf, reduc_plus_scal_v8sf,
5361 reduc_plus_scal_v4sf): Merge into pattern reducing to half width
5362 and recursing and pattern terminating the recursion on SSE
5363 vector width using ix86_expand_reduc.
5364 (reduc_sminmax_scal_<mode>): Split into part reducing to half
5365 width and recursing and SSE2 vector variant doing the final
5366 reduction with ix86_expand_reduc.
5367 (reduc_uminmax_scal_<mode>): Likewise for the AVX512 variants
5368 with terminating the recursion at AVX level, splitting that
5371 2018-10-09 David Malcolm <dmalcolm@redhat.com>
5373 * genmatch.c (error_cb): Rename to...
5374 (diagnostic_cb): ...this, converting int params to enums.
5375 (fatal_at): Update for renaming.
5376 (warning_at): Likewise.
5378 * input.c (selftest::ebcdic_execution_charset::apply):
5379 Update for renaming of...
5380 (selftest::ebcdic_execution_charset::on_error): ...this, renaming
5382 (selftest::ebcdic_execution_charset::on_diagnostic): ...this,
5383 converting level and reason to enums.
5384 (class selftest::lexer_error_sink): Rename to...
5385 (class selftest::lexer_test_options): ...this, renaming field
5386 "m_errors" to "m_diagnostics".
5387 (selftest::lexer_test_options::apply): Update for renaming of...
5388 (selftest::lexer_test_options::on_error): ...this, renaming to...
5389 (selftest::lexer_test_options::on_diagnostic): ...this
5390 converting level and reason to enums.
5391 (selftest::test_lexer_string_locations_raw_string_unterminated):
5392 Update for renamings.
5393 * opth-gen.awk (struct cpp_reason_option_codes_t): Use enum for
5396 2018-10-09 Paul A. Clarke <pc@us.ibm.com>
5398 * config.gcc (powerpc*-*-*): Add pmmintrin.h to extra_headers.
5399 * config/rs6000/pmmintrin.h: New file.
5401 2018-10-09 Eric Botcazou <ebotcazou@adacore.com>
5403 PR tree-optimization/86659
5404 * gimple-match.h (gimple_match_op constructors): Initialize reverse.
5406 2018-10-09 Richard Biener <rguenther@suse.de>
5408 PR tree-optimization/63155
5409 * tree-ssa-structalias.c: Include tree-ssa.h.
5410 (get_constraint_for_ssa_var): For undefs return nothing_id.
5411 (find_func_aliases): Cleanup PHI handling.
5413 2018-10-09 Richard Biener <rguenther@suse.de>
5415 * tree-vectorizer.c (dump_stmt_cost): Fix cut&paste missing
5418 2018-10-09 Martin Liska <mliska@suse.cz>
5420 * asan.c (asan_emit_stack_protection): If a stack variable
5421 is located in a same file as current function, then emit
5422 line info into variable definition string.
5424 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
5426 * print-rtl.c (rtx_writer::print_rtx_operand_code_i): Print column
5429 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
5431 * cgraphunit.c (cgraph_node::expand_thunk): Do not force DECL_IGNORED_P
5434 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
5436 PR tree-optimization/86659
5437 * gimple-match.h (struct gimple_match_op): Add reverse field.
5438 (gimple_match_op::set_op): New overloaded method.
5439 * gimple-match-head.c (maybe_build_generic_op) <BIT_FIELD_REF>: Set
5440 the REF_REVERSE_STORAGE_ORDER flag on the value.
5441 (gimple_simplify) <GIMPLE_ASSIGN>: For BIT_FIELD_REF, propagate the
5442 REF_REVERSE_STORAGE_ORDER flag and avoid simplifying if it is set.
5444 2018-10-08 Richard Sandiford <richard.sandiford@arm.com>
5447 * gimple-ssa-backprop.c (backprop::intersect_uses): Use
5448 FOR_EACH_IMM_USE_FAST instead of FOR_EACH_IMM_USE_STMT.
5450 2018-10-08 H.J. Lu <hongjiu.lu@intel.com>
5453 * config/i386/avx512fintrin.h (_mm512_mask_fmaddsub_round_pd):
5454 Defined with __builtin_ia32_vfmaddsubpd512_mask.
5456 2018-10-08 Richard Biener <rguenther@suse.de>
5458 * config/i386/x86-tune-costs.h (znver1_cost): Make AVX256 vector loads
5459 cost the same as AVX128 ones.
5461 2018-10-08 Paul Koning <ni1d@arrl.net>
5463 * config/pdp11/pdp11-protos.h (output_block_move): Remove.
5464 (expand_block_move): New function.
5465 * config/pdp11/pdp11.c (output_block_move): Remove.
5466 (expand_block_move): New function.
5467 * config/pdp11/pdp11.h (MOVE_RATIO): New definition.
5468 * config/pdp11/pdp11.md (movmemhi): Use expand_block_move.
5469 (*movmemhi1): Remove.
5471 2018-10-08 Robin Dapp <rdapp@linux.ibm.com>
5473 * config/s390/2827.md: Increase latencies for some FP instructions.
5475 2018-10-08 Richard Biener <rguenther@suse.de>
5477 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
5479 * tree-vectorizer.c (dump_stmt_cost): Add cost param and dump it.
5480 * tree-vectorizer.h (dump_stmt_cost): Adjust.
5481 (add_stmt_cost): Dump return value of the hook.
5483 2018-10-08 Richard Biener <rguenther@suse.de>
5485 PR tree-optimization/63155
5486 * tree-ssa-propagate.c (add_ssa_edge): Do cheap check first.
5487 (ssa_propagation_engine::ssa_propagate): Remove redundant
5488 bitmap bit clearing.
5490 2018-10-05 Peter Bergner <bergner@linux.ibm.com>
5492 PR rtl-optimization/86939
5493 PR rtl-optimization/87479
5494 * ira.h (non_conflicting_reg_copy_p): New prototype.
5495 * ira-lives.c (ignore_reg_for_conflicts): New static variable.
5496 (make_hard_regno_dead): Don't add conflicts for register
5497 ignore_reg_for_conflicts.
5498 (make_object_dead): Likewise.
5499 (non_conflicting_reg_copy_p): New function.
5500 (process_bb_node_lives): Set ignore_reg_for_conflicts for copies.
5501 Remove special conflict handling of REAL_PIC_OFFSET_TABLE_REGNUM.
5502 * lra-lives.c (ignore_reg_for_conflicts): New static variable.
5503 (make_hard_regno_dead): Don't add conflicts for register
5504 ignore_reg_for_conflicts. Remove special conflict handling of
5505 REAL_PIC_OFFSET_TABLE_REGNUM. Remove now unused argument
5506 check_pic_pseudo_p and update callers.
5507 (mark_pseudo_dead): Don't add conflicts for register
5508 ignore_reg_for_conflicts.
5509 (process_bb_lives): Set ignore_reg_for_conflicts for copies.
5511 2018-10-05 Andrew Waterman <andrew@sifive.com>
5512 Jim Wilson <jimw@sifive.com>
5514 * config/riscv/riscv.md (f<quiet_pattern>_quiet<ANYF:mode><X:mode>4):
5515 Add define_expand. Add ! HONOR_SNANS check to current pattern. Add
5516 new pattern using HONOR_SNANS that emits one extra instruction.
5518 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
5520 * config/rs6000/rs6000.md (unnamed mfcr scc_comparison_operator
5521 patterns): Merge SI and DI patterns to a GPR pattern.
5522 (unnamed define_insn and define_split for record form of that): Merge
5523 to a single define_insn_and_split pattern.
5525 2018-10-05 David Malcolm <dmalcolm@redhat.com>
5528 * input.c (expand_location_to_spelling_point): Add param "aspect"
5529 and use rather than hardcoding LOCATION_ASPECT_CARET.
5530 (get_substring_ranges_for_loc): Handle the case of a single token
5531 within a macro expansion.
5532 * input.h (expand_location_to_spelling_point): Add "aspect" param,
5533 defaulting to LOCATION_ASPECT_CARET.
5535 2018-10-05 Paul Koning <ni1d@arrl.net>
5537 * config/pdp11/pdp11.c (TARGET_CXX_GUARD_TYPE): Define.
5538 (TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT): Define.
5539 (TARGET_CXX_LIBRARY_RTTI_COMDAT): Define.
5540 (pdp11_guard_type): New function.
5542 2018-10-05 Paul Koning <ni1d@arrl.net>
5544 * config/pdp11/pdp11.h (FLOAT_TYPE_SIZE): Always 32.
5545 * config/pdp11/pdp11.opt (mfloat32): Remove.
5547 * doc/invoke.texi (pdp11 -mfloat32): Remove:
5548 (pdp11 -mfloat64): Remove.
5550 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
5552 * config/i386/i386.md (*cmpxf_cc_i387): Remove pattern.
5553 (*cmp<mode>_cc_i387): Ditto.
5554 (*cmpu<mode>_cc_i387): Ditto.
5555 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
5556 * config/i386/i386.c (ix86_expand_fp_compare): Remove
5558 <case IX86_FPCMP_SAHF>: Do not generate pattern with HImode clobber.
5559 Emit x86_sahf_1 pattern.
5560 (ix86_expand_compare): Update call to ix86_expand_fp_compare.
5561 (ix86_expand_carry_flag_compare): Ditto.
5563 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
5565 * config/i386/i386.md (*cmpxf_i387): Change operand 2 predicate
5566 to reg_or_0_operand. Add "C" constraint.
5567 (*cmpxf_cc_i387): Ditto.
5568 (*cmp<mode>_i387): Change operand 2 predicate
5569 to nonimm_or_0_operand. Add "C" constraint.
5570 (*cmp<mode>_cc_i387): Ditto.
5571 (*cmp<mode>_0_i387): Remove insn pattern.
5572 (*cmp<mode>_0_cc_i387): Ditto.
5574 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
5576 * config/i386/constraints.md ("C"): Do not depend on TARGET_SSE.
5577 * config/i386/predicates.md (nonimm_or_0_operand): Rename
5578 from vector_move_operand. Update all uses.
5580 2018-10-05 Martin Sebor <msebor@redhat.com>
5582 PR tree-optimization/87490
5583 * builtins.c (expand_builtin_strnlen): Handle a null data.decl
5586 2018-10-05 Richard Biener <rguenther@suse.de>
5588 PR tree-optimization/63155
5589 * tree-ssa-ccp.c (ccp_propagate::visit_phi): Avoid excess
5590 vertical space in dumpfiles.
5591 * tree-ssa-propagate.h
5592 (ssa_propagation_engine::process_ssa_edge_worklist): Remove.
5593 * tree-ssa-propagate.c (cfg_blocks_back): New global.
5594 (ssa_edge_worklist_back): Likewise.
5595 (curr_order): Likewise.
5596 (cfg_blocks_get): Remove abstraction.
5597 (cfg_blocks_add): Likewise.
5598 (cfg_blocks_empty_p): Likewise.
5599 (add_ssa_edge): Add to current or next worklist based on
5601 (add_control_edge): Likewise.
5602 (ssa_propagation_engine::process_ssa_edge_worklist): Fold
5604 (ssa_propagation_engine::ssa_propagate): ... here. Unify
5605 iteration from CFG and SSA edge worklist so we process
5606 everything in RPO order, prioritizing forward progress
5608 (ssa_prop_init): Allocate new worklists, do not dump
5610 (ssa_prop_fini): Free new worklists.
5612 2018-10-05 Richard Biener <rguenther@suse.de>
5614 * tree-core.h (tree_block::abstract_flag): Remove.
5615 (tree_block::block_num): Make full 32bits.
5616 * tree.def (BLOCK): Remove docs about BLOCK_ABSTRACT.
5617 * tree.h (BLOCK_ABSTRACT): Remove.
5618 * dwarf2out.c (gen_lexical_block_die): Remove dead code
5619 resulting from BLOCK_ABSTRACT being always false.
5620 (gen_inlined_subroutine_die): Likewise.
5621 (gen_block_die): Likewise.
5622 * tree.c (block_ultimate_origin): Likewise.
5623 * tree-pretty-print.c (dump_block_node): Remove code dealing
5624 with BLOCK_ABSTRACT.
5625 * tree-ssa-live.c (dump_scope_block): Likewise.
5626 * tree-streamer-in.c (unpack_ts_block_value_fields): Likewise.
5627 * tree-streamer-out.c (pack_ts_block_value_fields): Likewise.
5629 2018-10-05 Richard Biener <rguenther@suse.de>
5631 * config/i386/i386.c (ix86_add_stmt_cost): When scalar cost
5632 is asked for initialize mode to the component mode of the
5635 2018-10-05 H.J. Lu <hongjiu.lu@intel.com>
5638 * config/i386/gnu-user.h (ASM_SPEC): Don't pass -msse2avx to
5639 assembler for -mavx.
5640 * config/i386/gnu-user64.h (ASM_SPEC): Likewise.
5642 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
5645 * config/rs6000/rs6000-builtin.def (RS6000_BUILTIN_SET_FPSCR_DRN): Use
5647 * config/rs6000/rs6000.md (rs6000_set_fpscr_rn): Require the operand
5648 to be DImode. When using mffscrn, force the operand to a register.
5650 2018-10-04 Uros Bizjak <ubizjak@gmail.com>
5652 * config/i386/i386.md (*fop_<X87MODEF:mode>_2_i387): Macroize insn
5653 from *fop_<MODEF:mode>_2_i387 and *fop_xf_2_i387 using
5654 X87MODEF mode iterator.
5655 (*fop_<X87MODEF:mode>_3_i387): Macroize insn from
5656 *fop_<MODEF:mode>_3_i387 and *fop_xf_3_i387 using
5657 X87MODEF mode iterator.
5659 2018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
5661 * doc/invoke.texi (-Wno-prio-ctor-dtor): Document new warning
5662 -Wno-prio-ctor-dtor.
5664 2018-10-04 David Malcolm <dmalcolm@redhat.com>
5666 * Makefile.in (OBJS): Add opt-problem.o.
5667 * dump-context.h: Include "selftest.h.
5668 (selftest::temp_dump_context): New forward decl.
5669 (class dump_context): Make friend of class
5670 selftest::temp_dump_context.
5671 (dump_context::dump_loc_immediate): New decl.
5672 (class dump_pretty_printer): Move here from dumpfile.c.
5673 (class temp_dump_context): Move to namespace selftest.
5674 (temp_dump_context::temp_dump_context): Add param
5675 "forcibly_enable_dumping".
5676 (selftest::verify_dumped_text):
5677 (ASSERT_DUMPED_TEXT_EQ): Move here from dumpfile.c.
5678 (selftest::verify_item):
5679 (ASSERT_IS_TEXT): Move here from dumpfile.c.
5680 (ASSERT_IS_TREE): Likewise.
5681 (ASSERT_IS_GIMPLE): Likewise.
5682 * dumpfile.c (dump_context::dump_loc): Move immediate dumping
5684 (dump_context::dump_loc_immediate): ...this new function.
5685 (class dump_pretty_printer): Move to dump-context.h.
5686 (dump_switch_p_1): Don't enable MSG_PRIORITY_REEMITTED.
5687 (opt_info_switch_p_1): Enable MSG_PRIORITY_REEMITTED.
5688 (temp_dump_context::temp_dump_context): Move to "selftest"
5689 namespace. Add param "forcibly_enable_dumping", and use it to
5690 conditionalize the use of m_pp;
5691 (selftest::verify_dumped_text): Make non-static.
5692 (ASSERT_DUMPED_TEXT_EQ): Move to dump-context.h.
5693 (selftest::verify_item): Make non-static.
5694 (ASSERT_IS_TEXT): Move to dump-context.h.
5695 (ASSERT_IS_TREE): Likewise.
5696 (ASSERT_IS_GIMPLE): Likewise.
5697 (selftest::test_capture_of_dump_calls): Pass "true" for new
5698 param of temp_dump_context.
5699 * dumpfile.h (enum dump_flag): Add MSG_PRIORITY_REEMITTED, adding
5700 it to MSG_ALL_PRIORITIES. Update values of TDF_COMPARE_DEBUG and
5702 * opt-problem.cc: New file.
5703 * opt-problem.h: New file.
5704 * optinfo-emit-json.cc
5705 (selftest::test_building_json_from_dump_calls): Pass "true" for
5706 new param of temp_dump_context.
5707 * optinfo.cc (optinfo_kind_to_dump_flag): New function.
5708 (optinfo::emit_for_opt_problem): New function.
5709 (optinfo::emit): Clarity which emit_item is used.
5710 * optinfo.h (optinfo::get_dump_location): New accessor.
5711 (optinfo::emit_for_opt_problem): New decl.
5712 (optinfo::emit): Make const.
5713 * selftest-run-tests.c (selftest::run_tests): Call
5714 selftest::opt_problem_cc_tests.
5715 * selftest.h (selftest::opt_problem_cc_tests): New decl.
5716 * tree-data-ref.c (dr_analyze_innermost): Convert return type from
5717 bool to opt_result, converting fprintf messages to
5718 opt_result::failure_at calls. Add "stmt" param for use by the
5720 (create_data_ref): Pass "stmt" to the dr_analyze_innermost call.
5721 (runtime_alias_check_p): Convert return type from bool to
5722 opt_result, converting dump_printf calls to
5723 opt_result::failure_at, using the statement DDR_A for their
5725 (find_data_references_in_stmt): Convert return type from bool to
5726 opt_result, converting "return false" to opt_result::failure_at
5728 * tree-data-ref.h: Include "opt-problem.h".
5729 (dr_analyze_innermost): Convert return type from bool to opt_result,
5730 and add a const gimple * param.
5731 (find_data_references_in_stmt): Convert return type from bool to
5733 (runtime_alias_check_p): Likewise.
5734 * tree-predcom.c (find_looparound_phi): Pass "init_stmt" to
5735 dr_analyze_innermost.
5736 * tree-vect-data-refs.c (vect_mark_for_runtime_alias_test):
5737 Convert return type from bool to opt_result, adding a message for
5738 the PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS zero case.
5739 (vect_analyze_data_ref_dependence): Convert return type from bool
5740 to opt_result. Change sense of return type from "false"
5741 effectively meaning "no problems" to "false" meaning a problem,
5742 so that "return false" becomes "return opt_result::success".
5743 Convert "return true" calls to opt_result::failure_at, using
5744 the location of statement A rather than vect_location.
5745 (vect_analyze_data_ref_dependences): Convert return type from bool
5747 (verify_data_ref_alignment): Likewise, converting dump_printf_loc
5748 calls to opt_result::failure_at, using the stmt location rather
5750 (vect_verify_datarefs_alignment): Convert return type from bool
5752 (vect_enhance_data_refs_alignment): Likewise. Split local "stat"
5753 into multiple more-tightly-scoped copies.
5754 (vect_analyze_data_refs_alignment): Convert return type from bool
5756 (vect_analyze_data_ref_accesses): Likewise, converting a
5757 "return false" to a "return opt_result::failure_at", adding a
5759 (vect_prune_runtime_alias_test_list): Convert return type from
5760 bool to opt_result, converting dump_printf_loc to
5761 opt_result::failure_at. Add a %G to show the pertinent statement,
5762 and use the stmt's location rather than vect_location.
5763 (vect_find_stmt_data_reference): Convert return type from
5764 bool to opt_result, converting dump_printf_loc to
5765 opt_result::failure_at, using stmt's location.
5766 (vect_analyze_data_refs): Convert return type from bool to
5767 opt_result. Convert "return false" to "return
5768 opt_result::failure_at", adding messages as needed.
5769 * tree-vect-loop.c (vect_determine_vf_for_stmt_1): Convert return
5770 type from bool to opt_result.
5771 (vect_determine_vf_for_stmt): Likewise.
5772 (vect_determine_vectorization_factor): Likewise, converting
5773 dump_printf_loc to opt_result::failure_at, using location of phi
5774 rather than vect_location.
5775 (vect_analyze_loop_form_1): Convert return type from bool to
5776 opt_result, converting dump_printf_loc calls, retaining the use of
5778 (vect_analyze_loop_form): Convert return type from loop_vec_info
5779 to opt_loop_vec_info.
5780 (vect_analyze_loop_operations): Convert return type from bool to
5781 opt_result, converting dump_printf_loc calls, using the location
5782 of phi/stmt rather than vect_location where available. Convert
5783 various "return false" to "return opt_result::failure_at" with
5784 "unsupported phi" messages.
5785 (vect_get_datarefs_in_loop): Convert return type from bool to
5786 opt_result. Add a message for the
5787 PARAM_LOOP_MAX_DATAREFS_FOR_DATADEPS failure.
5788 (vect_analyze_loop_2): Convert return type from bool to
5789 opt_result. Ensure "ok" is set to a opt_result::failure_at before
5790 each "goto again;", adding new messages where needed.
5791 Add "unsupported grouped {store|load}" messages.
5792 (vect_analyze_loop): Convert return type from loop_vec_info to
5794 * tree-vect-slp.c (vect_analyze_slp): Convert return type from
5796 * tree-vect-stmts.c (process_use): Likewise, converting
5797 dump_printf_loc call and using stmt location, rather than
5799 (vect_mark_stmts_to_be_vectorized): Likeise.
5800 (vect_analyze_stmt): Likewise, adding a %G.
5801 (vect_get_vector_types_for_stmt): Convert return type from bool to
5802 opt_result, converting dump_printf_loc calls and using stmt
5803 location, rather than vect_location.
5804 (vect_get_mask_type_for_stmt): Convert return type from tree to
5805 opt_tree, converting dump_printf_loc calls and using stmt location.
5806 * tree-vectorizer.c: Include "opt-problem.h.
5807 (try_vectorize_loop_1): Flag "Analyzing loop at" dump message as
5808 MSG_PRIORITY_INTERNALS. Convert local "loop_vinfo" from
5809 loop_vec_info to opt_loop_vec_info. If if fails, and dumping is
5810 enabled, use it to report at the top level "couldn't vectorize
5811 loop" followed by the problem.
5812 * tree-vectorizer.h (opt_loop_vec_info): New typedef.
5813 (vect_mark_stmts_to_be_vectorized): Convert return type from bool
5815 (vect_analyze_stmt): Likewise.
5816 (vect_get_vector_types_for_stmt): Likewise.
5817 (tree vect_get_mask_type_for_stmt): Likewise.
5818 (vect_analyze_data_ref_dependences): Likewise.
5819 (vect_enhance_data_refs_alignment): Likewise.
5820 (vect_analyze_data_refs_alignment): Likewise.
5821 (vect_verify_datarefs_alignment): Likewise.
5822 (vect_analyze_data_ref_accesses): Likewise.
5823 (vect_prune_runtime_alias_test_list): Likewise.
5824 (vect_find_stmt_data_reference): Likewise.
5825 (vect_analyze_data_refs): Likewise.
5826 (vect_analyze_loop): Convert return type from loop_vec_info to
5828 (vect_analyze_loop_form): Likewise.
5829 (vect_analyze_slp): Convert return type from bool to opt_result.
5831 2018-10-04 David Malcolm <dmalcolm@redhat.com>
5833 * doc/invoke.texi (-fopt-info): Document new "internals"
5835 * dump-context.h (dump_context::apply_dump_filter_p): New decl.
5836 * dumpfile.c (dump_options): Update for renaming of MSG_ALL to
5838 (optinfo_verbosity_options): Add "internals".
5839 (kind_as_string): Update for renaming of MSG_ALL to MSG_ALL_KINDS.
5840 (dump_context::apply_dump_filter_p): New member function.
5841 (dump_context::dump_loc): Use apply_dump_filter_p rather than
5842 explicitly masking the dump_kind.
5843 (dump_context::begin_scope): Increment the scope depth first. Use
5844 apply_dump_filter_p rather than explicitly masking the dump_kind.
5845 (dump_context::emit_item): Use apply_dump_filter_p rather than
5846 explicitly masking the dump_kind.
5847 (dump_dec): Likewise.
5848 (dump_hex): Likewise.
5849 (dump_switch_p_1): Default to MSG_ALL_PRIORITIES.
5850 (opt_info_switch_p_1): Default to MSG_PRIORITY_USER_FACING.
5851 (opt_info_switch_p): Update handling of default
5852 MSG_OPTIMIZED_LOCATIONS to cope with default of
5853 MSG_PRIORITY_USER_FACING.
5854 (dump_basic_block): Use apply_dump_filter_p rather than explicitly
5855 masking the dump_kind.
5856 (selftest::test_capture_of_dump_calls): Update test_dump_context
5857 instances to use MSG_ALL_KINDS | MSG_PRIORITY_USER_FACING rather
5858 than MSG_ALL. Generalize scope test to be run at all four
5859 combinations of with/without MSG_PRIORITY_USER_FACING and
5860 MSG_PRIORITY_INTERNALS, adding examples of explicit priority
5861 for each of the two values.
5862 * dumpfile.h (enum dump_flag): Add comment about the MSG_* flags.
5863 Rename MSG_ALL to MSG_ALL_KINDS. Add MSG_PRIORITY_USER_FACING,
5864 MSG_PRIORITY_INTERNALS, and MSG_ALL_PRIORITIES, updating the
5865 values for TDF_COMPARE_DEBUG and TDF_ALL_VALUES.
5866 (AUTO_DUMP_SCOPE): Add a note to the comment about the interaction
5867 with MSG_PRIORITY_*.
5868 * tree-vect-loop-manip.c (vect_loop_versioning): Mark versioning
5869 dump messages as MSG_PRIORITY_USER_FACING.
5870 * tree-vectorizer.h (DUMP_VECT_SCOPE): Add a note to the comment
5871 about the interaction with MSG_PRIORITY_*.
5873 2018-10-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
5875 * varasm.c (output_constant): Add new parameter merge_strings.
5876 Make strings properly zero terminated in merge string sections.
5877 (mergeable_string_section): Don't fail if the last char is non-zero.
5878 (assemble_variable_contents): Handle merge string sections.
5879 (assemble_variable): Likewise.
5880 (assemble_constant_contents): Likewise.
5881 (output_constant_def_contents): Likewise.
5882 (output_constructor_array_range,
5883 output_constructor_regular_field): Adjust call to output_constant.
5884 (output_object_block): Adjust call to assemble_constant_contents
5885 and assemble_variable_contents.
5887 2018-10-04 Martin Liska <mliska@suse.cz>
5890 * cgraphunit.c (process_function_and_variable_attributes):
5891 Warn about a function with alias attribute and a body.
5893 2018-10-04 Martin Liska <mliska@suse.cz>
5896 * multiple_target.c (redirect_to_specific_clone): New function.
5897 (ipa_target_clone): Use it.
5898 * tree-inline.c: Fix comment.
5900 2018-10-04 David Malcolm <dmalcolm@redhat.com>
5902 * dumpfile.c (gcc::dump_manager::dump_manager): Initialize new
5904 (gcc::dump_manager::~dump_manager): Free m_optinfo_filename.
5905 (gcc::dump_manager::register_pass): New member function, adapted
5906 from loop body in gcc::pass_manager::register_pass, adding a
5907 call to update_dfi_for_opt_info.
5908 (gcc::dump_manager::opt_info_enable_passes): Store the
5909 -fopt-info options into the new fields. Move the loop
5911 (gcc::dump_manager::update_dfi_for_opt_info): ...this new member
5913 * dumpfile.h (struct opt_pass): New forward decl.
5914 (gcc::dump_manager::register_pass): New decl.
5915 (gcc::dump_manager::update_dfi_for_opt_info): New decl.
5916 (class gcc::dump_manager): Add fields "m_optgroup_flags",
5917 "m_optinfo_flags", and "m_optinfo_filename".
5918 * passes.c (gcc::pass_manager::register_pass): Move all of the
5919 dump-handling code to gcc::dump_manager::register_pass.
5921 2018-10-04 Peter Bergner <bergner@linux.ibm.com>
5923 PR rtl-optimization/87466
5924 * target.def (setjmp_preserves_nonvolatile_regs_p): New target hook.
5925 * doc/tm.texi.in (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P): New hook.
5926 * doc/tm.texi: Regenerate.
5927 * ira-lives.c (process_bb_node_lives): Use the new target hook.
5928 * lra-lives.c (process_bb_lives): Likewise.
5929 * config/rs6000/rs6000.c (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P):
5932 2018-10-04 Tamar Christina <tamar.christina@arm.com>
5934 * params.c (add_params): Fix initialization.
5936 2018-10-04 Martin Liska <mliska@suse.cz>
5938 PR gcov-profile/84107
5939 * tree-profile.c (init_ic_make_global_vars):
5940 Remove ic_void_ptr_var and ic_gcov_type_ptr_var.
5941 Come up with new ic_tuple* variables. Emit
5942 __gcov_indirect_call{,_topn} variables.
5943 (gimple_gen_ic_profiler): Access the variable
5945 (gimple_gen_ic_func_profiler): Access
5946 __gcov_indirect_call.callee field.
5947 (gimple_init_gcov_profiler): Use ptr_type_node.
5948 * value-prof.c (gimple_ic): Use ptr_type_node.
5950 2018-10-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5952 PR tree-optimization/85787
5953 * ipa-pure-const.c (malloc_candidate_p_1): Move most of
5954 malloc_candidate_p into this function and add support for
5955 detecting multiple phis.
5956 (DUMP_AND_RETURN): Move from malloc_candidate_p into top-level macro.
5958 2018-10-04 Martin Liska <mliska@suse.cz>
5961 * ipa-inline.c (inline_to_all_callers_1):
5962 Call ultimate_alias_target for node being inlined.
5964 2018-10-03 Jeff Law <law@redhat.com>
5966 * gimple-ssa-sprintf.c (format_string): Do not hardcode size of
5968 * tree.c (get_typenode_from_name): Moved from fortran/trans-types.c.
5969 * tree.h (get_typenode_from_name): Prototype.
5971 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
5973 * config/i386/i386.md (*cmp<X87MODEF:mode>_<SWI24:mode>_i387):
5974 Change operand 2 predicate to nonimmediate_operand.
5975 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
5977 2018-10-03 Martin Sebor <msebor@redhat.com>
5978 Jeff Law <law@redhat.com>
5980 * gimple-ssa-sprintf.c (struct fmtresult): Add new member and
5982 (get_string_length): Detect unterminated arrays.
5983 (format_string): Same.
5984 (format_directive): Warn about unterminated arrays.
5985 (handle_gimple_call): Mark statements with no_warning as needed.
5987 2018-10-03 Jim Wilson <jimw@sifive.com>
5989 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): For ABI_ILP32E,
5990 also define __riscv_abi_rve. Delete trailing white space.
5992 2018-10-03 Paul Koning <ni1d@arrl.net>
5994 Enable LRA register allocator for PDP11.
5995 * config/pdp11/constraints.md (Q): Use define_memory_constraint.
5998 * config/pdp11/pdp11.c (pdp11_lra_p): New function.
5999 * config/pdp11/pdp11.opt (-mlra): New option.
6000 * doc/invoke.texi (PDP-11 Options): Document -mlra.
6002 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
6004 * config/i386/i386.md (*<absneg:code>extendsfdf2): Remove.
6005 (*<absneg:code>extend<mode>xf2): Ditto.
6007 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
6009 PR tree-optimization/87415
6010 * tree-vrp.c (set_value_range_with_overflow): Special case one bit
6013 2018-10-02 Jeff Law <law@redhat.com>
6015 * gimple-fold.c (get_range_strlen): Only set *nonstr when
6016 an unterminated string is discovered. Bubble up range
6017 even for unterminated strings.
6018 (gimple_fold_builtin_strlen): Do not fold if get_range_strlen
6019 indicates the string was not terminated via NONSTR.
6021 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
6023 * tree-vrp.c (extract_range_from_unary_expr): Special case all
6024 pointer conversions.
6025 Do not do anything special for anti-ranges.
6027 2018-10-03 Jérôme Lambourg <lambourg@adacore.com>
6029 * config/arm/vxworks.h (ARM_TARGET2_DWARF_FORMAT): Adjust to
6030 DW_EH_PE_pcrel | DW_EH_PE_indirect for RTPs.
6032 2018-10-03 Martin Liska <mliska@suse.cz>
6034 PR gcov-profile/86109
6035 * coverage.c (coverage_begin_function): Do not
6036 mark lambdas as artificial.
6037 * tree-core.h (struct GTY): Remove tm_clone_flag
6038 and introduce new lambda_function.
6039 * tree.h (DECL_LAMBDA_FUNCTION): New macro.
6041 2018-10-02 Aaron Sawdey <acsawdey@linux.ibm.com>
6044 * config/rs6000/rs6000-string.c (expand_strn_compare): Check that both
6045 P8_VECTOR and VSX are enabled.
6047 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
6049 * config/s390/driver-native.c (s390_host_detect_local_cpu): Add
6050 0x3907 as CPU model number.
6052 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
6054 * common/config/s390/s390-common.c: Rename PF_ARCH12 to PF_Z14.
6055 * config/s390/s390.h (enum processor_flags): Rename PF_ARCH12 to
6056 PF_Z14. Rename TARGET_CPU_ARCH12 to TARGET_CPU_Z14,
6057 TARGET_CPU_ARCH12_P to TARGET_CPU_Z14_P, TARGET_ARCH12 to
6058 TARGET_Z14, and TARGET_ARCH12_P to TARGET_Z14_P.
6059 * config/s390/s390.md: Likewise. Rename also the cpu attribute
6060 value from arch12 to z14.
6062 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
6064 * config/i386/i386.md (fxam<mode>2_i387_with_temp): Remove.
6066 (isinf<mode>2): Ditto.
6068 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
6070 * config/i386/i386.c (ix86_emit_i387_round): Extend op1 to XFmode
6071 before emitting fxam. Perform calculations in XFmode.
6073 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
6075 * match.pd (((X /[ex] A) +- B) * A): New transformation.
6077 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
6080 * fold-const.c (fold_plusminus_mult_expr): Handle complex and vectors.
6081 * tree.c (signed_or_unsigned_type_for): Handle complex.
6083 2018-10-02 Jeff Law <law@redhat.com>
6085 * gimple-fold.c (get_range_strlen): Remove dead code.
6087 2018-10-02 Martin Sebor <msebor@redhat.com>
6088 Jeff Law <law@redhat.com>
6090 * builtins.c (unterminated_array): Add new arguments.
6091 If argument is not terminated, bubble up size and exact
6093 (expand_builtin_strnlen): Detect, avoid expanding
6094 and diagnose unterminated arrays.
6095 (c_strlen): Fill in offset of start of unterminated strings.
6096 * builtins.h (unterminated_array): Update prototype.
6098 2018-10-02 Richard Biener <rguenther@suse.de>
6100 * config/i386/sse.md (reduc_plus_scal_v4df): Avoid the use
6101 of haddv4df, first reduce to SSE width and exploit the fact
6102 that we only need element zero with the reduction result.
6103 (reduc_plus_scal_v2df): Likewise.
6105 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
6107 * dojump.h (do_jump): Delete.
6108 (do_jump_1): Likewise.
6109 (split_comparison): Move around.
6110 * dojump.c (do_jump): Make static.
6111 (do_jump_1): Likewise.
6112 (jumpifnot): Move around.
6113 (jumpifnot_1): Likewise.
6115 (jumpif_1): Likewise.
6116 * expr.c (expand_expr_real_1): Call jumpif[not] instead of do_jump.
6118 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
6120 * reorg.c (make_return_insns): Use emit_copy_of_insn_after for the
6121 insns in the delay slot and add_insn_after for the jump insn.
6123 2018-10-02 Richard Biener <rguenther@suse.de>
6125 * tree-inline.c (expand_call_inline): Use the location of
6126 the callee declaration for the inline-entry marker.
6127 * final.c (notice_source_line): Remove special-casing of
6128 NOTE_INSN_INLINE_ENTRY.
6130 2018-10-01 Carl Love <cel@us.ibm.com>
6133 * config/rs6000/rs6000-builtin.def (__builtin_mffsl): New.
6134 (__builtin_mtfsb0): New.
6135 (__builtin_mtfsb1): New.
6136 ( __builtin_set_fpscr_rn): New.
6137 (__builtin_set_fpscr_drn): New.
6138 * config/rs6000/rs6000.c (rs6000_expand_mtfsb_builtin): Add.
6139 (rs6000_expand_set_fpscr_rn_builtin): Add.
6140 (rs6000_expand_set_fpscr_drn_builtin): Add.
6141 (rs6000_expand_builtin): Add case statement entries for
6142 RS6000_BUILTIN_MTFSB0, RS6000_BUILTIN_MTFSB1,
6143 RS6000_BUILTIN_SET_FPSCR_RN, RS6000_BUILTIN_SET_FPSCR_DRN,
6144 RS6000_BUILTIN_MFFSL.
6145 (rs6000_init_builtins): Add ftype initialization and def_builtin
6146 calls for __builtin_mffsl, __builtin_mtfsb0, __builtin_mtfsb1,
6147 __builtin_set_fpscr_rn, __builtin_set_fpscr_drn.
6148 * config/rs6000.md (rs6000_mtfsb0, rs6000_mtfsb1, rs6000_mffscrn,
6149 rs6000_mffscdrn): Add define_insn.
6150 (rs6000_set_fpscr_rn, rs6000_set_fpscr_drn): Add define_expand.
6151 * doc/extend.texi: Add documentation for the builtins.
6153 2018-10-01 Richard Biener <rguenther@suse.de>
6155 PR tree-optimization/87465
6156 * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Fix typo
6157 causing branch miscounts.
6159 2018-10-01 Tamar Christina <tamar.christina@arm.com>
6161 * common/config/aarch64/aarch64-common.c (TARGET_OPTION_DEFAULT_PARAM,
6162 aarch64_option_default_param): New.
6163 (params.h): Include.
6164 (TARGET_OPTION_VALIDATE_PARAM, aarch64_option_validate_param): New.
6165 * config/aarch64/aarch64.c (aarch64_override_options_internal): Simplify
6166 stack-clash protection validation code.
6168 2018-10-01 Tamar Christina <tamar.christina@arm.com>
6170 * params.c (validate_param): New.
6171 (add_params): Use it.
6172 (set_param_value): Refactor param validation into validate_param.
6173 (diagnostic.h): Include.
6174 * diagnostic.h (diagnostic_ready_p): New.
6176 2018-10-01 Tamar Christina <tamar.christina@arm.com>
6178 * params.c (set_param_value):
6179 Add index of parameter being validated.
6180 * common/common-target.def (option_validate_param): New.
6181 * common/common-targhooks.h (default_option_validate_param): New.
6182 * common/common-targhooks.c (default_option_validate_param): New.
6183 * doc/tm.texi.in (TARGET_OPTION_VALIDATE_PARAM): New.
6184 * doc/tm.texi: Regenerate.
6186 2018-10-01 Tamar Christina <tamar.christina@arm.com>
6189 * config/aarch64/aarch64.c (aarch64_override_options_internal):
6190 Add validation for stack-clash parameters and set defaults.
6192 2018-10-01 Tamar Christina <tamar.christina@arm.com>
6195 * configure.ac: Add stack-clash-protection-guard-size.
6196 * doc/install.texi: Document it.
6197 * config.in (DEFAULT_STK_CLASH_GUARD_SIZE): New.
6198 * params.def: Update comment for guard-size.
6199 (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE,
6200 PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Update description.
6201 * configure: Regenerate.
6203 2018-10-01 Tamar Christina <tamar.christina@arm.com>
6206 * config/aarch64/aarch64.h (STACK_CLASH_MIN_BYTES_OUTGOING_ARGS,
6207 STACK_DYNAMIC_OFFSET): New.
6208 * config/aarch64/aarch64.c (aarch64_layout_frame):
6209 Update outgoing args size.
6210 (aarch64_stack_clash_protection_alloca_probe_range,
6211 TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
6213 2018-10-01 Tamar Christina <tamar.christina@arm.com>
6216 * explow.c (anti_adjust_stack_and_probe_stack_clash): Support custom
6218 * target.def (stack_clash_protection_alloca_probe_range): New.
6219 (stack_clash_protection_final_dynamic_probe): Remove.
6220 * targhooks.h (default_stack_clash_protection_alloca_probe_range) New.
6221 (default_stack_clash_protection_final_dynamic_probe): Remove.
6222 * targhooks.c: Likewise.
6223 * doc/tm.texi.in (TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
6224 (TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE): Remove.
6225 * doc/tm.texi: Regenerate.
6227 2018-10-01 Tamar Christina <tamar.christina@arm.com>
6230 * config/aarch64/aarch64-protos.h (aarch64_output_probe_sve_stack_clash): New.
6231 * config/aarch64/aarch64.c (aarch64_output_probe_sve_stack_clash,
6232 aarch64_clamp_to_uimm12_shift): New.
6233 (aarch64_allocate_and_probe_stack_space): Add SVE specific section.
6234 * config/aarch64/aarch64.md (probe_sve_stack_clash): New.
6236 2018-10-01 Tamar Christina <tamar.christina@arm.com>
6239 * config/aarch64/aarch64.c (aarch64_layout_frame): Add assert.
6241 2018-10-01 Jeff Law <law@redhat.com>
6242 Richard Sandiford <richard.sandiford@linaro.org>
6243 Tamar Christina <tamar.christina@arm.com>
6246 * config/aarch64/aarch64.md
6247 (probe_stack_range): Add k (SP) constraint.
6248 * config/aarch64/aarch64.h (STACK_CLASH_CALLER_GUARD,
6249 STACK_CLASH_MAX_UNROLL_PAGES): New.
6250 * config/aarch64/aarch64.c (aarch64_output_probe_stack_range): Emit
6251 stack probes for stack clash.
6252 (aarch64_allocate_and_probe_stack_space): New.
6253 (aarch64_expand_prologue): Use it.
6254 (aarch64_expand_epilogue): Likewise and update IP regs re-use criteria.
6255 (aarch64_sub_sp): Add emit_move_imm optional param.
6257 2018-10-01 MCC CS <deswurstes@users.noreply.github.com>
6259 PR tree-optimization/87261
6260 * match.pd: Remove trailing whitespace.
6261 Add (x & y) | ~(x | y) -> ~(x ^ y),
6262 (~x | y) ^ (x ^ y) -> x | ~y and (x ^ y) | ~(x | y) -> ~(x & y)
6264 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
6266 * config/arc/arc.md (*add_n): Clean up pattern, update instruction
6268 (ashlsi3_insn): Update instruction constraints.
6269 (ashrsi3_insn): Likewise.
6270 (rotrsi3): Likewise.
6271 (add_shift): Likewise.
6272 * config/arc/constraints.md (Csz): New 32 bit constraint. It
6273 avoids placing in the limm field small constants which, otherwise,
6274 could end into a small instruction.
6276 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
6278 * config/arc/arc.md (maddsidi4_split): Don't use dmac if the
6279 destination register is not odd-even.
6280 (umaddsidi4_split): Likewise.
6282 2018-10-01 Richard Biener <rguenther@suse.de>
6284 * tree-inline.c (expand_call_inline): Store origin of fn
6285 in BLOCK_ABSTRACT_ORIGIN for the inline BLOCK.
6286 * tree.c (block_ultimate_origin): Simplify and do some
6289 2018-09-30 Uros Bizjak <ubizjak@gmail.com>
6291 * config/i386/mmx.md (EMMS): New int iterator.
6292 (emms): New int attribute.
6293 (mmx_<emms>): Macroize insn from *mmx_emms and *mmx_femms using
6294 EMMS int iterator. Explicitly declare clobbers.
6295 (mmx_emms): Remove expander.
6297 * config/i386/predicates.md (emms_operation): Remove predicate.
6298 (vzeroall_pattern): New predicate.
6299 (vzeroupper_pattern): Rename from vzeroupper_operation.
6300 * config/i386/i386.c (ix86_avx_u128_mode_after): Use
6301 vzeroupper_pattern and vzeroall_pattern predicates.
6303 2018-09-30 Peter Bergner <bergner@linux.ibm.com>
6305 PR rtl-optimization/86939
6306 * ira-lives.c (make_hard_regno_born): Rename from this...
6307 (make_hard_regno_live): ... to this. Remove update to conflict
6308 information. Update function comment.
6309 (make_hard_regno_dead): Add conflict information update. Update
6311 (make_object_born): Rename from this...
6312 (make_object_live): ... to this. Remove update to conflict information.
6313 Update function comment.
6314 (make_object_dead): Add conflict information update. Update function
6316 (mark_pseudo_regno_live): Call make_object_live.
6317 (mark_pseudo_regno_subword_live): Likewise.
6318 (mark_hard_reg_dead): Update function comment.
6319 (mark_hard_reg_live): Call make_hard_regno_live.
6320 (process_bb_node_lives): Likewise.
6321 * lra-lives.c (make_hard_regno_born): Rename from this...
6322 (make_hard_regno_live): ... to this. Remove update to conflict
6323 information. Remove now uneeded check_pic_pseudo_p argument.
6324 Update function comment.
6325 (make_hard_regno_dead): Add check_pic_pseudo_p argument and add update
6326 to conflict information. Update function comment.
6327 (mark_pseudo_live): Remove update to conflict information. Update
6329 (mark_pseudo_dead): Add conflict information update.
6330 (mark_regno_live): Call make_hard_regno_live.
6331 (mark_regno_dead): Call make_hard_regno_dead with new arguement.
6332 (process_bb_lives): Call make_hard_regno_live and make_hard_regno_dead.
6334 2018-09-29 H.J. Lu <hongjiu.lu@intel.com>
6337 * config/i386/i386.c (construct_container): Use TImode for
6338 BLKmode values in 2 integer registers.
6340 2018-09-29 Jeff Law <law@redhat.com>
6342 * builtins.c (unterminated_array): Pass in c_strlen_data * to
6343 c_strlen rather than just a tree *.
6344 (c_strlen): Change NONSTR argument to a c_strlen_data pointer.
6345 Update recursive calls appropriately. If caller did not provide a
6346 suitable data pointer, create a local one. When a non-terminated
6347 string is discovered, bubble up information about the string via the
6348 c_strlen_data object.
6349 * builtins.h (c_strlen): Update prototype.
6350 (c_strlen_data): New structure.
6351 * gimple-fold.c (get_range_strlen): Update calls to c_strlen.
6352 For a type 2 call, if c_strlen indicates a non-terminated string
6353 use the length of the non-terminated string.
6354 (gimple_fold_builtin_stpcpy): Update calls to c_strlen.
6356 2018-09-29 Jakub Jelinek <jakub@redhat.com>
6359 * config/i386/avx512fintrin.h (_mm512_abs_pd, _mm512_mask_abs_pd): Use
6360 __m512d type for __A argument rather than __m512.
6362 2018-09-28 John David Anglin <danglin@gcc.gnu.org>
6364 * match.pd (simple_comparison): Don't optimize if either operand is
6365 a function pointer when target needs function pointer canonicalization.
6367 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
6369 * config/rs6000/driver-rs6000.c (asm_names): Adjust the entries for
6370 power5 .. power9 to remove indirection.
6371 * config/rs6000/rs6000.h (ASM_CPU_POWER5_SPEC, ASM_CPU_POWER6_SPEC,
6372 ASM_CPU_POWER7_SPEC, ASM_CPU_POWER8_SPEC, ASM_CPU_POWER9_SPEC,
6373 ASM_CPU_476_SPEC): Delete.
6374 (ASM_CPU_SPEC): Adjust.
6375 (EXTRA_SPECS): Delete asm_cpu_power5, asm_cpu_power6, asm_cpu_power7,
6376 asm_cpu_power8, asm_cpu_power9, asm_cpu_476.
6378 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
6380 * config.in: Delete HAVE_AS_DCI.
6381 * config/powerpcspe/powerpcspe.h: Treat HAVE_AS_DCI as always true.
6382 * config/rs6000/rs6000.h: Ditto.
6383 * configure.ac: Delete HAVE_AS_DCI.
6384 * configure: Regenerate.
6386 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
6388 * config.in (HAVE_AS_LWSYNC): Delete.
6389 * config/powerpcspe/powerpcspe.h (TARGET_LWSYNC_INSTRUCTION): Delete.
6390 * config/powerpcspe/sync.md (*lwsync): Always generate lwsync, never
6392 * config/rs6000/rs6000.h (TARGET_LWSYNC_INSTRUCTION): Delete.
6393 * config/rs6000/sync.md (*lwsync): Always generate lwsync, never do it
6395 * configure.ac: Delete HAVE_AS_LWSYNC.
6396 * configure: Regenerate.
6398 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
6399 Pierre-Marie de Rodat <derodat@adacore.com>
6401 * calls.c (expand_call): Try to do a tail call for thunks at -O0 too.
6402 * cgraph.h (struct cgraph_thunk_info): Add indirect_offset.
6403 (cgraph_node::create_thunk): Add indirect_offset parameter.
6404 (thunk_adjust): Likewise.
6405 * cgraph.c (cgraph_node::create_thunk): Add indirect_offset parameter
6406 and initialize the corresponding field with it.
6407 (cgraph_node::dump): Dump indirect_offset field.
6408 * cgraphclones.c (duplicate_thunk_for_node): Deal with indirect_offset.
6409 * cgraphunit.c (cgraph_node::analyze): Be prepared for external thunks.
6410 (thunk_adjust): Add indirect_offset parameter and deal with it.
6411 (cgraph_node::expand_thunk): Deal with the indirect_offset field and
6412 pass it to thunk_adjust. Do not call the target hook if it's non-zero
6413 or if the thunk is external or local. Fix formatting. Do not chain
6414 the RESULT_DECL to BLOCK_VARS. Pass the static chain to the target,
6415 if any, in the GIMPLE representation.
6416 * ipa-icf.c (sem_function::equals_wpa): Deal with indirect_offset.
6417 * lto-cgraph.c (lto_output_node): Write indirect_offset field.
6418 (input_node): Read indirect_offset field.
6419 * tree-inline.c (expand_call_inline): Pass indirect_offset field in the
6420 call to thunk_adjust.
6421 * tree-nested.c (struct nesting_info): Add thunk_p field.
6422 (create_nesting_tree): Set it.
6423 (convert_all_function_calls): Copy static chain from targets to thunks.
6424 (finalize_nesting_tree_1): Return early for thunks.
6425 (unnest_nesting_tree_1): Do not finalize thunks.
6426 (gimplify_all_functions): Do not gimplify thunks.
6428 2018-09-28 David Malcolm <dmalcolm@redhat.com>
6430 * opt-suggestions.c (option_proposer::build_option_suggestions):
6431 Release "option_values".
6433 2018-09-28 David Malcolm <dmalcolm@redhat.com>
6435 * coverage.c (get_coverage_counts): Convert problem-reporting dump
6436 messages from MSG_OPTIMIZED_LOCATIONS to MSG_MISSED_OPTIMIZATION.
6437 * dumpfile.c (kind_as_string): New function.
6438 (dump_loc): Rather than a hardcoded prefix of "note: ", use
6439 kind_as_string to vary the prefix based on dump_kind.
6440 (selftest::test_capture_of_dump_calls): Update for above.
6442 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
6444 * config/i386/i386.h (SSE_REGNO): Fix check for FIRST_REX_SSE_REG.
6445 (GET_SSE_REGNO): Rename from SSE_REGNO. Update all uses for rename.
6447 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
6449 * config/i386/i386.h (CC_REGNO): Remove FPSR_REG.
6450 * config/i386/i386.c (ix86_fixed_condition_code_regs): Use
6451 INVALID_REGNUM instead of FPSR_REG.
6452 (ix86_md_asm_adjust): Do not clobber FPSR_REG.
6453 * config/i386/i386.md: Update comment of FP compares.
6454 (fldenv): Do not clobber FPSR_REG.
6456 2018-09-28 Richard Biener <rguenther@suse.de>
6458 * tree.h (BLOCK_ORIGIN): New.
6459 * omp-expand.c (grid_expand_target_grid_body): Assign
6460 BLOCK_ORIGIN to BLOCK_ABSTRACT_ORIGIN.
6461 * tree-inline.c (remap_block): Likewise.
6462 * auto-profile.c (get_function_decl_from_block): Simplify
6463 by eliding the BLOCK_ABSTRACT_ORIGIN chasing.
6464 * langhooks.c (lhd_print_error_function): Likewise.
6465 * optinfo-emit-json.cc (optrecord_json_writer::inlining_chain_to):
6467 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
6468 * tree.c (block_nonartificial_location): Likewise.
6469 (block_ultimate_origin): Likewise.
6470 * tree-pretty-print.c (percent_K_format): Likewise. Remove
6471 no longer needed LTO case.
6473 2018-09-28 Andrew Stubbs <ams@codesourcery.com>
6474 Jan Hubicka <jh@suse.cz>
6475 Martin Jambor <mjambor@suse.cz>
6477 * simplify-rtx.c (simplify_merge_mask): New function.
6478 (simplify_ternary_operation): Use it, also see if VEC_MERGEs with the
6479 same masks are used in op1 or op2.
6480 (test_vec_merge): New function.
6481 (test_vector_ops): Call test_vec_merge.
6483 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
6485 * config/sparc/sparc-protos.h (sparc_branch_cost): Declare.
6486 * config/sparc/sparc.h (BRANCH_COST): Call sparc_branch_cost.
6487 * config/sparc/sparc.c (struct processor_costs): Add branch_cost field.
6488 (cypress_costs): Set it.
6489 (supersparc_costs): Likewise.
6490 (hypersparc_costs): Likewise.
6491 (leon_cost): Likewise.
6492 (leon3_costs): Likewise.
6493 (sparclet_costs): Likewise.
6494 (ultrasparc_costs): Likewise.
6495 (ultrasparc_costs): Likewise.
6496 (niagara_costs): Likewise.
6497 (niagara2_costs): Likewise.
6498 (niagara3_costs): Likewise.
6499 (niagara4_costs): Likewise.
6500 (niagara7_costs): Likewise.
6501 (m8_costs): Likewise.
6502 (TARGET_CAN_FOLLOW_JUMP): Define.
6503 (pass_work_around_errata::gate): Minor tweak.
6504 (sparc_option_override): Remove MASK_FSMULD mask for V7 processors.
6505 Do not set both MASK_VIS4 and MASK_VIS4B for M8 processor.
6506 Automaitcally clear MASK_FSMULD mask for V7 processors.
6507 (sparc_can_follow_jump): New static function.
6508 (output_ubranch): Deal with CROSSING_JUMP_P.
6509 (sparc_use_sched_lookahead): Rewrite using switch statement.
6510 (sparc_issue_rate): Reorder.
6511 (sparc_branch_cost): New function.
6513 2018-09-27 Martin Sebor <msebor@redhat.com>
6515 * tree.h (tree_to_shwi): Add attribute nonnull and pure.
6516 (tree_to_poly_int64, tree_to_uhwi, tree_to_poly_uint64): Same.
6517 (int_fits_type_p): Same.
6519 2018-09-27 Uros Bizjak <ubizjak@gmail.com>
6521 * config/i386/i386.md (FPCR_REG): Remove.
6522 (UNSPEC_FLDCW): Remove.
6523 (x86_fnstcw_1): Use (const_int 0) instead of FPCR_REG.
6524 (x86_fldcw_1): Remove insn pattern.
6525 (fnstenv): Do not clobber FPCR_REG.
6527 * config/i386/i386.h (FIXED_REGISTERS) Remove fpsr register.
6528 (CALL_USED_REGISTERS): Ditto.
6529 (REG_ALLOC_ORDER): Ditto.
6530 (REG_CLASS_CONTENTS): Ditto.
6531 (HI_REGISTER_NAMES): Ditto.
6532 (ADDITIONAL_REGISTER_NAMES): Use defines instead
6533 of numerical constants.
6534 * config/i386/i386.c (regclass_map): Remove fpsr register.
6535 (dbx_register_map): Ditto.
6536 (dbx64_register_map): Ditto.
6537 (svr4_dbx_register_map): Ditto.
6538 (print_reg): Do not handle FPCR_REG.
6540 2018-09-27 Segher Boessenkool <segher@kernel.crashing.org>
6543 * config.in (HAVE_AS_CMPB, HAVE_AS_DFP, HAVE_AS_FPRND, HAVE_AS_MFPGPR,
6544 HAVE_AS_POPCNTB, HAVE_AS_POPCNTD, HAVE_AS_POWER8, HAVE_AS_POWER9):
6545 Delete, always treat as true.
6546 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
6547 Ditto. Simplify remaining code.
6548 * config/powerpcspe/powerpcspe.h: Ditto.
6549 * config/rs6000/rs6000.c (rs6000_option_override_internal): Ditto.
6550 Simplify remaining code.
6551 (rs6000_expand_builtin): Ditto.
6552 * config/rs6000/rs6000.h: Ditto.
6553 * configure.ac: Ditto.
6554 * configure: Regenerate.
6556 2018-09-27 Martin Liska <mliska@suse.cz>
6558 * coverage.c (get_coverage_counts): Revert the formatting
6559 of missing profile opt info.
6561 2018-09-27 Richard Biener <rguenther@suse.de>
6565 * dwarf2out.c (set_block_origin_self): Do not mark outermost
6566 block as we do not output that.
6567 (gen_inlined_subroutine_die): Elide the originally outermost
6568 block, matching what we do for concrete instances.
6569 (decls_for_scope): Add parameter specifying whether to recurse
6572 2018-09-27 Andrew Stubbs <ams@codesourcery.com>
6573 Tom de Vries <tom@codesourcery.com>
6577 * expmed.c (emit_cstore): Fix handling of result_mode == BImode and
6578 STORE_FLAG_VALUE == 1.
6580 2018-09-27 Andreas Krebbel <krebbel@linux.ibm.com>
6582 * config/s390/s390.md (PPA_TX_ABORT, PPA_OOO_BARRIER): New
6583 constant definitions.
6584 ("tx_assist"): Replace magic number with PPA_TX_ABORT.
6585 ("*ppa"): Enable pattern also for -march=zEC12 -mno-htm.
6586 ("speculation_barrier"): New expander definition.
6588 2018-09-26 Indu Bhagat <indu.bhagat@oracle.com>
6590 PR gcov-profile/86957
6591 * common.opt: New warning option -Wmissing-profile.
6592 * coverage.c (get_coverage_counts): Add warning for missing .gcda file.
6593 * doc/invoke.texi: Document -Wmissing-profile.
6595 2018-09-26 Jim Wilson <jimw@sifive.com>
6597 * config/riscv/riscv.md (subsi3_extended2): Add J constraint.
6598 (negdi2, negsi2, negsi2_extended, negsi2_extended2): New.
6600 2018-09-26 Martin Sebor <msebor@redhat.com>
6602 * tree.c (zerop): Change return type to bool.
6603 (integer_zerop, integer_onep, integer_each_onep): Same.
6604 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
6605 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
6606 (real_onep, real_minus_onep, chain_index): Same.
6607 (print_type_hash_statistics, type_list_equal): Same.
6608 * tree.h (zerop): Same.
6609 (zerop, integer_zerop, integer_onep, integer_each_onep): Same.
6610 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
6611 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
6612 (real_onep, real_minus_onep, chain_index): Same.
6613 (print_type_hash_statistics, type_list_equal): Same.
6615 2018-09-26 Jim Wilson <jimw@sifive.com>
6617 * config/riscv/riscv.h (FUNCTION_ARG_REGNO_P): Fix comment.
6619 2018-09-26 Jakub Jelinek <jakub@redhat.com>
6622 * config/i386/i386.c: Include debug.h and dwarf2out.h.
6623 (output_indirect_thunk): Emit DW_CFA_def_cfa_offset after the
6626 2018-09-25 Andrew Stubbs <ams@codesourcery.com>
6628 * builtins.c (get_builtin_sync_mem): Force address mode conversion.
6630 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
6632 * config/i386/i386.h (enum reg_class): Remove FP_TOP_SSE_REGS
6633 and FP_SECOND_SSE_REGS.
6634 (REG_CLASS_NAMES): Ditto.
6635 (REG_CLASS_CONTENTS): Ditto.
6636 * config/i386/i386.c (ix86_preferred_reload_class) Do not handle
6637 FP_TOP_SSE_REGS and FP_SECOND_SSE_REGS classes.
6638 (ix86_preferred_output_reload_class): Ditto.
6639 * config/i386/i386.md (fix_trunc<mode>_i387_fisttp): Change "=&1f"
6640 clobber constraint to "=&f".
6641 (fix_truncdi_i387): Ditto.
6642 (lrintxfdi2): Ditto.
6643 (fistdi2_<rounding>): Ditto.
6644 (fpremxf4_i387): Change "=u" constraint to "=f".
6645 (fprem1xf4_i387): Ditto.
6647 (fptanxf4_i387): Ditto.
6648 (fxtractxf3_i387): Ditto.
6649 (fscalexf4_i387): Ditto.
6650 (atan2xf3): Change "u" constraint to "f".
6651 (fyl2xxf3_i387): Ditto.
6652 (fyl2xp1xf3_i387): Ditto.
6654 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
6657 * config/i386/i386.h (NUM_MODES_FOR_MODE_SWITCHING): Update
6658 for removed I387_MASK_PM entity.
6661 2018-09-26 Jeff Law <law@redhat.com>
6663 2018-09-26 Alexey Neyman <stilor@att.net>
6665 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
6666 headers are no longer pulled in by <isl/val.h>.
6668 2018-09-26 Richard Biener <rguenther@suse.de>
6671 * dwarf2out.c (gen_lexical_block_die): Do not equate inline
6672 or concrete instance DIE to the tree. Create abstract origin
6673 attributes also for concrete instances.
6675 2018-09-26 Alexey Neyman <stilor@att.net>
6677 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
6678 headers are no longer pulled in by <isl/val.h>.
6680 2018-09-26 Matthew Malcomson <matthew.malcomson@arm.com>
6682 * config/arm/arm.c (arm_split_compare_and_swap, arm_split_atomic_op):
6683 Use new helper functions.
6684 * config/arm/sync.md (atomic_load<mode>, atomic_store<mode>):
6685 Use new helper functions.
6686 * config/arm/aarch-common-protos.h (aarch_mm_needs_acquire,
6687 aarch_mm_needs_release): New declarations.
6688 * config/arm/aarch-common.c (aarch_mm_needs_acquire,
6689 aarch_mm_needs_release): New.
6691 2018-09-26 Eric Botcazou <ebotcazou@adacore.com>
6693 * config/arm/arm.c (arm_reorg): Skip Thumb reorg pass for thunks.
6694 (arm32_output_mi_thunk): Deal with long calls.
6696 2018-09-26 Richard Biener <rguenther@suse.de>
6700 * tree-inline.c (expand_call_inline): When the location
6701 of the call is UNKNOWN_LOCATION use DECL_SOURCE_LOCATION
6702 or BUILTINS_LOCATION for the BLOCK_SOURCE_LOCATION of
6703 the inserted BLOCK to make inlined_function_outer_scope_p
6705 * dwarf2out.c (add_call_src_coords_attributes): Do not add
6706 coords for reserved locations.
6708 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
6710 * config/rs6000/rs6000.md (*movcc_internal1): Use set_attr_alternative.
6711 (*call_indirect_nonlocal_sysv<mode>): Ditto.
6712 (*call_value_indirect_nonlocal_sysv<mode>): Ditto.
6713 (*sibcall_nonlocal_sysv<mode>): Ditto.
6714 (*sibcall_value_nonlocal_sysv<mode>): Ditto.
6715 (<bd>_<mode>): Ditto.
6716 (<bd>tf_<mode>): Ditto.
6718 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
6720 * config/rs6000/altivec.md (*altivec_mov<mode>): Write the output
6721 control string as a list of templates instead of as C code.
6722 (*altivec_movti): Ditto.
6723 * config/rs6000/darwin.md (movdf_low_di): Ditto.
6725 2018-09-25 Jim Wilson <jimw@sifive.com>
6727 * config/riscv/riscv.c (riscv_split_symbol): Mark auipc label as weak
6728 when target symbol is weak.
6730 2018-09-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
6733 * builtins.c (unterminated_array): Simplify.
6734 * expr.c (string_constant): Handle SSA_NAME. Add more exceptions
6735 where pointer arithmetic is safe.
6737 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
6740 * config/rs6000/altivec.md (altivec_vspltb): Use
6741 const_0_to_15_operand instead of u5bit_cint_operand.
6742 (*altivec_vspltb_internal): Ditto.
6743 (altivec_vspltb_direct): Ditto.
6744 (altivec_vsplth): Use const_0_to_7_operand instead of
6746 (*altivec_vsplth_internal): Ditto.
6747 (altivec_vsplth_direct): Ditto.
6748 (altivec_vspltw): Use const_0_to_3_operand instead of
6750 (*altivec_vspltw_internal): Ditto.
6751 (altivec_vspltw_direct): Ditto.
6752 (altivec_vspltsf): Ditto.
6753 (*altivec_vspltsf_internal): Ditto.
6754 * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Handle the
6755 various splats with the proper size immediate. Reorder the various
6756 cases by ascending size of immediate, and put all such together.
6758 2018-09-25 Richard Biener <rguenther@suse.de>
6761 * dwarf2out.c (add_AT_external_die_ref): Remove now redundant
6763 (maybe_create_die_with_external_ref): Do not create
6764 DW_TAG_imported_unit here.
6765 (add_abstract_origin_attribute): Handle external BLOCK refs.
6766 (dwarf2out_abstract_function): Simplify LTO case.
6767 (dwarf2out_early_finish): Create DW_TAG_imported_unit explicitely
6768 rather than using maybe_create_die_with_external_ref.
6770 2018-09-25 Uros Bizjak <ubizjak@gmail.com>
6773 * config/i386/i386.md (frndintxf2_mask_pm): Remove.
6774 (frndintxf2_mask_pm_i387): Ditto.
6775 (nearbyintxf2): Rewrite expander pattern to match rintxf2.
6776 Enable for !flag_trapping_math.
6777 (nearbyint<mode>2): Enable x87 modes for !flag_trapping_math.
6778 Enable SSE modes for TARGET_SSE4_1 and expand them with round insn.
6779 Change operand 1 predicate to nonimmediate_operand.
6780 (attr "i387_cw"): Remove mask_pm.
6781 * config/i386/i386.h (enum ix86_stack_slot): Remove SLOT_CW_MASK_PM.
6782 (enum ix86_entity): Remove I387_MASK_PM.
6783 * config/i386/i386.c (ix86_i387_mode_needed): Do not
6784 handle I387_MASK_PM.
6785 (ix86_mode_needed): Ditto.
6786 (ix86_mode_after): Ditto.
6787 (ix86_mode_entry): Ditto.
6788 (ix86_mode_exit): Ditto.
6789 (emit_i387_cw_initialization): Do not handle I387_CW_MASK_PM.
6791 2018-09-25 Jakub Jelinek <jakub@redhat.com>
6793 * vr-values.c (vr_values::vr_values): Initialize to_remove_edges and
6794 to_update_switch_stmts to vNULL instead of calling create on them
6797 2018-09-25 Richard Biener <rguenther@suse.de>
6799 PR tree-optimization/87402
6800 * tree-ssa-sccvn.c (SSA_VISITED): Remove unused function.
6801 (visit_phi): Re-instantiate handling of supposed to be VARYING
6802 but non-VARYING backedge value.
6804 2018-09-25 Richard Biener <rguenther@suse.de>
6807 * dwarf2out.c (struct sym_off_pair): New.
6808 (external_die_map): New global.
6809 (lookup_decl_die): When in LTO create DIEs lazily from the
6811 (lookup_block_die): New function, create DIEs lazily in LTO.
6812 (equate_block_to_die): New function.
6813 (dwarf2out_die_ref_for_decl): During WPA get the association
6814 from the external DIE map.
6815 (dwarf2out_register_external_die): Record mapping into the
6817 (maybe_create_die_with_external_ref): New function split out from
6818 DIE generation part of old dwarf2out_register_external_die.
6819 (add_abstract_origin_attribute): Do not return the DIE. When
6820 in LTO reference externals directly.
6821 (dwarf2out_abstract_function): When in LTO ignore calls for
6822 decls with external DIEs (already present abstract instances).
6823 (gen_call_site_die): Adjust.
6824 (add_high_low_attributes): Likewise.
6825 (gen_lexical_block_die): Likewise.
6826 (gen_inlined_subroutine_die): Likewie.
6827 (gen_block_die): Likewise.
6828 (dwarf2out_inline_entry): Likewise.
6829 (dwarf2out_early_finish): In LTRANS phase create DW_TAG_imported_unit
6832 2018-09-25 Martin Liska <mliska@suse.cz>
6834 * ipa-fnsummary.c (estimate_node_size_and_time): Scale by two
6835 integers and not by a float value.
6837 2018-09-25 Martin Liska <mliska@suse.cz>
6840 * dbgcnt.c (dbg_cnt_process_single_pair): Return false
6842 * dumpfile.c (dump_enable_all): Remove extra parenthesis.
6843 * gcov-tool.c: Declare the function with ATTRIBUTE_NORETURN.
6844 * godump.c (go_format_type): Remove extra parenthesis.
6846 2018-09-25 Martin Liska <mliska@suse.cz>
6848 * alias.c (set_dest_equal_p): Remove unused function.
6849 * config/i386/i386.c (def_builtin_pure2): Likewise.
6850 * diagnostic-show-locus.c (class layout): Remove
6852 (layout::layout): Likewise here.
6853 * dump-context.h (class temp_dump_context): Likewise.
6854 * dwarf2out.c (add_AT_fde_ref): Remove unused function.
6855 (add_AT_loclistsptr): Likewise.
6856 (add_AT_offset): Likewise.
6857 (get_AT_hi_pc): Likewise.
6858 (is_comdat_die): Likewise.
6859 (type_is_enum): Likewise.
6860 (ceiling): Likewise.
6861 (add_AT_vms_delta): Likewise.
6862 (is_class_die): Likewise.
6863 * edit-context.c (class line_event): Remove unused field.
6864 * graphite-sese-to-poly.c (tree_int_to_gmp): Remove
6866 * ipa-cp.c (ipa_get_vr_lat): Likewise.
6867 * lra-constraints.c (ok_for_index_p_nonstrict): Likewise.
6868 (ok_for_base_p_nonstrict): Likewise.
6869 * tree-chrec.c (is_not_constant_evolution): Likewise.
6870 (chrec_fold_poly_cst): Likewise.
6871 * tree-if-conv.c (has_pred_critical_p): Likewise.
6872 * tree-ssa-coalesce.c (print_exprs): Likewise.
6873 * tree-ssa-pre.c (bitmap_set_contains_expr): Likewise.
6874 * tree-ssa-uninit.c (is_and_or_or_p): Likewise.
6875 * tree-vrp.c (value_ranges_intersect_p): Likewise.
6876 (value_range_nonnegative_p): Likewise.
6878 2018-09-25 Martin Liska <mliska@suse.cz>
6880 * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
6881 Do not handle "GNU Pascal".
6882 * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
6884 * config/sparc/sparc.c (sparc_pass_by_reference): Remove Pascal
6885 from documentation. Likewise.
6886 * dbxout.c (dbxout_range_type): Likewise.
6887 * doc/cpp.texi: Likewise.
6888 * doc/extend.texi: Likewise.
6889 * doc/frontends.texi: Likewise.
6890 * doc/invoke.texi: Remove Pascal entry.
6891 * tree.def (CLEANUP_POINT_EXPR): Likewise.
6892 * doc/rtl.texi (MODE_FUNCTION): Remove not used entry.
6894 2018-09-25 Martin Liska <mliska@suse.cz>
6897 * doc/invoke.texi: Document all parameters and remove default
6900 2018-09-25 Ilya Leoshkevich <iii@linux.ibm.com>
6903 * rtl.c (rtx_code_size): Take into account that EQ_ATTR_ALT
6904 contains HOST_WIDE_INTs when computing its size.
6906 2018-09-24 Jim Wilson <jimw@sifive.com>
6909 * config/riscv/riscv.h (STACK_BOUNDARY): Test riscv_abi == ABI_ILP32E
6911 (ABI_STACK_BOUNDARY, MAX_ARGS_IN_REGISTERS): Likewise.
6913 2018-09-24 Andrew Pinski <apinski@marvell.com>
6915 * config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Don't
6916 access prev before checking it for NULLness in the
6917 AARCH64_FUSE_CMP_BRANCH case.
6919 2018-09-24 H.J. Lu <hongjiu.lu@intel.com>
6922 * config/i386/i386.c (rest_of_insert_endbranch): Set
6923 endbr_queued_at_entrance to true and don't insert ENDBR if
6924 x86_function_profiler will be called.
6925 (x86_function_profiler): Insert ENDBR if endbr_queued_at_entrance
6927 * config/i386/i386.h (machine_function): Add
6928 endbr_queued_at_entrance.
6930 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
6932 * genattrtab.c (mk_attr_alt): Use alternative_mask.
6933 (attr_rtx_1): Adjust caching to match the new EQ_ATTR_ALT field
6935 (check_attr_test): Use alternative_mask.
6936 (get_attr_value): Likewise.
6937 (compute_alternative_mask): Use alternative_mask and XWINT.
6938 (make_alternative_compare): Use alternative_mask.
6939 (attr_alt_subset_p): Use XWINT.
6940 (attr_alt_subset_of_compl_p): Likewise.
6941 (attr_alt_intersection): Use alternative_mask and XWINT.
6942 (attr_alt_union): Likewise.
6943 (attr_alt_complement): Use HOST_WIDE_INT and XWINT.
6944 (mk_attr_alt): Use alternative_mask and HOST_WIDE_INT.
6945 (simplify_test_exp): Use alternative_mask and XWINT.
6946 (write_test_expr): Use alternative_mask and XWINT, adjust bit
6947 number calculation to support 64 bits. Generate code that
6948 checks 64-bit masks.
6949 (main): Use alternative_mask.
6950 * rtl.def (EQ_ATTR_ALT): Change field types from ii to ww.
6952 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
6955 * config/s390/s390.c (s390_emit_epilogue): Do not use PARALLEL
6956 RETURN+USE when returning via %r14.
6958 2018-09-24 Martin Liska <mliska@suse.cz>
6960 * gcov.c (output_lines): Print colorization legend
6961 for both flag_use_colors and flag_use_hotness_colors.
6964 2018-09-24 Martin Liska <mliska@suse.cz>
6966 * coverage.c (get_coverage_counts): Use warning_at
6967 with current_function_decl location. Use %qD in warning
6970 2018-09-24 Martin Liska <mliska@suse.cz>
6972 * memory-block.h (memory_block_pool::release): Annotate with
6973 valgrind that the memory is not accessible.
6975 2018-09-24 Martin Liska <mliska@suse.cz>
6978 * asan.c: Make asan_handled_variables extern.
6980 * cfgexpand.c (expand_stack_vars): Make sure
6981 a representative is unpoison if another
6982 variable in the partition is handled by
6983 use-after-scope sanitization.
6985 2018-09-24 Richard Biener <rguenther@suse.de>
6987 PR tree-optimization/63155
6988 * tree-ssa-propagate.c (add_ssa_edge): Avoid adding PHIs to
6989 the worklist when the edge of the respective argument isn't
6992 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
6994 * config/i386/i386.h (enum reg_class): Rename MASK_REGS to
6995 ALL_MASK_REGS and MASK_EVEX_REGS to MASK_REGS.
6996 (MASK_CLASS_P): Update for rename.
6997 (MAYBE_MASK_CLASS_P): Ditto.
6998 (REG_CLASS_NAMES): Update.
6999 (REG_CLASS_CONTENT): Update.
7000 * config/i386/i386.c (regclass_map): Update for MASK_REG
7001 and ALL_MASK_REGS rename.
7002 * config/i386/constraints.md (Yk): Update for rename.
7005 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
7007 * config/i386/i386.h (enum reg_class): Remove
7008 EVEX_SSE_REGS and MOD4_SSE_REGS.
7009 (REG_CLASS_NAMES): Update.
7010 (REG_CLASS_CONTENT): Update.
7011 * config/i386/i386.c (regclass_map): Declare AVX-512 SSE
7012 registers as ALL_SSE_REGS.
7013 (ix86_additional_allocno_class_p): Remove.
7014 (TARGET_ADDITIONAL_ALLOCNO_CLASS_P): Remove.
7015 (ix86_register_priority): Lower priority of EVEX SSE registers.
7016 Use IN_RANGE macro where appropriate.
7017 (ix86_hard_regno_mode_ok): Merge AVX-5124FMAPS and
7018 AVX-5124VNNIW checks.
7019 (ix86_modes_tieable_p): Tie 512-bit SSE modes.
7020 * config/i386/sse.md (avx5124fmaddps_4fmaddps)
7021 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddps_maskz)
7022 (avx5124fmaddps_4fmaddss, avx5124fmaddps_4fmaddss_mask)
7023 (avx5124fmaddps_4fmaddss_maskz, avx5124fmaddps_4fnmaddps)
7024 (avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddps_maskz)
7025 (avx5124fmaddps_4fnmaddss, avx5124fmaddps_4fnmaddss_mask)
7026 (avx5124fmaddps_4fnmaddss_maskz, avx5124vnniw_vp4dpwssd)
7027 (avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssd_maskz)
7028 (avx5124vnniw_vp4dpwssds, avx5124vnniw_vp4dpwssds_mask)
7029 (avx5124vnniw_vp4dpwssds_maskz): Use "v" instead of "Yh" constraint.
7030 * config/i386/constraints.md (Yh): Remove.
7032 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
7034 * config/i386/i386.c (regclass_map): Declare integer REX registers
7037 2018-09-23 Gerald Pfeifer <gerald@pfeifer.com>
7039 * doc/service.texi (Service): Switch the fsf.org link to https.
7041 2018-09-22 Chung-Ju Wu <jasonwucj@gmail.com>
7044 * config/nds32/nds32.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7045 Define to speculation_safe_value_not_needed.
7047 2018-09-21 Florian Weimer <fweimer@redhat.com>
7050 * doc/extend.texi (Common Function Attributes): Mention that
7051 noreturn suppresses tail call optimization.
7053 2018-09-21 Jeff Law <law@redhat.com>
7055 * gimple-ssa-evrp.c (evrp_dom_walker::cleanup): Call
7056 vr_values::cleanup_edges_and_switches.
7057 * tree-vrp.c (to_remove_edges, to_update_switch_stmts): Moved into
7059 (identify_jump_threads): Remove EDGE_IGNORE handling.
7060 (execute_vrp): Move handling of to_remove_edges and
7061 to_update_switch_stmts into vr_values class member functions.
7062 * tree-vrp.h (switch_update, to_remove_edges): Remove declarations.
7063 (to_update_switch_stmts): Likewise.
7064 * vr-values.c: Include cfghooks.h.
7065 (vr_values::vr_values): Initialize to_remove_edges and
7066 to_update_switch_stmts.
7067 (vr_values::~vr_values): Verify to_remove_edges and
7068 to_update_switch_stmts are empty.
7069 (vr_values::simplify_switch_using_ranges): Set EDGE_IGNORE as needed.
7070 (vr_values::cleanup_edges_and_switches): New member function.
7071 * vr-values.h (vr_values): Add cleanup_edges_and_switches member
7072 function. Add new data members.
7074 2018-09-21 David Malcolm <dmalcolm@redhat.com>
7076 PR tree-optimization/87309
7077 * dumpfile.c (dump_context::begin_scope): Filter the dump_loc
7078 calls with pflags and alt_flags.
7079 (selftest::test_capture_of_dump_calls): Add test of interaction of
7080 MSG_OPTIMIZED_LOCATIONS with AUTO_DUMP_SCOPE.
7082 2018-09-21 Olivier Hainque <hainque@adacore.com>
7084 * config.gcc: Factorize and comment inclusion of vxworks-dummy.h.
7086 2018-09-21 Olivier Hainque <hainque@adacore.com>
7088 * config/vxworks.h (CLEAR_INSN_CACHE): #define to 1.
7090 2018-09-21 Olivier Hainque <hainque@adacore.com>
7092 * config/vxworks.h (VXWORKS_LIBGCC_SPEC): Remove -lc_internal.
7093 Merge block comment with the one ahead of VXWORKS_LIBS_RTP. Then:
7094 (VXWORKS_LIBS_RTP): Minor reordering.
7096 2018-09-21 Olivier Hainque <hainque@adacore.com>
7098 * config/vxworks.h (STARTFILE_PREFIX_SPEC): Define.
7099 (VXWORKS_LIBS_DIR_RTP): Remove definition and use.
7101 2018-09-21 Olivier Hainque <hainque@adacore.com>
7103 * config/vxworks.h (SIZE_TYPE): Account for TARGET_VXWORKS64.
7104 (PTRDIFF_TYPE): Likewise.
7106 2018-09-21 Olivier Hainque <hainque@adacore.com>
7108 * config.gcc: Enforce def of TARGET_VXWORKS64 to 1 from
7109 triplet, similar to support for VxWorks7.
7110 * config/vxworks-dummy.h: Provide a default definition
7111 of TARGET_VXWORKS64 to 0.
7113 2018-09-21 Olivier Hainque <hainque@adacore.com>
7115 * config/vxworks.h (TARGET_VXWORKS7): Move default definition ...
7116 * config/vxworks-dummy.h: here.
7118 2018-09-21 Olivier Hainque <hainque@adacore.com>
7120 * config.gcc: Prepend vxworks-dummy.h to tm_file for powerpc*
7122 2018-09-21 Shaokun Zhang <zhangshaokun@hisilicon.com>
7123 Bo Zhou <zbo.zhou@hisilicon.com>
7125 * config/aarch64/aarch64-cores.def (tsv110): New CPU.
7126 * config/aarch64/aarch64-tune.md: Regenerated.
7127 * doc/invoke.texi (AArch64 Options/-mtune): Add "tsv110".
7128 * config/aarch64/aarch64.c (tsv110_tunings): New tuning table.
7129 * config/aarch64/aarch64-cost-tables.h: Add "tsv110" extra costs.
7131 2018-09-21 Andrew Stubbs <ams@codesourcery.com>
7132 Julian Brown <julian@codesourcery.com>
7134 * builtins.c (get_builtin_sync_mem): Handle address spaces.
7136 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
7138 * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Return false
7139 if the call takes a static chain.
7141 2018-09-21 Martin Liska <mliska@suse.cz>
7143 * auto-profile.c (autofdo_source_profile::read): Do not
7145 (read_profile): Do not add working sets.
7146 (read_autofdo_file): Remove sum_all.
7147 (afdo_callsite_hot_enough_for_early_inline): Remove const
7149 * coverage.c (struct counts_entry): Remove gcov_summary.
7150 (read_counts_file): Read new GCOV_TAG_OBJECT_SUMMARY,
7151 do not support GCOV_TAG_PROGRAM_SUMMARY.
7152 (get_coverage_counts): Remove summary and expected
7154 * coverage.h (get_coverage_counts): Likewise.
7155 * doc/gcov-dump.texi: Remove -w option.
7156 * gcov-dump.c (dump_working_sets): Remove.
7157 (main): Do not support '-w' option.
7158 (print_usage): Likewise.
7159 (tag_summary): Likewise.
7160 * gcov-io.c (gcov_write_summary): Do not dump
7162 (gcov_read_summary): Likewise.
7163 (gcov_histo_index): Remove.
7164 (gcov_histogram_merge): Likewise.
7165 (compute_working_sets): Likewise.
7166 * gcov-io.h (GCOV_TAG_OBJECT_SUMMARY): Mark
7168 (GCOV_TAG_PROGRAM_SUMMARY): Mark it obsolete.
7169 (GCOV_TAG_SUMMARY_LENGTH): Adjust.
7170 (GCOV_HISTOGRAM_SIZE): Remove.
7171 (GCOV_HISTOGRAM_BITVECTOR_SIZE): Likewise.
7172 (struct gcov_summary): Simplify rapidly just
7173 to runs and sum_max fields.
7174 (gcov_histo_index): Remove.
7175 (NUM_GCOV_WORKING_SETS): Likewise.
7176 (compute_working_sets): Likewise.
7177 * gcov-tool.c (print_overlap_usage_message): Remove
7178 trailing empty line.
7179 * gcov.c (read_count_file): Read GCOV_TAG_OBJECT_SUMMARY.
7180 (output_lines): Remove program related line.
7181 * ipa-profile.c (ipa_profile): Do not consider GCOV histogram.
7182 * lto-cgraph.c (output_profile_summary): Do not stream GCOV
7184 (input_profile_summary): Do not read it.
7185 (merge_profile_summaries): And do not merge it.
7186 (input_symtab): Do not call removed function.
7187 * modulo-sched.c (sms_schedule): Do not print sum_max.
7188 * params.def (HOT_BB_COUNT_FRACTION): Reincarnate param that was
7189 removed when histogram method was invented.
7190 (HOT_BB_COUNT_WS_PERMILLE): Mention that it's used only in LTO
7192 * postreload-gcse.c (eliminate_partially_redundant_load): Fix
7194 * predict.c (get_hot_bb_threshold): Use HOT_BB_COUNT_FRACTION
7195 and dump selected value.
7196 * profile.c (add_working_set): Remove.
7197 (get_working_sets): Likewise.
7198 (find_working_set): Likewise.
7199 (get_exec_counts): Do not work with working sets.
7200 (read_profile_edge_counts): Do not inform as sum_max is removed.
7201 (compute_branch_probabilities): Likewise.
7202 (compute_value_histograms): Remove argument for call of
7203 get_coverage_counts.
7204 * profile.h: Do not make gcov_summary const.
7206 2018-09-21 Monk Chiang <sh.chiang04@gmail.com>
7208 * config.gcc (nds32*-*-*): Set TARGET_DEFAULT_TLSDESC_TRAMPOLINE=0.
7210 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
7212 PR tree-optimization/86990
7213 * gimple-ssa-store-merging.c (imm_store_chain_info:coalesce_immediate):
7214 Check that the entire merged store group is made of constants only for
7217 2018-09-20 Allan Sandfeld Jensen <allan.jensen@qt.io>
7219 * gcc.c (LINK_COMMAND_SPEC): Handle -r like -nostdlib.
7220 (VTABLE_VERIFICATION_SPEC): Likewise.
7221 (SANITIZER_EARLY_SPEC): Likewise.
7222 (SANITIZER_SPEC): Likewise.
7223 * config/darwin.h (LINK_COMMAND_SPEC): Likewise.
7224 * doc/invoke.texi (Link Options): Document -r.
7226 2018-09-20 Richard Biener <rguenther@suse.de>
7229 * gimplify.c (gimplify_expr): Retain alignment of
7230 addressable lvalue in dereference.
7232 2018-09-20 Alexandre Oliva <aoliva@redhat.com>
7235 * configure.ac: Check for .loc is_stmt support.
7236 * configure, config.in: Rebuilt.
7237 * dwarf2out.c (dwarf2out_source_line): Skip is_stmt
7240 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
7242 * config/rs6000/rs6000.opt (misel=no, misel=yes): Delete.
7243 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -misel=yes and
7246 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
7248 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
7250 * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete
7253 2018-09-20 Marek Polacek <polacek@redhat.com>
7255 * doc/invoke.texi: Add -Wno-init-list-lifetime to C++ Language Options.
7257 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
7259 PR tree-optimization/87288
7260 * tree-vect-loop.c (vect_analyze_loop_2): Take PEELING_FOR_GAPS
7261 into account when determining PEELING_FOR_NITERS.
7263 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
7265 PR tree-optimization/86877
7266 * tree-vect-loop.c (vect_analyze_loop_2): Call
7267 vect_verify_datarefs_alignment.
7269 2018-09-19 Marek Polacek <polacek@redhat.com>
7271 * doc/invoke.texi: Document -Wclass-conversion.
7273 2018-09-19 John David Anglin <danglin@gcc.gnu.org>
7275 * config/pa/pa.c (pa_adjust_priority): Delete.
7276 (TARGET_SCHED_ADJUST_PRIORITY): Delete define.
7278 * config/pa/pa.md (atomic_storeqi): Restore deleted expander.
7279 (atomic_storehi): Likewise.
7280 (atomic_storesi): Likewise.
7281 (atomic_loaddi): Restore compare and swap exchange loop code.
7283 2018-09-19 Segher Boessenkool <segher@kernel.crashing.org>
7285 PR rtl-optimization/86902
7286 * combine.c (try_combine): When changing the CC mode used, don't change
7287 an unrelated mode in other_insn to that new CC mode.
7289 2018-09-19 David Malcolm <dmalcolm@redhat.com>
7291 * tree-data-ref.c (runtime_alias_check_p): Use formatted printing
7292 with %T in place of calls to dump_generic_expr.
7293 (prune_runtime_alias_test_list): Likewise.
7294 (create_runtime_alias_checks): Likewise.
7295 * tree-vect-data-refs.c (vect_check_nonzero_value): Likewise.
7296 (vect_analyze_data_ref_dependence): Likewise.
7297 (vect_slp_analyze_data_ref_dependence): Likewise.
7298 (vect_record_base_alignment): Likewise. Use %G in place of call
7299 to dump_gimple_stmt.
7300 (vect_compute_data_ref_alignment): Likewise.
7301 (verify_data_ref_alignment): Likewise.
7302 (vect_find_same_alignment_drs): Likewise.
7303 (vect_analyze_group_access_1): Likewise.
7304 (vect_analyze_data_ref_accesses): Likewise.
7305 (dependence_distance_ge_vf): Likewise.
7306 (dump_lower_bound): Likewise.
7307 (vect_prune_runtime_alias_test_list): Likewise.
7308 (vect_find_stmt_data_reference): Likewise.
7309 (vect_analyze_data_refs): Likewise.
7310 (vect_create_addr_base_for_vector_ref): Likewise.
7311 (vect_create_data_ref_ptr): Likewise.
7312 * tree-vect-loop-manip.c (vect_set_loop_condition): Likewise.
7313 (vect_can_advance_ivs_p): Likewise.
7314 (vect_update_ivs_after_vectorizer): Likewise.
7315 (vect_gen_prolog_loop_niters): Likewise.
7316 (vect_prepare_for_masked_peels): Likewise.
7317 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
7318 (vect_determine_vectorization_factor): Likewise.
7319 (vect_is_simple_iv_evolution): Likewise.
7320 (vect_analyze_scalar_cycles_1): Likewise.
7321 (vect_analyze_loop_operations): Likewise.
7322 (report_vect_op): Likewise.
7323 (vect_is_slp_reduction): Likewise.
7324 (check_reduction_path): Likewise.
7325 (vect_is_simple_reduction): Likewise.
7326 (vect_create_epilog_for_reduction): Likewise.
7327 (vect_finalize_reduction:): Likewise.
7328 (vectorizable_induction): Likewise.
7329 (vect_transform_loop_stmt): Likewise.
7330 (vect_transform_loop): Likewise.
7331 (optimize_mask_stores): Likewise.
7332 * tree-vect-patterns.c (vect_pattern_detected): Likewise.
7333 (vect_split_statement): Likewise.
7334 (vect_recog_over_widening_pattern): Likewise.
7335 (vect_recog_average_pattern): Likewise.
7336 (vect_determine_min_output_precision_1): Likewise.
7337 (vect_determine_precisions_from_range): Likewise.
7338 (vect_determine_precisions_from_users): Likewise.
7339 (vect_mark_pattern_stmts): Likewise.
7340 (vect_pattern_recog_1): Likewise.
7341 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
7342 (vect_record_max_nunits): Likewise.
7343 (vect_build_slp_tree_1): Likewise.
7344 (vect_build_slp_tree_2): Likewise.
7345 (vect_print_slp_tree): Likewise.
7346 (vect_analyze_slp_instance): Likewise.
7347 (vect_detect_hybrid_slp_stmts): Likewise.
7348 (vect_detect_hybrid_slp_1): Likewise.
7349 (vect_slp_analyze_operations): Likewise.
7350 (vect_slp_analyze_bb_1): Likewise.
7351 (vect_transform_slp_perm_load): Likewise.
7352 (vect_schedule_slp_instance): Likewise.
7353 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
7354 (vect_mark_stmts_to_be_vectorized): Likewise.
7355 (vect_init_vector_1): Likewise.
7356 (vect_get_vec_def_for_operand): Likewise.
7357 (vect_finish_stmt_generation_1): Likewise.
7358 (vect_check_load_store_mask): Likewise.
7359 (vectorizable_call): Likewise.
7360 (vectorizable_conversion): Likewise.
7361 (vectorizable_operation): Likewise.
7362 (vectorizable_load): Likewise.
7363 (vect_analyze_stmt): Likewise.
7364 (vect_is_simple_use): Likewise.
7365 (vect_get_vector_types_for_stmt): Likewise.
7366 (vect_get_mask_type_for_stmt): Likewise.
7367 * tree-vectorizer.c (increase_alignment): Likewise.
7369 2018-09-19 Andrew Stubbs <ams@codesourcery.com>
7371 * doc/rtl.texi: Adjust vec_select description.
7372 * simplify-rtx.c (simplify_binary_operation_1): Allow VEC_SELECT to use
7373 non-constant selectors.
7375 2018-09-19 Matthew Malcomson <matthew.malcomson@arm.com>
7377 * config/aarch64/aarch64-protos.h
7378 (aarch64_offset_9bit_signed_unscaled_p): New declaration.
7379 * config/aarch64/aarch64.md (arches): New "rcpc8_4" attribute value.
7380 (arch_enabled): Add check for "rcpc8_4" attribute value of "arch".
7381 * config/aarch64/aarch64.h (AARCH64_FL_RCPC8_4): New bitfield.
7382 (AARCH64_FL_FOR_ARCH8_4): Include AARCH64_FL_RCPC8_4.
7383 (AARCH64_FL_PROFILE): Move index so flags are ordered.
7384 (AARCH64_ISA_RCPC8_4): New flag.
7385 * config/aarch64/aarch64.c (offset_9bit_signed_unscaled_p): Renamed
7386 to aarch64_offset_9bit_signed_unscaled_p.
7387 * config/aarch64/atomics.md (atomic_store<mode>): Allow offset
7389 * config/aarch64/constraints.md (Ust): New constraint.
7390 * config/aarch64/predicates.md.
7391 (aarch64_9bit_offset_memory_operand): New predicate.
7392 (aarch64_rcpc_memory_operand): New predicate.
7394 2018-09-19 Eric Botcazou <ebotcazou@adacore.com>
7396 PR rtl-optimization/87361
7397 * rtlanal.c (nonzero_bits1): Revert accidental change.
7399 2018-09-19 Richard Biener <rguenther@suse.de>
7401 PR tree-optimization/87349
7402 PR tree-optimization/87342
7403 * tree-ssa-sccvn.c (do_rpo_vn): Iterate max_rpo computation.
7405 2018-09-18 Marek Polacek <polacek@redhat.com>
7407 P1064R0 - Allowing Virtual Function Calls in Constant Expressions
7408 * gimple-fold.c (gimple_get_virt_method_for_vtable): Adjust assert.
7410 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
7412 * config/rs6000/rs6000.md: Remove old "Cygnus sibcall" comment.
7414 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
7416 PR rtl-optimization/86882
7417 * rtlanal.c (reg_overlap_mentioned_p): Handle CLOBBER.
7419 2018-09-18 Uros Bizjak <ubizjak@gmail.com>
7421 * config/i386/i386.md (*<code>extend<mode>xf2): Macroize insn from
7422 *<code>extendsfxf2 and *<code>extenddfxf2 using MODEF mode iterator.
7424 2018-09-18 Jonathan Wakely <jwakely@redhat.com>
7427 * doc/invoke.texi (Link Options): Fix formatting and grammar.
7429 2018-09-18 Richard Biener <rguenther@suse.de>
7432 * tree-ssa-coalesce.c (tree_int_map_hasher): Remove.
7433 (compute_samebase_partition_bases): Likewise.
7434 (coalesce_ssa_name): Always use compute_optimized_partition_bases.
7435 (gimple_can_coalesce_p): Simplify.
7437 2018-09-18 Hans-Peter Nilsson <hp@bitrange.com>
7439 Handle a library implementation of ffs calling __builtin_ffs.
7440 * config/mmix/mmix.c (TARGET_INIT_LIBFUNCS): Override with...
7441 (mmix_init_libfuncs): New function: make __builtin_ffs expand
7444 2018-09-17 David Malcolm <dmalcolm@redhat.com>
7446 * diagnostic-show-locus.c (class layout_range): Add field
7448 (layout_range::layout_range): Add "original_idx" param and use it
7449 to initialize new field.
7450 (make_range): Use 0 for original_idx.
7451 (layout::layout): Pass in index to calls to
7452 maybe_add_location_range.
7453 (layout::maybe_add_location_range): Add param "original_idx" and
7454 pass it on to layout_range.
7455 (layout::print_any_labels): Pass on range->m_original_idx to
7457 (gcc_rich_location::add_location_if_nearby): Use 0 for
7459 * gcc-rich-location.h (text_range_label::get_text): Update for new
7461 (range_label_for_type_mismatch::get_text): Likewise.
7463 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
7465 * config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.
7467 2018-09-17 David Malcolm <dmalcolm@redhat.com>
7469 * gimple-ssa-sprintf.c (fmtwarn): Update for introduction of
7470 format_string_diagnostic_t.
7471 (fmtwarn_n): Likewise.
7472 * substring-locations.c
7473 (format_string_diagnostic_t::format_string_diagnostic_t) New ctor.
7474 (format_warning_n_va): Convert to...
7475 (format_string_diagnostic_t::emit_warning_n_va): ...this.
7476 (format_warning_va): Convert to...
7477 (format_string_diagnostic_t::emit_warning_va): ...this.
7478 (format_warning_at_substring): Convert to...
7479 (format_string_diagnostic_t::emit_warning): ...this.
7480 (format_warning_at_substring_n): Convert to...
7481 (format_string_diagnostic_t::emit_warning_n): ...this.
7482 * substring-locations.h (class format_string_diagnostic_t): New
7484 (format_warning_va): Convert to
7485 format_string_diagnostic_t::emit_warning_va.
7486 (format_warning_n_va): Convert to
7487 format_string_diagnostic_t::emit_warning_n_va.
7488 (format_warning_at_substring): Convert to
7489 format_string_diagnostic_t::emit_warning.
7490 (format_warning_at_substring_n): Convert to
7491 format_string_diagnostic_t::emit_warning_n.
7493 2018-09-17 Cesar Philippidis <cesar@codesourcery.com>
7494 Bernd Schmidt <bernds_cb1@t-online.de>
7496 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with
7499 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
7501 * config/i386/i386.md (truncxf<mode>2_i387_noop_unspec): Change
7502 operand 0 predicate to nonimmediate operand.
7503 (rint<mode>2_frndint): Remove insn pattern.
7504 (rint<mode>2): Change operand 1 predicate to general_operand.
7505 Extend operand 1 to XFmode and generate rintxf2 insn.
7506 (frndintxf2_<rounding>): Rename from frndint<mode>2_<rounding>.
7507 Do not use X87MODEF mode macro.
7508 (frndintxf2_<rounding>_i387): Rename from
7509 frndint<mode>2_<rounding>_i387. Do not use X87MODEF mode macro.
7510 (<rounding_insn><mode>2): For non-SSE modes, extend operand 1
7511 to XFmode and generate significandxf3 insn.
7513 2018-09-17 Richard Biener <rguenther@suse.de>
7515 PR tree-optimization/87328
7516 * tree-ssa-sccvn.c (process_bb): Remove assertion about not
7517 visiting unexecutable backedges when not iterating.
7518 (do_rpo_vn): Mark all edges not executable even when not
7521 2018-09-17 Martin Jambor <mjambor@suse.cz>
7524 * doc/invoke.texi (Warning Options): Likewise.
7526 2018-09-17 Richard Biener <rguenther@suse.de>
7528 PR tree-optimization/87301
7529 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup): Properly
7530 clean EH info from leftover copy assignments.
7532 2018-09-17 Martin Liska <mliska@suse.cz>
7534 PR gcov-profile/85871
7535 * gcov.c (output_intermediate_file): Fix out of bounds
7538 2018-09-17 Vineet Gupta <vgupta@synopsys.com>
7540 * config/arc/arc.c: Object attributes for core4 not reflected
7542 * config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
7545 2018-09-17 Alexey Brodkin <abrodkin@synopsys.com>
7547 * config/arc/linux.h (LINK_EH_SPEC): Add missing space.
7549 2018-09-17 Martin Liska <mliska@suse.cz>
7551 * doc/gcov.texi: Document new option --use-hotness-colors.
7552 * gcov.c (struct source_info): Declare new field.
7553 (source_info::source_info): Set default for maximum_count.
7554 (print_usage): Add new -q option.
7555 (process_args): Process it.
7556 (accumulate_line_info): Save src->maximum_count.
7557 (output_line_beginning): Make color line number if
7558 flag_use_hotness_colors is set.
7559 (output_line_details): Pass default argument value.
7560 (output_lines): Pass src->maximum_count.
7562 2018-09-17 Martin Liska <mliska@suse.cz>
7564 * common/config/i386/i386-common.c (ix86_get_valid_option_values):
7565 Use processor_names table.
7566 * config/i386/i386.c (ix86_default_align): Use
7567 processor_cost_table for alignment values.
7568 (ix86_option_override_internal): Use processor_names.
7569 (ix86_function_specific_print): Likewise.
7570 * config/i386/i386.h (struct processor_costs):
7571 Add alignment values.
7572 (struct ptt): Remove and replace with const char *.
7573 * config/i386/x86-tune-costs.h (struct processor_costs):
7574 Declare default alignments for all costs.
7576 2018-09-17 Aldy Hernandez <aldyh@redhat.com>
7578 * tree-vrp.c (extract_range_from_unary_expr): Do not special case
7579 symbolics or VR_VARYING ranges for ABS_EXPR.
7580 * wide-int-range.cc (wide_int_range_abs): Return positive numbers
7581 when range will wrap.
7583 2018-09-15 Eric Botcazou <ebotcazou@adacore.com>
7586 * cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
7587 before and after a JUMP_TABLE_DATA.
7589 2018-09-14 John David Anglin <danglin@gcc.gnu.org>
7592 * dojump.c (do_compare_and_jump): Canonicalize function pointers
7593 when one operand is a function pointer. Use POINTER_TYPE_P and
7594 FUNC_OR_METHOD_TYPE_P.
7595 * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
7596 * fold-const.c (build_range_check): Likewise.
7597 * match.pd (simple_comparison): Likewise.
7599 2018-09-14 David Malcolm <dmalcolm@redhat.com>
7602 * spellcheck.c (get_edit_distance_cutoff): New function.
7603 (selftest::test_edit_distance_unit_test_oneway): Rename to...
7604 (selftest::test_get_edit_distance_one_way): ...this.
7605 (selftest::test_get_edit_distance_unit): Rename to...
7606 (selftest::test_get_edit_distance_both_ways): ...this.
7607 (selftest::test_edit_distances): Move tests to this new function,
7608 and test some more pairs of strings. Update for above renaming.
7609 (selftest::get_old_cutoff): New function.
7610 (selftest::test_get_edit_distance_cutoff): New function.
7611 (selftest::assert_suggested_for): New function.
7612 (ASSERT_SUGGESTED_FOR): New macro.
7613 (selftest::assert_not_suggested_for): New function.
7614 (ASSERT_NOT_SUGGESTED_FOR): New macro.
7615 (selftest::test_suggestions): New function.
7616 (selftest::spellcheck_c_tests): Move test_get_edit_distance_unit
7617 tests to selftest::test_edit_distances and call it. Add calls to
7618 selftest::test_get_edit_distance_cutoff and
7619 selftest::test_suggestions.
7620 * spellcheck.h (get_edit_distance_cutoff): New function declaration.
7621 (best_match::consider): Replace hard-coded cutoff calculation with
7623 (best_match::get_cutoff): New declaration.
7624 (best_match::get_best_meaningful_candidate): Likewise.
7626 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
7628 * builtins.c (fold_builtin_strlen): Remove TODO comment.
7630 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
7633 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
7635 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
7636 terminated string literal.
7638 2018-09-14 Martin Sebor <msebor@redhat.com>
7640 * builtins.c (unterminated_array): Handle ARRAY_REF.
7641 (expand_builtin_stpcpy_1): Detect unterminated char arrays.
7642 * builtins.h (unterminated_array): Declare extern.
7643 * gimple-fold.c (gimple_fold_builtin_stpcpy): Detect unterminated
7645 (gimple_fold_builtin_sprintf): Propagate NO_WARNING to transformed
7648 2018-09-14 Martin Sebor <msebor@redhat.com>
7649 Jeff Law <law@redhat.com>
7651 * builtins.c (unterminated_array): New.
7652 (expand_builtin_strcpy): Adjust.
7653 (expand_builtin_strcpy_args): Detect unterminated arrays.
7654 * gimple-fold.c (get_maxval_strlen): Add argument. Detect
7655 unterminated arrays.
7656 * gimple-fold.h (get_maxval_strlen): Add argument.
7657 (gimple_fold_builtin_strcpy): Detec unterminated arrays.
7659 * gimple-fold.c (get_range_strlen): Add argument.
7660 (get_maxval_strlen): Adjust.
7661 * gimple-fold.h (get_range_strlen): Add argument.
7663 2018-09-14 Wei Xiao <wei3.xiao@intel.com>
7665 * config/i386/movdirintrin.h: Fix copyright year.
7667 2018-09-14 Uros Bizjak <ubizjak@gmail.com>
7669 * reg-stack.c: Include regs.h.
7670 (replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
7671 (emit_pop_insn): Default pop insn mode to the reg_raw_mode of
7672 FIRST_STACK_REG, not DFmode.
7673 (emit_swap_insn): Default swap insn mode to the reg_raw_mode of
7674 FIRST_STACK_REG, not XFmode. Explicitly construct swap RTX.
7675 (change stack): Default register mode to the reg_raw_mode of
7676 FIRST_STACK_REG, not DFmode.
7677 * config/i386/i386.md (*swap<mode>): Remove insn pattern.
7678 (*swapxf): Rename from swapxf.
7680 2018-09-14 Carl Love <cel@us.ibm.com>
7682 * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
7683 * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
7685 2018-09-14 Segher Boessenkool <segher@kernel.crashing.org>
7688 * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
7691 2018-09-14 Sam Tebbs <sam.tebbs@arm.com>
7694 * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Define.
7696 2018-09-14 Jason Merrill <jason@redhat.com>
7698 Fix --enable-gather-detailed-mem-stats.
7699 * hash-table.c (hash_table_usage): Change from variable to function.
7700 * hash-table.h: Adjust.
7701 * Makefile.in: Add missing dependencies on hash-table.h.
7703 2018-09-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7705 PR tree-optimization/87259
7707 (pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
7708 execute_cse_reciprocals_1 has tried transforming.
7710 2018-09-14 Aldy Hernandez <aldyh@redhat.com>
7712 * tree-vrp.c (extract_range_from_binary_expr_1): Normalize
7713 VR_VARYING for PLUS/MINUS_EXPR.
7715 2018-09-14 Ilya Leoshkevich <iii@linux.ibm.com>
7717 * config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
7720 2018-09-14 Richard Biener <rguenther@suse.de>
7723 * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
7724 bits for the merged partition.
7726 2018-09-13 Martin Sebor <msebor@redhat.com>
7727 Bernd Edlinger <bernd.edlinger@hotmail.de>
7729 * builtins.h (c_srlen): Add argument.
7730 * builtins.c (warn_string_no_nul): New function.
7731 (c_strlen): Add argument and use it. Update recursive calls.
7732 Pass DECL argument to string_constant to get info on non
7733 terminated strings. Update *NONSTR as needed.
7734 (fold_builtin_strlen): Add argument to calls to c_strlen.
7735 Warn for unterminated arrays.
7736 (warn_string_no_null): Add prototype.
7737 * expr.c (string_constant): Update arguments. Update recursive
7738 calls appropriately. Detect missing NUL terminator and outermost
7739 declaration its missing in.
7740 Improve checks for arrays with nonzero lower bound or elements
7741 that are not a single byte. Simplify offset computation.
7742 Simplify checks for non-NUL terminated strings.
7743 * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
7744 * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
7746 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
7748 * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
7750 * fold-const.c (c_getstr): Fix function comment. Remove unused third
7751 argument. Fix range checks.
7752 * fold-const.h (c_getstr): Adjust protoype.
7753 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
7754 string is constant but contains no NUL byte.
7756 * expr.c (string_constant): Adjust function comment.
7757 Remove bogus check for zero termination.
7759 * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
7761 * varasm.c (compare_constant): Compare type size of STRING_CSTs.
7762 (get_constant_size): Don't make STRING_CSTs larger than they are.
7763 (check_string_literal): New check function for STRING_CSTs.
7764 (output_constant): Use it.
7766 2018-09-13 Eric Botcazou <ebotcazou@adacore.com>
7769 * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
7771 2018-09-13 Richard Biener <rguenther@suse.de>
7773 PR tree-optimization/87263
7774 * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
7775 (struct unwind_state): Add max_rpo field.
7776 (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
7777 Compute max_rpo, the max RPO number a block can be backwards reached
7778 from. Re-write non-iterating mode to a RPO ordered worklist approach,
7779 separating it from the iterating mode.
7781 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
7783 * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
7784 (rfs_decision): New scheduling decision.
7786 2018-09-13 Richard Biener <rguenther@suse.de>
7789 * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
7790 (vn_nary_op_insert_pieces_predicated): Do not write useless
7791 valid_dominated_by_p entry outside of the allocated storage.
7793 2018-09-13 Omar Sandoval <osandov@osandov.com>
7794 Tom de Vries <tdevries@suse.de>
7797 * dwarf2out.c (is_c): New function.
7798 (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
7800 2018-09-13 Sam Tebbs <sam.tebbs@arm.com>
7803 * config/aarch64/aarch64.md (*aarch64_bfxil):
7805 * config/aarch64/constraints.md (Ulc): Define.
7806 * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
7808 * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
7811 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
7813 * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
7814 * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
7815 aarch64_layout_frame call.
7816 (aarch64_expand_epilogue): Likewise.
7817 (aarch64_initial_elimination_offset): Likewise.
7818 (aarch64_get_separate_components): Likewise.
7819 (aarch64_use_return_insn_p): Likewise.
7820 (aarch64_layout_frame): Remove unneeded check.
7822 2018-09-13 Jakub Jelinek <jakub@redhat.com>
7824 * configure.ac: Only append
7825 " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
7826 gcc_config_arguments if it was never reconfigured or last reconfigure
7827 was with different arguments.
7828 * configure: Regenerated.
7830 2018-09-13 Jakub Jelinek <jakub@redhat.com>
7831 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7834 * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
7835 (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
7837 2018-09-13 Jakub Jelinek <jakub@redhat.com>
7839 PR tree-optimization/87287
7840 * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
7841 X % C == 0 to X % (unsigned) C == 0 optimization to ...
7842 * match.pd (X % C == 0): ... here. New optimization.
7844 2018-09-12 Jakub Jelinek <jakub@redhat.com>
7847 * expr.h (maybe_optimize_mod_cmp): Declare.
7848 * expr.c (mod_inv): New function.
7849 (maybe_optimize_mod_cmp): New function.
7850 (do_store_flag): Use it.
7851 * cfgexpand.c (expand_gimple_cond): Likewise.
7853 2018-09-09 Cesar Philippidis <cesar@codesourcery.com>
7854 Julian Brown <julian@codesourcery.com>
7857 * gimplify.c (gimplify_scan_omp_clauses): Set
7858 target_firstprivatize_array_bases in OpenACC parallel and kernels
7859 region contexts. Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
7860 OpenACC data regions.
7862 2018-09-12 Uros Bizjak <ubizjak@gmail.com>
7864 * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
7865 (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
7867 2018-09-12 Richard Biener <rguenther@suse.de>
7869 PR tree-optimization/87280
7870 * tree-ssa-sccvn.c (process_bb): Handle the case of executable
7871 edge but unreachable target.
7872 (do_rpo_vn): For conservatively handling a PHI only mark
7873 the backedge executable but not the block reachable.
7875 2018-09-12 Richard Biener <rguenther@suse.de>
7877 PR tree-optimization/87266
7878 * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
7881 2018-09-12 Andreas Krebbel <krebbel@linux.ibm.com>
7883 * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
7885 ("trunc<BFP:mode><DFP_ALL:mode>2")
7886 ("trunc<DFP_ALL:mode><BFP:mode>2")
7887 ("extend<BFP:mode><DFP_ALL:mode>2")
7888 ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
7889 according to the target operand type.
7891 2018-09-12 Jakub Jelinek <jakub@redhat.com>
7892 Andreas Krebbel <krebbel@linux.ibm.com>
7894 PR tree-optimization/86844
7895 * gimple-ssa-store-merging.c
7896 (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
7897 there are any overlapping stores in between them, make sure they are
7898 also coalesced or we give up completely.
7900 2018-09-12 Jakub Jelinek <jakub@redhat.com>
7903 * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
7904 BIT_AND_EXPR's second operand is a power of two. Formatting fix.
7906 2018-09-12 Tom de Vries <tdevries@suse.de>
7908 * common.opt (gdescribe-dies): Add option.
7909 * dwarf2out.c (add_name_and_src_coords_attributes): Add description
7910 attribute for artifical and nameless decls.
7911 (dwarf2out_register_external_die): Add description attribute to
7912 external reference die.
7913 (add_desc_attribute): New functions.
7914 (gen_subprogram_die): Add description attribute to
7915 DW_TAG_call_site_parameter.
7916 * tree-pretty-print.c (print_generic_expr_to_str): New function.
7917 * tree-pretty-print.h (print_generic_expr_to_str): Declare.
7918 * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
7920 (@item -gdescribe-dies): Add.
7922 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
7924 * tree-vrp.c (vrp_shift_undefined_p): Remove.
7925 (extract_range_from_binary_expr_1: Call
7926 wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
7927 * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
7930 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
7932 * gimple-ssa-warn-alloca.c
7933 (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
7934 field for ALLOCA_BOUND_*_LARGE.
7936 2018-09-11 Nathan Sidwell <nathan@acm.org>
7938 * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
7940 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
7942 * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
7943 for clobbers. Remove obsolete comment.
7945 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
7947 * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
7948 mpxchk, mpxld and mpxst types.
7949 (define_attr length_immediate): Remove all processing of mpx types.
7950 (define_attr prefix_0f): Ditto.
7951 (define_attr memory): Ditto.
7953 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
7955 * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
7956 (log<mode>2): Change operand 1 predicate to general_operand.
7957 Extend operand 1 to XFmode and generate logxf3 insn.
7958 (log10<mode>2): Change operand 1 predicate to general_operand.
7959 Extend operand 1 to XFmode and generate log10xf3 insn.
7960 (log2<mode>2): Change operand 1 predicate to general_operand.
7961 Extend operand 1 to XFmode and generate log2xf3 insn.
7962 (fyl2xp1_extend<mode>xf3_i387): Remove.
7963 (log1p<mode>2): Change operand 1 predicate to general_operand.
7964 Extend operand 1 to XFmode and generate log1pxf3 insn.
7965 (fxtract_extend<mode>xf3_i387): Remove.
7966 (logb<mode>2): Change operand 1 predicate to general_operand.
7967 Extend operand 1 to XFmode and generate logbxf3 insn.
7968 (ilogb<mode>2): Change operand 1 predicate to general_operand.
7969 Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
7970 (significand<mode>2): Change operand 1 predicate to general_operand.
7971 Extend operand 1 to XFmode and generate significandxf3 insn.
7973 2018-09-11 Nathan Sidwell <nathan@acm.org>
7975 * gcc.c (perror_with_name, pfatal_with_name): Delete.
7976 (load_specs): Use fatal_error.
7977 (DELETE_IF_ORDINARY, process_command): Use error.
7978 (execute, run_attempt): Use fatal_error.
7980 2018-09-11 Andrew Stubbs <ams@codesourcery.com>
7982 * diagnostic-core.h (sorry_at): New prototype.
7983 * diagnostic.c (sorry_at): New function.
7985 2018-09-11 Aldy Hernandez <aldyh@redhat.com>
7987 * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
7988 by zero as VR_UNDEFINED.
7990 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
7992 * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
7993 (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
7994 (<sincos>mode2): New expander.
7995 (sincos_extend<mode>xf3_i387): Remove insn pattern.
7996 (sincos -> sin, cos splitters): Remove splitter patterns.
7997 (sincos<mode>3): Change operand 2 predicate to general_operand.
7998 Extend operand 2 to XFmode and generate sincosxf3 insn.
7999 (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
8000 Change operand 3 predicate to const1_operand.
8001 (fptan_extend<mode>xf4_i387): Remove insn pattern.
8002 (tanxf2): Update operands in the call to fptanxf4_i387.
8003 (tan<mode>2): Change operand 1 predicate to general_operand.
8004 Extend operand 1 to XFmode and generate tanxf3 insn.
8005 (atan2xf3): Rename from *fpatanxf3_i387.
8006 (fpatan_extend<mode>xf3_i387): Remove insn pattern.
8007 (atan2xf3): Remove expander.
8008 (atan2<mode<3): Change operand 1 and 2 predicates to general_operand.
8009 Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
8010 (atan<mode>2): Change operand 1 predicate to general_operand.
8011 Extend operand 1 to XFmode and generate atanxf3 insn.
8013 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
8015 * config/i386/i386.md (x87/SSE constant load splitter): Use
8016 memory_operand instead of nonimmediate_operand for input operand
8019 2018-09-09 Uros Bizjak <ubizjak@gmail.com>
8021 * config/i386/i386.md (float partial SSE register stall splitter): Move
8022 splitter near its instruction pattern.
8023 (float_extend partial SSE register stall splitter): Ditto.
8024 (float_truncate partial SSE register stall splitter): Ditto.
8026 2018-09-09 Hans-Peter Nilsson <hp@bitrange.com>
8029 * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
8030 to speculation_safe_value_not_needed.
8033 * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
8034 non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
8035 (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
8036 leaf_function_p, instead use has_hard_reg_initial_val.
8038 2018-09-09 Nathan Sidwell <nathan@acm.org>
8040 * gcc.h (pfatal_with_name): Don't declare here.
8041 * gcc.c (pfatal_with_name): Make static.
8043 2018-09-09 Xianmiao Qu <xianmiao_qu@c-sky.com>
8045 * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
8048 2018-09-08 John David Anglin <danglin@gcc.gnu.org>
8050 PR rtl-optimization/85458
8051 * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
8052 priority hook to reduce the priority of EXPR.
8054 2018-09-07 Uros Bizjak <ubizjak@gmail.com>
8056 * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
8057 DImode for x87 on 32bit targets. Conditionally disable x87 modes
8058 with X87_ENABLE_FLOAT. Remove preparation code.
8059 (*float<SWI48:mode><MODEF:mode>2): Rename from
8060 *float<SWI48:mode><MODEF:mode>2_mixed. Handle x87, SSE and mixed
8061 math using "enabled" attribute.
8062 (*floatdi<MODEF:mode>2_i387): Rename from
8063 *float<SWI48x:mode><MODEF:mode>2_i387. Handle only DImode and
8064 enable for 32bit targets only.
8065 (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
8067 (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
8068 as operand 1 predicate. Rewrite as define_insn_and_split.
8069 (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
8071 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
8073 * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
8074 to fallthru to FLOAT case.
8076 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
8079 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
8080 around folding of vec_sl to handle out of range shift values.
8082 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
8084 * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
8085 Update callers to gen_fix_trunc<mode>_i387_fisttp
8086 (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
8087 nonimmediate_operand.
8088 (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
8089 and corresponding splitters.
8090 (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
8091 (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
8092 (fix_truncdi_i387_with_temp): Remove insn pattern
8093 and corresponding splitters.
8094 (fix_trunc<mode>_i387): Change operand 0 predicate to
8095 nonimmediate_operand.
8096 (fix_trunc<mode>_i387_with_temp): Remove insn pattern
8097 and corresponding splitters.
8098 (*fistdi2_1): Remove.
8100 (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
8101 (lrintxfdi2): Remove expander. Reimplement as define_insn.
8102 (*fist<mode>2_1): Remove.
8103 (fist<mode>2): Ditto.
8104 (fist<mode>2_with_temp): Remove insn pattern and corresponding
8106 (lrintxf<mode>2): Remove expander. Reimplement as define_insn.
8107 (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
8108 (fistdi2_<rounding>): Change operand 0 predicate to
8109 nonimmediate_operand.
8110 (fistdi2_<rounding>_with_temp): Remove insn pattern
8111 and corresponding splitters.
8112 (fist<mode>2_<rounding>): Change operand 0 predicate to
8113 nonimmediate_operand.
8114 (fist<mode>2_<rounding>_with_temp): Remove insn pattern
8115 and corresponding splitters.
8117 (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
8119 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
8121 * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
8124 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
8126 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
8127 early gimple folding of vec_splat().
8128 * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
8129 * gimple-fold.h: Add an extern define for tree_vec_extract().
8131 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
8133 * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
8134 wrappers around TREE_TYPE comparisons.
8136 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
8139 * config/s390/predicates.md: Add nonsym_memory_operand.
8140 * config/s390/s390.c (s390_legitimize_cs_operand): If operand
8141 contains a SYMBOL_REF, load it into an intermediate pseudo.
8142 (s390_emit_compare_and_swap): Legitimize operand.
8143 * config/s390/s390.md: Use the new nonsym_memory_operand
8144 with UNSPECV_CAS patterns.
8146 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
8149 * config/s390/s390-passes.def: New file.
8150 * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
8152 (make_pass_s390_early_mach): Add declaration.
8153 * config/s390/s390.c (make_pass_s390_early_mach):
8154 (s390_option_override): Remove dynamic registration.
8155 * config/s390/t-s390: Add s390-passes.def.
8157 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
8159 * config/s390/s390.c (s390_decompose_constant_pool_ref):
8160 Remove UNSPEC_LTREL_BASE check.
8161 (annotate_constant_pool_refs): Likewise.
8162 (find_constant_pool_ref): Likewise.
8163 (find_ltrel_base): Removed.
8164 (replace_ltrel_base): Removed.
8165 (s390_mainpool_finish): Remove replace_ltrel_base call.
8166 (s390_chunkify_start): Remove pending LTREL_BASE logic.
8167 (s390_chunkify_finish): Remove replace_ltrel_base call.
8168 * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
8170 2018-09-06 Hans-Peter Nilsson <hp@axis.com>
8173 * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
8174 to speculation_safe_value_not_needed.
8176 2018-09-05 Cesar Philippidis <cesar@codesourcery.com>
8177 Bernd Schmidt <bernds_cb1@t-online.de>
8179 * config/nvptx/nvptx-opts.h: New file.
8180 * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
8181 * config/nvptx/nvptx.h: Include "nvptx-opts.h".
8183 (TARGET_SM35): New macro.
8184 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
8186 * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
8188 (misa=): New option.
8189 * doc/invoke.texi (Nvidia PTX Options): Document -misa.
8191 2018-09-05 Uros Bizjak <ubizjak@gmail.com>
8193 * config/i386/i386.md (truncdfsf2): Remove expander.
8194 (truncdfsf2_with_temp): Ditto.
8195 (truncxf<mode>2): Ditto.
8196 (*truncdfsf_fast_mixed): Remove insn pattern.
8197 (*truncdfsf_fast_i387): Ditto.
8198 (*truncdfsf_mixed): Ditto.
8199 (*truncdfsf_i387): Ditto.
8200 (*truncdfsf2_i387_1): Ditto.
8201 (*truncxfsf2_mixed): Ditto.
8202 (*truncxfdf2_mixed): Ditto.
8203 (*truncxf<mode>2_i387_noop): Ditto. Update callers
8204 to call gen_truncxf<mode>2 instead.
8205 (*truncxf<mode>2_i387): Remove.
8206 (reg->reg splitters): Remove splitter pattern.
8207 (reg->mem splitters): Ditto.
8209 (truncdfsf2): New insn pattern.
8210 (truncxf<mode>2): Ditto.
8212 2018-09-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8214 * tree-ssa-math-opts.c (is_mult_by): New function.
8215 (is_square_of): Use the above.
8216 (optimize_recip_sqrt): New function.
8217 (pass_cse_reciprocals::execute): Use the above.
8219 2018-09-05 Richard Biener <rguenther@suse.de>
8222 * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
8223 to zero-init the emplaced vec.
8225 2018-09-05 Martin Liska <mliska@suse.cz>
8227 PR tree-optimization/87205
8228 * tree-switch-conversion.c (pass_lower_switch::execute):
8229 Group cases for switch statements.
8231 2018-09-05 Richard Biener <rguenther@suse.de>
8233 PR tree-optimization/87217
8234 * tree-ssa-sccvn.c (vuse_valueize): New.
8235 (vn_reference_lookup_pieces): Use it.
8236 (vn_reference_lookup): Likewise.
8238 2018-09-05 Nathan Sidwell <nathan@acm.org>
8241 * stor-layout.c (place_field): Scan forwards to check last
8242 bitfield when ms_bitfield_placement is in effect.
8244 2018-09-05 Richard Biener <rguenther@suse.de>
8247 * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
8250 2018-09-05 Siddhesh Poyarekar <siddhesh@sourceware.org>
8251 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
8253 * config/aarch64/falkor-tag-collision-avoidance.c: New file.
8254 * config.gcc (extra_objs): Build it.
8255 * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
8257 * config/aarch64/aarch64-passes.def
8258 (pass_tag_collision_avoidance): New pass.
8259 * config/aarch64/aarch64.c (qdf24xx_tunings): Add
8260 AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
8261 (aarch64_classify_address): Remove static qualifier.
8262 (aarch64_address_info, aarch64_address_type): Move to...
8263 * config/aarch64/aarch64-protos.h: ... here.
8264 (make_pass_tag_collision_avoidance): New function.
8265 * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
8268 2018-09-05 Martin Liska <mliska@suse.cz>
8270 * doc/gcov.texi: Update documentation of humar
8272 * gcov.c (format_count): Print one decimal place, it provides
8273 more fine number of situations like '1G' vs. '1.4G'.
8275 2018-09-05 Martin Liska <mliska@suse.cz>
8278 * config/rs6000/rs6000.opt: Mark the option as Deprecated.
8279 * optc-gen.awk: Allow 'Var' for Deprecated options in order
8280 to generate a MASK value.
8282 2018-09-04 H.J. Lu <hongjiu.lu@intel.com>
8285 * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
8286 if frame pointer isn't used.
8287 (compute_frame_pointer_to_fb_displacement): Likewise.
8289 2018-09-04 Jakub Jelinek <jakub@redhat.com>
8292 * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
8293 OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
8294 OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
8295 (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
8296 and OPTION_MASK_ISA_XSAVEC_UNSET.
8298 2018-09-04 Max Filippov <jcmvbkbc@gmail.com>
8300 * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
8301 XOR operations in NAND case.
8303 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
8305 * wide-int-range.cc (wide_int_range_convert): New.
8306 * wide-int-range.h (wide_int_range_convert): New.
8307 * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
8308 code into wide_int_range_convert.
8309 (extract_range_into_wide_ints): Do not munge anti range constants
8310 into the entire domain. Just return the range back.
8312 2018-09-04 Martin Liska <mliska@suse.cz>
8314 * genmatch.c (output_line_directive): Add new argument
8316 (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
8318 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
8320 * doc/invoke.texi (Option Summary): Add whitespace.
8322 * doc/invoke.texi (Option Summary): Add -Waligned-new.
8324 2018-09-04 Richard Biener <rguenther@suse.de>
8326 PR tree-optimization/87211
8327 * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
8328 backedge value we're supposed to treat as VARYING also number
8329 the PHI to VARYING in case it got a different value-number already.
8331 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
8333 * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
8334 (extract_range_from_binary_expr_1): Do not call
8335 vrp_can_optimize_bit_op.
8336 * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
8338 (wide_int_range_get_mask_and_bounds): New.
8339 (wide_int_range_optimize_bit_op): New.
8340 (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
8341 (wide_int_range_bit_and): Same.
8342 * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
8343 (wide_int_range_optimize_bit_op): New.
8344 (wide_int_range_get_mask_and_bounds): New.
8346 2018-09-04 Richard Biener <rguenther@suse.de>
8348 PR tree-optimization/87176
8349 * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
8350 variable. When value-numbering a virtual PHI node make sure
8351 to not value-number to the backedge value.
8353 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
8355 * doc/extend.texi (Long Long, Hex Floats): Document support for
8356 long long and hex floats in more recent versions of ISO C++.
8358 2018-09-03 Richard Biener <rguenther@suse.de>
8360 PR tree-optimization/87177
8361 * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
8364 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
8366 * bb-reorder.c (edge_order): Convert to C-qsort-style
8367 tri-state comparator.
8368 (reorder_basic_blocks_simple): Change std::stable_sort to
8371 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
8373 * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
8374 tri-state comparator.
8375 (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
8377 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
8379 * sort.cc (struct sort_ctx): New field 'nlim'. Use it...
8380 (mergesort): ... here as maximum count for using netsort.
8381 (gcc_qsort): Set nlim to 3 if stable sort is requested.
8382 (gcc_stablesort): New.
8383 * system.h (gcc_stablesort): Declare.
8385 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
8387 * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
8388 * system.h (qsort): Always redirect to gcc_qsort. Update comment.
8389 * vec.c (qsort_chk): Do not call gcc_qsort. Update comment.
8391 2018-09-03 Segher Boessenkool <segher@kernel.crashing.org>
8393 * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
8394 lxsdx and stxsdx alternatives.
8395 (*mov<mode>_hardfloat64): Ditto.
8396 * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
8398 2018-09-03 Richard Biener <rguenther@suse.de>
8400 PR tree-optimization/87200
8401 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
8404 2018-09-03 Martin Liska <mliska@suse.cz>
8406 PR tree-optimization/87201
8407 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
8408 Fix parenthesis in an expression.
8410 2018-09-03 Richard Biener <rguenther@suse.de>
8412 PR tree-optimization/87197
8413 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
8414 visited. CSE the VN_INFO hashtable lookup.
8416 PR tree-optimization/87169
8417 * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
8418 iterating make sure there's no extra backedges from irreducible
8419 regions feeding the header. Mark the destination block
8422 2018-09-03 Martin Liska <mliska@suse.cz>
8425 * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
8426 * common/common-targhooks.c (default_get_valid_option_values):
8428 * common/common-targhooks.h (default_get_valid_option_values):
8430 * common/config/i386/i386-common.c: Move processor_target_table
8432 (ix86_get_valid_option_values): New function.
8433 (TARGET_GET_VALID_OPTION_VALUES): New macro.
8434 * config/i386/i386.c (struct ptt): Move to i386-common.c.
8435 (PTA_*): Move all defined masks into i386-common.c.
8436 (ix86_function_specific_restore): Use new processor_cost_table.
8437 * config/i386/i386.h (struct ptt): Moved from i386.c.
8438 (struct pta): Likewise.
8439 * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
8440 * doc/tm.texi.in: Likewise.
8441 * opt-suggestions.c (option_proposer::suggest_option):
8442 Pass prefix to build_option_suggestions.
8443 (option_proposer::get_completions): Likewise.
8444 (option_proposer::build_option_suggestions): Use the new target
8446 * opts.c (struct option_help_tuple): New struct.
8447 (print_filtered_help): Use the new target hook.
8449 2018-09-03 Martin Liska <mliska@suse.cz>
8452 * predict.c (set_even_probabilities): Add likely_edges
8453 argument and handle cases where we have precisely one
8455 (combine_predictions_for_bb): Catch also likely_edges.
8456 (tree_predict_by_opcode): Handle gswitch statements.
8457 * tree-cfg.h (find_case_label_for_value): New declaration.
8458 (find_taken_edge_switch_expr): Likewise.
8459 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
8460 Find pivot in decision tree based on probabily, not by number of
8463 2018-09-02 Gerald Pfeifer <gerald@pfeifer.com>
8465 * doc/standards.texi (Standards): Update Objective-C reference.
8467 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
8469 * doc/install.texi (Prerequisites): Update link for MPC.
8471 2018-09-01 Michael Matz <matz@suse.de>
8473 PR tree-optimization/87074
8474 * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
8475 PHIs for outer-loop uses.
8477 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
8479 * doc/generic.texi (OpenMP): Adjust link to openmp.org.
8480 * doc/invoke.texi (C Dialect Options): Ditto.
8482 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
8484 * doc/install.texi (Prerequisites): Adjust link mpfr.org.
8486 2018-08-31 Richard Biener <rguenther@suse.de>
8488 PR tree-optimization/87168
8489 * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
8490 (rpo_elim::eliminate_avail): When OP was not visited it must
8493 2018-08-31 David Malcolm <dmalcolm@redhat.com>
8495 * tree-vrp.c (copy_value_range): Convert param "from" from
8496 "value_range *" to "const value_range *".
8497 (range_is_null): Likewise for param "vr".
8498 (range_int_cst_p): Likewise.
8499 (range_int_cst_singleton_p): Likewise.
8500 (symbolic_range_p): Likewise.
8501 (value_ranges_intersect_p): Likewise for both params.
8502 (value_range_nonnegative_p): Likewise for param "vr".
8503 (value_range_constant_singleton): Likewise.
8504 (vrp_set_zero_nonzero_bits): Likewise for param "ar".
8505 (extract_range_into_wide_ints): Likewise for param "vr".
8506 (extract_range_from_multiplicative_op): Likewise for params "vr0"
8508 (vrp_can_optimize_bit_op): Likewise.
8509 (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
8511 (extract_range_from_unary_expr): Likewise.
8512 (debug_value_range): Likewise for param "vr".
8513 (value_range::dump): Add "const" qualifier.
8514 (vrp_prop::check_array_ref): Convert local "vr" from
8515 "value_range *" to "const value_range *".
8516 (vrp_prop::check_mem_ref): Likewise.
8517 (vrp_prop::visit_stmt): Likewise for local "old_vr".
8518 (vrp_intersect_ranges_1): Likewise for param "vr_1".
8519 (vrp_intersect_ranges): Likewise.
8520 (simplify_stmt_for_jump_threading): Likewise for local "vr".
8521 (vrp_prop::vrp_finalize): Likewise.
8522 * tree-vrp.h (value_range::dump): Add "const" qualifier.
8523 (vrp_intersect_ranges): Add "const" qualifier to params as above.
8524 (extract_range_from_unary_expr): Likewise.
8525 (value_range_constant_singleton): Likewise.
8526 (symbolic_range_p): Likewise.
8527 (copy_value_range): Likewise.
8528 (extract_range_from_binary_expr_1): Likewise.
8529 (range_int_cst_p): Likewise.
8530 (vrp_set_zero_nonzero_bits): Likewise.
8531 (range_int_cst_singleton_p): Likewise.
8533 2018-08-31 Vlad Lazar <vlad.lazar@arm.com>
8535 * config/aarch64/arm_neon.h (vabsd_s64): New.
8536 (vnegd_s64): Likewise.
8538 2018-08-31 Martin Jambor <mjambor@suse.cz>
8540 * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
8542 2018-08-31 Martin Liska <mliska@suse.cz>
8544 * ipa-icf.c (sem_item::add_type): Use
8545 sem_item::m_type_hash_cache.
8546 * ipa-icf.h: Move the cache from sem_item_optimizer
8549 2018-08-31 Nathan Sidwell <nathan@acm.org>
8551 * doc/extend.texi (Backwards Compatibility): Remove implicit
8552 extern C leeway of () being (...).
8554 2018-08-31 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8556 * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
8558 2018-08-31 Segher Boessenkool <segher@kernel.crashing.org>
8562 * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
8564 2018-08-31 Jakub Jelinek <jakub@redhat.com>
8567 * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
8568 gen_int_mode. Formatting fixes.
8570 2018-08-30 Sandra Loosemore <sandra@codesourcery.com>
8572 * target.def (custom_function_descriptors): Improve documentation.
8573 * doc/tm.texi.in (Trampolines): Expand discussion of function
8574 descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
8575 beginning of the section.
8576 * doc/tm.texi: Regenerated.
8578 2018-08-30 Jose E. Marchesi <jose.marchesi@oracle.com>
8580 * cfg.h (class auto_edge_flag): Spell out the template-id of the
8581 base class in the initializer list. This is a workaround for
8582 building with older GCC.
8583 (class auto_bb_flag): Likewise.
8585 2018-08-30 Aaron Sawdey <acsawdey@linux.ibm.com>
8587 * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
8588 (altivec_vcmpequ<VI_char>_p): Remove star.
8589 * config/rs6000/rs6000-string.c (do_load_for_compare): Support
8591 (expand_strncmp_vec_sequence): New function.
8592 (emit_final_str_compare_vec): New function.
8593 (expand_strn_compare): Add support for vector strncmp.
8594 * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
8595 length specification to bytes.
8596 * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
8597 (vcmpnezb_p): New pattern.
8598 * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
8599 for option -mstring-compare-inline-limit.
8601 2018-08-30 Thiago Macieira <thiago.macieira@intel.com>
8603 * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
8604 (PTA_SKYLAKE): Add PTA_AES.
8605 (PTA_GOLDMONT): Likewise.
8607 2018-08-29 Jan Hubicka <jh@suse.cz>
8610 * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
8611 * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
8613 2018-08-29 Jan Hubicka <jh@suse.cz>
8615 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
8617 (hash_tree): Do not visit TYPE_STUB_DECL.
8618 * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
8619 stream TYPE_STUB_DECL.
8620 * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
8621 * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
8622 after free_lang_data.
8623 (type_in_anonymous_namespace_p): Likewise.
8625 2018-08-29 Jan Hubicka <jh@suse.cz>
8627 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
8628 comment that it has to be even number.
8629 (class sreal): Change m_sig type to int32_t.
8630 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
8631 int64_t for temporary calculations.
8632 (sreal_verify_basics): Drop one bit from minimum and maximum.
8634 2018-08-30 Richard Biener <rguenther@suse.de>
8636 PR tree-optimization/87147
8637 * tree-ssa-sccvn.c (SSA_VISITED): New function.
8638 (visit_phi): When the degenerate result is from the backedge and
8639 we didn't visit its definition yet drop to VARYING.
8640 (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
8642 2018-08-29 Jan Hubicka <jh@suse.cz>
8644 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
8646 (hash_tree): Likewise.
8648 2018-08-29 Jan Hubicka <jh@suse.cz>
8650 * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
8651 and TYPE_NEXT_REF_TO.
8653 2018-08-29 Jan Hubicka <jh@suse.cz>
8655 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
8656 comment that it has to be even number.
8657 (class sreal): Change m_sig type to int32_t.
8658 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
8659 int64_t for temporary calculations.
8660 (sreal_verify_basics): Drop one bit from minimum and maximum.
8662 2018-08-30 Tamar Christina <tamar.christina@arm.com>
8664 * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
8666 2018-08-30 Vlad Lazar <vlad.lazar@arm.com>
8669 * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
8670 if to_add is negative.
8672 2018-08-29 Bernd Edlinger <bernd.edlinger@hotmail.de>
8675 * builtins.c (c_strlen): Improve range checks.
8677 2018-08-29 Martin Sebor <msebor@redhat.com>
8678 Jeff Law <law@redhat.com>
8680 PR tree-optimization/86714
8681 PR tree-optimization/86711
8682 * builtins.c (c_strlen): Add arguments to call to string_constant.
8683 * expr.c (string_constant): Add argument. Detect missing nul
8684 terminator and outermost declaration it's missing in.
8685 * expr.h (string_constant): Add argument.
8686 * fold-const.c (read_from_constant_string): Add arguments to call to
8688 (c_getstr): Likewise.
8689 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
8691 * tree-ssa-strlen.c (get_stridx): Likewise.
8693 2018-08-29 Jan Hubicka <jh@suse.cz>
8695 * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
8696 Do not stream DECL_VINDEX.
8697 * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
8698 * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
8699 (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
8701 2018-08-29 Richard Biener <rguenther@suse.de>
8703 * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
8704 virtual operands that are not default defs to honor region
8706 (rpo_vn_valueize): Remove ineffective code here.
8708 2018-08-29 Richard Biener <rguenther@suse.de>
8710 PR tree-optimization/87132
8711 * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
8712 when skipping defs reachable over backedges.
8714 2018-08-29 Richard Biener <rguenther@suse.de>
8716 * tree-core.h: Document use of deprecated_flag in SSA_NAME.
8717 * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
8718 * tree-into-ssa.c (pass_build_ssa::execute): Initialize
8719 function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
8720 * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
8721 (vn_reference_lookup_3): Remove use of const_parms.
8722 (free_rpo_vn): Do not free const_parms.
8723 (do_rpo_vn): Do not call init_const_parms.
8724 * tree-ssa-alias.c (refs_may_alias_p_1): Honor
8725 SSA_NAME_POINTS_TO_READONLY_MEMORY.
8726 (call_may_clobber_ref_p_1): Likewise.
8728 2018-08-29 Alexander Monakov <amonakov@ispras.ru>
8731 * invoke.texi (Optimization Options): List -ftree-scev-cprop.
8733 (-ftree-scev-cprop): Document.
8735 2018-08-29 Jan Hubicka <jh@suse.cz>
8737 * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
8739 (sreal constructor): Update.
8740 * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
8741 sreal:operator/): Update.
8743 2018-08-29 Martin Liska <mliska@suse.cz>
8745 * tree-switch-conversion.c (switch_conversion::expand):
8746 Strenghten assumption about gswitch statements.
8748 2018-08-29 Richard Biener <rguenther@suse.de>
8750 PR tree-optimization/87117
8751 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
8752 re-value-number released SSA VDEFs.
8754 2018-08-29 Richard Biener <rguenther@suse.de>
8756 PR tree-optimization/87126
8757 * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
8759 2018-08-28 Jim Wilson <jimw@sifive.com>
8761 * config/riscv/pic.md: Rewrite.
8762 * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
8764 * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
8765 (SOFTF, default_load, softload, softstore): New.
8767 2018-08-28 Jeff Law <law@redhat.com>
8769 * fold-const.c (fold_binary_loc): Remove recently added assert.
8771 2018-08-28 Joern Rennecke <joern.rennecke@riscy-ip.com>
8773 * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
8774 to OP parmeter of generated function.
8776 2018-08-28 MCC CS <deswurstes@users.noreply.github.com>
8778 PR tree-optimization/87009
8779 * match.pd: Add boolean optimizations.
8781 2018-08-28 Martin Sebor <msebor@redhat.com>
8784 * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
8785 * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
8786 (pass_walloca::gate): Use it.
8787 (alloca_call_type): Same.
8788 (pass_walloca::execute): Same.
8789 * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
8791 2018-08-28 David Malcolm <dmalcolm@redhat.com>
8793 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
8794 GCC_VERSION for usage of "__gcc_dump_printf__" format from
8797 2018-08-28 Richard Biener <rguenther@suse.de>
8799 PR tree-optimization/87124
8800 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
8801 constants before looking up avail.
8803 2018-08-28 Jakub Jelinek <jakub@redhat.com>
8806 * calls.c (maybe_warn_nonstring_arg): Punt early if
8807 warn_stringop_overflow is zero. Don't call get_range_strlen
8808 on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
8809 Swap comparison operands to have constants on rhs. Only use
8810 lenrng[1] if non-NULL and INTEGER_CST. Don't uselessly
8811 increment lenrng[0].
8813 2018-08-28 Richard Sandiford <richard.sandiford@arm.com>
8815 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
8816 use of tree_to_shwi. Remove duplicated test for the size being
8817 a whole number of bytes.
8819 2018-08-28 Richard Biener <rguenther@suse.de>
8821 PR tree-optimization/87117
8822 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
8823 Handle removed stmt without LHS (GIMPLE_NOP).
8825 2018-08-28 Richard Biener <rguenther@suse.de>
8827 PR tree-optimization/87117
8828 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
8829 void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
8831 2018-08-28 Richard Biener <rguenther@suse.de>
8833 PR tree-optimization/87117
8834 * tree-ssa-pre.c (compute_avail): Do not make expressions
8835 with predicated values available.
8836 (get_expr_value_id): Assert we do not run into predicated value
8839 2018-08-28 Richard Biener <rguenther@suse.de>
8841 PR tree-optimization/87117
8842 * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
8843 get virtual operands.
8844 (get_expr_operands): Handle STRING_CST like other decls.
8846 2018-08-28 Martin Liska <mliska@suse.cz>
8848 * tree.h: Update documentation of fndecl_built_in_p
8852 2018-08-27 Jeff Law <law@redhat.com>
8853 PR tree-optimization/87110
8854 * tree-ssa-dse.c (compute_trims): Handle non-constant
8857 2018-08-27 Martin Sebor <msebor@redhat.com>
8859 PR tree-optimization/86914
8860 * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
8862 2018-08-27 Martin Sebor <msebor@redhat.com>
8864 PR tree-optimization/87112
8865 * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
8866 the type of the bound argument.
8868 2018-08-27 Jeff Law <law@redhat.com>
8870 * tree-ssa-dse.c (compute_trims): Handle case where the reference's
8871 type does not have a TYPE_SIZE_UNIT.
8873 2018-08-27 Steve Ellcey <sellcey@cavium.com>
8875 * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
8876 with include of backend.h.
8878 2018-08-27 Richard Biener <rguenther@suse.de>
8880 PR tree-optimization/86927
8881 * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
8882 use const cond reduction code.
8884 2018-08-27 Alexander Monakov <amonakov@ispras.ru>
8886 PR tree-optimization/85758
8887 * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
8889 2018-08-27 David Malcolm <dmalcolm@redhat.com>
8892 * diagnostic-show-locus.c (class layout_range): Update for
8893 conversion of show_caret_p to a tri-state.
8894 (layout_range::layout_range): Likewise.
8895 (make_range): Likewise.
8896 (layout::maybe_add_location_range): Likewise.
8897 (layout::should_print_annotation_line_p): Don't show annotation
8898 lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
8899 (layout::get_state_at_point): Update for conversion of
8900 show_caret_p to a tri-state. Bail out early for
8901 SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
8902 underlining or source colorization.
8903 (gcc_rich_location::add_location_if_nearby): Update for conversion
8904 of show_caret_p to a tri-state.
8905 (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
8906 (selftest::test_one_liner_fixit_replace_equal_secondary_range):
8908 (selftest::test_one_liner_labels): Likewise.
8909 * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
8910 conversion of show_caret_p to a tri-state.
8911 * pretty-print.c (text_info::set_location): Likewise.
8912 * pretty-print.h (text_info::set_location): Likewise.
8913 * substring-locations.c (format_warning_n_va): Likewise.
8914 * tree-diagnostic.c (default_tree_printer): Likewise.
8915 * tree-pretty-print.c (newline_and_indent): Likewise.
8917 2018-08-27 David Malcolm <dmalcolm@redhat.com>
8920 * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
8921 line above for line-insertion fix-it hints.
8922 (selftest::test_fixit_insert_containing_newline): Update the
8923 expected results, and add a test with line-numbering enabled.
8925 2018-08-27 Martin Liska <mliska@suse.cz>
8928 * sanopt.c (sanitize_rewrite_addressable_params): Ignore
8929 params with DECL_HAS_VALUE_EXPR_P.
8931 2018-08-27 Martin Liska <mliska@suse.cz>
8933 * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
8934 selected expansion strategy.
8936 2018-08-27 Martin Liska <mliska@suse.cz>
8938 * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
8939 * builtins.c (is_builtin_fn): Likewise.
8940 * attribs.c (diag_attr_exclusions): Use new function
8941 fndecl_built_in_p and remove check for FUNCTION_DECL if
8943 (builtin_mathfn_code): Likewise.
8944 (fold_builtin_expect): Likewise.
8945 (fold_call_expr): Likewise.
8946 (fold_builtin_call_array): Likewise.
8947 (fold_call_stmt): Likewise.
8948 (set_builtin_user_assembler_name): Likewise.
8949 (is_simple_builtin): Likewise.
8950 * calls.c (gimple_alloca_call_p): Likewise.
8951 (maybe_warn_nonstring_arg): Likewise.
8952 * cfgexpand.c (expand_call_stmt): Likewise.
8953 * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
8954 (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
8955 (cgraph_node::verify_node): Likewise.
8956 * cgraphclones.c (build_function_decl_skip_args): Likewise.
8957 (cgraph_node::create_clone): Likewise.
8958 * config/arm/arm.c (arm_insert_attributes): Likewise.
8959 * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
8960 * dse.c (scan_insn): Likewise.
8961 * expr.c (expand_expr_real_1): Likewise.
8962 * fold-const.c (operand_equal_p): Likewise.
8963 (fold_binary_loc): Likewise.
8964 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
8965 * gimple-low.c (lower_stmt): Likewise.
8966 * gimple-pretty-print.c (dump_gimple_call): Likewise.
8967 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
8969 * gimple.c (gimple_build_call_from_tree): Likewise.
8970 (gimple_call_builtin_p): Likewise.
8971 (gimple_call_combined_fn): Likewise.
8972 * gimplify.c (gimplify_call_expr): Likewise.
8973 (gimple_boolify): Likewise.
8974 (gimplify_modify_expr): Likewise.
8975 (gimplify_addr_expr): Likewise.
8976 * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
8977 * ipa-cp.c (determine_versionability): Likewise.
8978 * ipa-fnsummary.c (compute_fn_summary): Likewise.
8979 * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
8980 * ipa-split.c (visit_bb): Likewise.
8981 (split_function): Likewise.
8982 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
8983 * lto-cgraph.c (input_node): Likewise.
8984 * lto-streamer-out.c (write_symbol): Likewise.
8985 * omp-low.c (setjmp_or_longjmp_p): Likewise.
8986 (lower_omp_1): Likewise.
8987 * predict.c (strip_predict_hints): Likewise.
8988 * print-tree.c (print_node): Likewise.
8989 * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
8990 * trans-mem.c (is_tm_irrevocable): Likewise.
8991 (is_tm_load): Likewise.
8992 (is_tm_simple_load): Likewise.
8993 (is_tm_store): Likewise.
8994 (is_tm_simple_store): Likewise.
8995 (is_tm_abort): Likewise.
8996 (tm_region_init_1): Likewise.
8997 * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
8998 * tree-cfg.c (verify_gimple_call): Likewise.
8999 (move_stmt_r): Likewise.
9000 (stmt_can_terminate_bb_p): Likewise.
9001 * tree-eh.c (lower_eh_constructs_2): Likewise.
9002 * tree-if-conv.c (if_convertible_stmt_p): Likewise.
9003 * tree-inline.c (remap_gimple_stmt): Likewise.
9004 (copy_bb): Likewise.
9005 (estimate_num_insns): Likewise.
9006 (fold_marked_statements): Likewise.
9007 * tree-sra.c (scan_function): Likewise.
9008 * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
9009 (optimize_stack_restore): Likewise.
9010 (pass_fold_builtins::execute): Likewise.
9011 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
9012 (mark_all_reaching_defs_necessary_1): Likewise.
9013 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
9014 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
9015 (pass_forwprop::execute): Likewise.
9016 * tree-ssa-loop-im.c (stmt_cost): Likewise.
9017 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
9018 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
9019 * tree-ssa-strlen.c (get_string_length): Likewise.
9020 * tree-ssa-structalias.c (handle_lhs_call): Likewise.
9021 (find_func_aliases_for_call): Likewise.
9022 * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
9023 * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
9024 * tree-tailcall.c (find_tail_calls): Likewise.
9025 * tree.c (need_assembler_name_p): Likewise.
9026 (free_lang_data_in_decl): Likewise.
9027 (get_call_combined_fn): Likewise.
9028 * ubsan.c (is_ubsan_builtin_p): Likewise.
9029 * varasm.c (incorporeal_function_p): Likewise.
9030 * tree.h (DECL_BUILT_IN): Remove and replace with
9032 (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
9033 (fndecl_built_in_p): New.
9035 2018-08-27 Martin Liska <mliska@suse.cz>
9037 PR tree-optimization/86847
9038 * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
9039 Dump also subtree probability.
9040 (switch_decision_tree::do_jump_if_equal): New function.
9041 (switch_decision_tree::emit_case_nodes): Handle special
9042 situations in balanced tree that can be emitted much simpler.
9043 Fix calculation of probabilities that happen in tree expansion.
9044 * tree-switch-conversion.h (struct cluster): Add
9046 (struct simple_cluster): Likewise.
9047 (struct case_tree_node): Add new function has_child.
9048 (do_jump_if_equal): New.
9050 2018-08-27 Martin Liska <mliska@suse.cz>
9052 * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
9053 Add new argument to bit_test_cluster constructor.
9054 (bit_test_cluster::emit): Set bits really number of values
9056 (bit_test_cluster::hoist_edge_and_branch_if_true): Add
9057 probability argument.
9058 * tree-switch-conversion.h (struct bit_test_cluster):
9059 Add m_handles_entire_switch.
9061 2018-08-27 Martin Liska <mliska@suse.cz>
9063 PR tree-optimization/86702
9064 * tree-switch-conversion.c (jump_table_cluster::emit):
9065 Make probabilities even for values in jump table
9066 according to number of cases handled.
9067 (switch_decision_tree::compute_cases_per_edge): Pass
9068 argument to reset_out_edges_aux function.
9069 (switch_decision_tree::analyze_switch_statement): Likewise.
9070 * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
9073 2018-08-27 Martin Liska <mliska@suse.cz>
9075 * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
9076 cfun argument explicitly.
9077 * gimple-pretty-print.c (dump_gimple_switch): Likewise.
9078 * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
9079 function gimple_switch_default_bb.
9080 (convert_switch_statements):
9082 * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
9083 * stmt.c (label_to_block_fn): Use label_to_block and pass
9084 cfun argument explicitly and use gimple_switch_label_bb.
9085 (expand_case): Likewise.
9086 * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
9087 cfun argument explicitly. Likewise.
9088 (make_edges_bb): Likewise.
9089 (make_cond_expr_edges): Likewise.
9090 (get_cases_for_edge): Likewise.
9091 (make_gimple_switch_edges): Likewise.
9092 (label_to_block_fn): Likewise.
9093 (label_to_block): Likewise.
9094 (make_goto_expr_edges): Likewise.
9095 (make_gimple_asm_edges): Likewise.
9096 (main_block_label): Likewise.
9097 (group_case_labels_stmt): Likewise.
9098 (find_taken_edge_computed_goto): Likewise.
9099 (find_taken_edge_switch_expr): Likewise.
9100 (gimple_verify_flow_info): Likewise.
9101 (gimple_redirect_edge_and_branch): Likewise.
9102 (gimple_switch_label_bb): New function.
9103 (gimple_switch_default_bb): Likewise.
9104 (gimple_switch_edge): Likewise.
9105 (gimple_switch_default_edge): Likewise.
9106 * tree-cfg.h (label_to_block_fn): Remove and replace ...
9107 (label_to_block): ... with this.
9108 (gimple_switch_label_bb): New.
9109 (gimple_switch_default_bb): Likewise.
9110 (gimple_switch_edge): Likewise.
9111 (gimple_switch_default_edge): Likewise.
9112 * tree-cfgcleanup.c (convert_single_case_switch): Use
9113 new gimple functions and pass new argument to label_to_block.
9114 (cleanup_control_flow_bb):
9115 * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
9116 cfun argument explicitly.
9117 (make_eh_edges): Likewise.
9118 (redirect_eh_dispatch_edge): Likewise.
9119 (lower_resx): Likewise.
9120 (lower_eh_dispatch): Likewise.
9121 (maybe_remove_unreachable_handlers): Likewise.
9122 (unsplit_eh): Likewise.
9123 (cleanup_empty_eh): Likewise.
9124 (verify_eh_edges): Likewise.
9125 (verify_eh_dispatch_edge): Likewise.
9126 * tree-ssa-dom.c (record_edge_info): Likewise.
9127 * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
9128 * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
9129 (thread_through_normal_block): Likewise.
9130 * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
9131 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
9132 * tree-switch-conversion.c (switch_conversion::collect): Use new
9134 (switch_conversion::check_final_bb): Likewise.
9135 (switch_conversion::gather_default_values): Pass new argument
9137 (switch_conversion::build_constructors): Likewise.
9138 (switch_decision_tree::compute_cases_per_edge): Use new
9139 gimple_switch_edge function.
9140 (switch_decision_tree::analyze_switch_statement): Pass new argument
9142 (switch_decision_tree::try_switch_expansion): Use
9143 gimple_switch_default_edge.
9144 * tree-vrp.c (find_switch_asserts): Pass new argument
9146 * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
9147 (vr_values::simplify_switch_using_ranges): Likewise.
9149 2018-08-27 Richard Biener <rguenther@suse.de>
9151 * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
9152 * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
9154 * tree-ssa-sccvn.h (struct vn_pval): New structure.
9155 (struct vn_nary_op_s): Add unwind_to member. Add
9156 predicated_values flag and put result into a union together
9157 with a linked list of vn_pval.
9158 (struct vn_ssa_aux): Add name member to make maintaining
9159 a map of SSA name to vn_ssa_aux possible. Remove no longer
9160 needed info, dfsnum, low, visited, on_sccstack, use_processed
9161 and range_info_anti_range_p members.
9162 (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
9163 (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
9165 (vn_valueize): New global.
9166 (vn_context_bb): Likewise.
9167 (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
9168 VN_INFO_PTR_INFO): Remove.
9169 * tree-ssa-sccvn.c: ... (rewrite)
9170 (pass_fre::execute): For -O2+ initialize loops and run
9171 RPO VN in optimistic mode (iterating). For -O1 and -Og
9172 run RPO VN in non-optimistic mode.
9173 * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
9174 (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
9175 * doc/invoke.texi (sccvn-max-scc-size): Remove.
9176 (rpo-vn-max-loop-depth): Document.
9177 * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
9178 when valuezing the VUSE signals we walked out of the region.
9179 * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
9180 (phi_translate): Set VN context block to use for availability
9182 (compute_avail): Likewise.
9183 (pre_valueize): New function.
9184 (pass_pre::execute): Adjust to the RPO VN API.
9186 * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
9187 (propagate_constants_for_unrolling): Remove.
9188 (tree_unroll_loops_completely): Perform value-numbering
9189 on the unrolled bodies loop parent.
9191 2018-08-27 Richard Biener <rguenther@suse.de>
9193 * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
9194 for partial antic compute.
9196 2018-08-27 Jakub Jelinek <jakub@redhat.com>
9198 PR rtl-optimization/87065
9199 * combine.c (simplify_if_then_else): Formatting fix.
9200 (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
9202 (known_cond): Don't return const_true_rtx for vector modes. Use
9203 CONST0_RTX instead of const0_rtx. Formatting fixes.
9205 2018-08-27 Martin Liska <mliska@suse.cz>
9207 PR gcov-profile/87069
9208 * gcov.c (process_file): Record files already processed
9209 and warn about a file being processed multiple times.
9211 2018-08-27 Martin Liska <mliska@suse.cz>
9214 * config/aarch64/aarch64.c (aarch64_override_options_internal):
9215 Set default values for x_aarch64_*_string strings.
9216 * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
9217 prefix. For -mabi do not print '=ABI' in help and use
9218 <option_value> format for -msve-vector-bits and -moverride
9221 2018-08-26 Jeff Law <law@redhat.com>
9223 * config/mips/frame-header-opt.c: Include "backend.h" rather than
9226 2018-08-26 Marek Polacek <polacek@redhat.com>
9228 PR c++/87029, Implement -Wredundant-move.
9229 * doc/invoke.texi: Document -Wredundant-move.
9231 2018-08-25 Martin Sebor <msebor@redhat.com>
9233 PR tree-optimization/87059
9234 * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
9235 to the same type as the other.
9236 * fold-const.c (fold_binary_loc): Assert expectation.
9238 2018-08-25 Iain Sandoe <iain@sandoe.co.uk>
9240 * config/darwin.c (machopic_legitimize_pic_address): Clean up
9241 extraneous parentheses, dead code section and formatting.
9243 2018-08-24 David Malcolm <dmalcolm@redhat.com>
9246 * diagnostic-show-locus.c (layout::layout): Ensure the margin is
9247 wide enough for jumps in the line-numbering to be visible.
9248 (layout::print_gap_in_line_numbering): New member function.
9249 (layout::calculate_line_spans): When using line numbering, merge
9250 line spans that are only 1 line apart.
9251 (diagnostic_show_locus): When printing line numbers, show gaps in
9252 line numbering directly, rather than printing headers.
9253 (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
9254 line-numbering with multiple line spans.
9255 (selftest::test_fixit_insert_containing_newline_2): Add test of
9256 line-numbering, in which the spans are close enough to be merged.
9258 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
9260 * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
9261 to range_includes_zero_p. Do not special case VR_ANTI_RANGE.
9262 * tree-vrp.c (range_is_nonnull): Remove.
9263 (range_includes_zero_p): Accept value_range instead of min/max.
9264 (extract_range_from_binary_expr_1): Do not early bail on
9266 Use range_includes_zero_p instead of range_is_nonnull.
9267 (extract_range_from_unary_expr): Use range_includes_zero_p instead
9268 of range_is_nonnull.
9269 (vrp_meet_1): Pass value_range to range_includes_zero_p. Do not
9270 special case VR_ANTI_RANGE.
9271 (vrp_finalize): Same.
9272 * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
9274 (range_is_nonnull): Remove.
9275 * vr-values.c (vrp_stmt_computes_nonzero): Use
9276 range_includes_zero_p instead of range_is_nonnull.
9277 (extract_range_basic): Pass value_range to range_includes_zero_p
9278 instead of range_is_nonnull.
9280 2018-08-24 Uros Bizjak <ubizjak@gmail.com>
9282 * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
9283 * emit-rtl.h (rtl_data): Remove return_bnd.
9284 * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
9285 * function.c (diddle_return_value): Do not handle crtl->return_bnd.
9286 * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
9287 (POINTER_BOUNDS_MODE): Remove definition.
9288 (make_pointer_bounds_mode): Remove.
9289 (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
9290 * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
9291 (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
9292 * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
9293 * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
9294 * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
9295 * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
9297 * config/i386/i386-modes.def (BND32, BND64): Remove.
9298 * config/i386/i386.c (dbx_register_map): Remove bound registers.
9299 (dbx64_register_map): Ditto.
9300 (svr4_dbx_register_map): Ditto.
9301 (indirect_thunk_bnd_needed): Remove.
9302 (indirect_thunks_bnd_used): Ditto.
9303 (indirect_return_bnd_needed): Ditto.
9304 (indirect_return_via_cx_bnd): Ditto.
9305 (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
9306 (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
9307 (output_indirect_thunk): Ditto. Remove need_prefix argument.
9308 (output_indirect_thunk_function): Remove handling of
9309 indirect_return_bnd_needed, indirect_return_via_cx_bnd,
9310 indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
9311 (ix86_save_reg): Remove handling of crtl->return_bnd.
9312 (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
9313 (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
9314 and UNSPEC_BNDLX_ADDR.
9315 (ix86_output_indirect_branch_via_reg): Remove handling of
9316 indirect_thunk_prefix_bnd.
9317 (ix86_output_indirect_branch_via_push): Ditto.
9318 (ix86_output_function_return): Ditto.
9319 (ix86_output_indirect_function_return): Ditto.
9320 (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
9321 * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
9322 (CALL_USED_REGISTERS): Ditto.
9323 (REG_ALLOC_ORDER): Update for removal of bound registers.
9324 (HI_REGISTER_NAMES): Ditto.
9325 * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
9326 (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
9327 (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
9328 (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
9329 (FIRST_PSEUDO_REG): Update.
9330 (BND): Remove mode iterator.
9331 * config/i386/predicates.md (bnd_mem_operator): Remove.
9333 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
9335 * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
9338 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
9340 * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
9341 the case in which the permute needs only a single element and
9342 repeats for every vector of the result. Extend that case to
9343 handle variable-length vectors.
9344 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
9346 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
9349 * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
9350 on DW_MACINFO_start_file for -gsplit-dwarf -g3.
9352 2018-08-24 Richard Biener <rguenther@suse.de>
9354 * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
9355 bb_flags_allocated members.
9356 (auto_flag): New RAII class for allocating flags.
9357 (auto_edge_flag): New RAII class for allocating edge flags.
9358 (auto_bb_flag): New RAII class for allocating bb flags.
9359 * cfgloop.c (verify_loop_structure): Allocate temporary edge
9361 * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
9362 in favor of temporarily allocated BB flag.
9363 * hsa-brig.c: Re-order includes.
9364 * hsa-dump.c: Likewise.
9365 * hsa-regalloc.c: Likewise.
9366 * print-rtl.c: Likewise.
9367 * profile-count.c: Likewise.
9369 2018-08-24 Segher Boessenkool <segher@kernel.crashing.org>
9372 * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
9375 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
9378 * wide-int-range.cc (wide_int_range_div): Do not ignore result
9379 from wide_int_range_multiplicative_op.
9381 2018-08-23 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
9383 * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
9386 2018-08-23 Giuliano Belinassi <giuliano.belinassi@usp.br>
9388 * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
9391 2018-08-23 Alexander Monakov <amonakov@ispras.ru>
9393 * tree-scalar-evolution.c (final_value_replacement_loop): Dump
9394 full GENERIC expression used for replacement.
9396 2018-08-23 Aldy Hernandez <aldyh@redhat.com>
9398 * tree-vrp.c (abs_extent_range): Remove.
9399 (extract_range_into_wide_ints): Pass wide ints by reference.
9400 (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
9401 Pass wide ints by reference in all calls to
9402 extract_range_into_wide_ints.
9403 * wide-int-range.cc (wide_int_range_div): New.
9404 * wide-int-range.h (wide_int_range_div): New.
9405 (wide_int_range_includes_zero_p): New.
9406 (wide_int_range_zero_p): New.
9408 2018-08-23 Matthew Malcomson <matthew.malcomson@arm.com>
9410 * config/aarch64/aarch64.md (arches): New enum.
9411 (arch): New enum attr.
9412 (arch_enabled): New attr.
9413 (enabled): Now uses arch_enabled only.
9414 (simd, sve, fp16): Removed attribute.
9415 (fp): Attr now defined in terms of 'arch'.
9416 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
9417 *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
9418 <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
9419 <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
9420 attributes into 'arch'.
9421 (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
9422 subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
9423 *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
9424 *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
9425 *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
9426 'simd' attribute into 'arch'.
9427 (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
9428 store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
9429 Convert use of 'fp' attribute to 'arch'.
9430 * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
9431 move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
9433 (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
9434 (different modes) Merge 'fp' and 'simd' into 'arch'.
9435 (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
9438 2018-08-23 Segher Boessenkool <segher@kernel.crashing.org>
9440 PR rtl-optimization/87026
9441 * expmed.c (canonicalize_comparison): If we can no longer create
9442 pseudoregisters, don't.
9444 2018-08-23 Richard Earnshaw <rearnsha@arm.com>
9447 * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
9449 * config/arm/arm.c (speculation_barrier_libfunc): New static
9451 (arm_init_libfuncs): Initialize it.
9452 (arm_emit_speculation_barrier): New function.
9453 * config/arm/arm.md (speculation_barrier): Call
9454 arm_emit_speculation_barrier for architectures that do not have
9456 (speculation_barrier_insn): Only match on Armv7 or later.
9458 2018-08-23 Richard Biener <rguenther@suse.de>
9461 * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
9464 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
9466 * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
9467 of single-vector TBLs.
9468 (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
9471 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
9474 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
9475 aarch64_evpc_tbl guard.
9477 2018-08-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
9479 * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
9482 2018-08-22 Martin Sebor <msebor@redhat.com>
9485 * tree-pretty-print.c (pretty_print_string): Add argument.
9486 (dump_generic_node): Call to pretty_print_string with string size.
9488 2018-08-22 Segher Boessenkool <segher@kernel.crashing.org>
9490 PR rtl-optimization/86771
9491 * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
9492 of two SETs into those two SETs, one to be placed at i2, if that SETs
9493 destination is modified between i2 and i3.
9495 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
9497 PR tree-optimization/86725
9498 * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
9500 (vect_analyze_scalar_cycles_1): Check it.
9502 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
9504 PR tree-optimization/86725
9505 * tree-vect-loop.c (vect_is_simple_reduction): When treating
9506 an outer loop phi as a double reduction, make sure that the
9507 single user of the phi result is an inner loop phi.
9509 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
9511 * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
9512 grouped stores with gaps to a strided group.
9514 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
9516 * tree-vect-stmts.c (get_group_load_store_type)
9517 (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
9518 first statement in a group.
9520 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
9522 * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
9523 the sequence used in gcc/gcc.c.
9525 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
9528 * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
9531 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
9533 * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
9534 Darwin10-specific unwinder-shim.
9535 * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
9536 * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
9537 New to cater for Darwin10 Rosetta.
9539 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
9541 * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
9542 specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
9544 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
9549 * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
9550 (dwarf2out_switch_text_section): Generate a local label for the
9551 second function sub-section and apply it as the second FDE start
9553 * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
9554 second sub-section start.
9556 2018-08-22 Richard Biener <rguenther@suse.de>
9558 PR tree-optimization/86988
9559 * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
9561 2018-08-22 Richard Biener <rguenther@suse.de>
9563 PR tree-optimization/86945
9564 * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
9566 2018-08-22 Alexandre Oliva <oliva@adacore.com>
9568 * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
9569 a comment about how uses of r2 for .sdata2 come about.
9571 2018-08-22 Alexandre Oliva <aoliva@redhat.com>
9573 * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
9575 2018-08-21 Marek Polacek <polacek@redhat.com>
9577 PR c++/86981, Implement -Wpessimizing-move.
9578 * doc/invoke.texi: Document -Wpessimizing-move.
9580 2018-08-21 Jan Hubicka <jh@suse.cz>
9582 * tree.c (find_decls_types_r): Do not check for redundant typedefs.
9583 * tree.h (is_redundant_typedef): Remove.
9584 * dwarf2out.c (is_redundant_typedef): Turn into static function.
9586 2018-08-21 Jan Hubicka <jh@suse.cz>
9588 * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
9591 2018-08-21 Tamar Christina <tamar.christina@arm.com>
9593 * expmed.c (extract_low_bits): Reject invalid subregs early.
9595 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
9598 * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
9601 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
9603 * config/vxworks.h: Guard vxworks_asm_out_constructor and
9604 vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
9605 * config/vxworks.c: Likewise.
9607 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
9609 * config/vxworks.c: Set targetm.have_ctors_dtors
9610 if HAVE_INITFINI_ARRAY_SUPPORT.
9611 * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
9612 if HAVE_INITFINI_ARRAY_SUPPORT.
9614 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
9616 * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
9617 default search path for VxWorks < 7.
9619 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
9621 * gimple-ssa-sprintf.c (decl_constant_value): Remove.
9622 (get_format_string): Refer to c_getstr.
9624 2018-08-21 Tom de Vries <tdevries@suse.de>
9626 * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
9627 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
9628 (debuginfo_early_stop): Declare.
9629 * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
9630 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
9631 (debuginfo_early_stop): New function.
9632 (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
9633 and debuginfo_early_stop.
9634 * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
9635 * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
9636 (general_init): Call debuginfo_early_init.
9637 (finalize): Call debuginfo_fini.
9638 (do_compile): Call debuginfo_init.
9639 * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
9641 (@item -fdump-debug, @item -fdump-earlydebug): Add.
9643 2018-08-21 Tom de Vries <tdevries@suse.de>
9645 * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
9646 flag_dump_noaddr and flag_dump_unnumbered.
9648 2018-08-21 Aldy Hernandez <aldyh@redhat.com>
9650 * wide-int-range.cc (wide_int_range_abs): New.
9651 (wide_int_range_order_set): Rename from wide_int_range_min_max.
9652 * wide-int-range.h (wide_int_range_abs): New.
9653 (wide_int_range_min_max): New.
9654 * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
9655 case to call wide_int_range_abs.
9656 Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
9657 (extract_range_from_abs_expr): Delete.
9659 2018-08-20 Michael Meissner <meissner@linux.ibm.com>
9662 * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
9663 from 'Y' to 'YZ' to enable the LWAX instruction to be generated
9666 2018-08-20 Nathan Sidwell <nathan@acm.org>
9667 Jeff Law <law@redhat.com>
9669 * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
9670 * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
9672 2018-08-20 David Malcolm <dmalcolm@redhat.com>
9675 * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
9676 (decl_attributes): Likewise.
9677 * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
9679 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
9680 * diagnostic-core.h (class auto_diagnostic_group): New class.
9681 * diagnostic.c (diagnostic_initialize): Initialize the new fields.
9682 (diagnostic_report_diagnostic): Handle the first diagnostics within
9684 (emit_diagnostic): Add auto_diagnostic_group instance.
9686 (inform_n): Likewise.
9687 (warning): Likewise.
9688 (warning_at): Likewise.
9689 (warning_n): Likewise.
9690 (pedwarn): Likewise.
9691 (permerror): Likewise.
9693 (error_n): Likewise.
9694 (error_at): Likewise.
9696 (fatal_error): Likewise.
9697 (internal_error): Likewise.
9698 (internal_error_no_backtrace): Likewise.
9699 (auto_diagnostic_group::auto_diagnostic_group): New ctor.
9700 (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
9701 * diagnostic.h (struct diagnostic_context): Add fields
9702 "diagnostic_group_nesting_depth",
9703 "diagnostic_group_emission_count", "begin_group_cb",
9705 * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
9706 Add auto_diagnostic_group instance(s).
9707 (find_explicit_erroneous_behavior): Likewise.
9708 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
9709 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
9710 * gimplify.c (warn_implicit_fallthrough_r): Likewise.
9711 (gimplify_va_arg_expr): Likewise.
9712 * hsa-gen.c (HSA_SORRY_ATV): Likewise.
9713 (HSA_SORRY_AT): Likewise.
9714 * ipa-devirt.c (compare_virtual_tables): Likewise.
9715 (warn_odr): Likewise.
9716 * multiple_target.c (expand_target_clones): Likewise.
9717 * opts-common.c (cmdline_handle_error): Likewise.
9718 * reginfo.c (globalize_reg): Likewise.
9719 * substring-locations.c (format_warning_n_va): Likewise.
9720 * tree-inline.c (expand_call_inline): Likewise.
9721 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
9722 * tree-ssa-loop-niter.c
9723 (do_warn_aggressive_loop_optimizations): Likewise.
9724 * tree-ssa-uninit.c (warn_uninit): Likewise.
9725 * tree.c (warn_deprecated_use): Likewise.
9727 2018-08-20 H.J. Lu <hongjiu.lu@intel.com>
9730 * config/i386/i386.md (eh_return): Always update EH return
9731 address in word_mode.
9733 2018-08-20 Chung-Lin Tang <cltang@codesourcery.com>
9735 * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
9736 TARGET_SPLIT_COMPLEX_ARG is defined.
9738 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
9740 * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
9742 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
9745 * expr.c (expand_assignment): Assert that bitpos is positive.
9746 (store_field): Likewise
9747 (expand_expr_real_1): Make sure that bitpos is positive.
9748 * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
9751 2018-08-20 Nathan Sidwell <nathan@acm.org>
9753 * Makefile.in (CPP_ID_DATA_H): Delete.
9754 (CPP_INTERNAL_H): Don't add it.
9755 (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
9756 * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
9758 2018-08-20 Richard Biener <rguenther@suse.de>
9760 PR tree-optimization/78655
9761 * tree-vrp.c (extract_range_from_binary_expr_1): Make
9762 pointer + offset nonnull if either operand is nonnull work.
9764 2018-08-20 Tom de Vries <tdevries@suse.de>
9766 * dwarf2out.c (add_scalar_info): Don't add reference to existing die
9767 unless the referenced die describes the added property using
9768 DW_AT_location or DW_AT_const_value. Fall back to exprloc case.
9769 Otherwise, add a DW_AT_location to the referenced die.
9771 2018-08-19 Uros Bizjak <ubizjak@gmail.com>
9774 * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
9775 register_operand when calling ix86_set_reg_reg_cost.
9776 [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
9777 Set *total to 0 for operands that satisfy x86_64_immediate_operand
9778 predicate and to 1 otherwise.
9780 2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
9782 * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
9783 emit a diagnostic that it is not supported and reset the option.
9784 * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
9785 supported and consume the option. (ASM_FINAL_SPEC): New.
9787 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
9789 * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
9792 2018-08-17 Sandra Loosemore <sandra@codesourcery.com>
9794 C-SKY port: Documentation
9796 * doc/extend.texi (C-SKY Function Attributes): New section.
9797 * doc/invoke.texi (Option Summary): Add C-SKY options.
9798 (C-SKY Options): New section.
9799 * doc/md.texi (Machine Constraints): Document C-SKY constraints.
9801 2018-08-17 Jojo <jijie_rong@c-sky.com>
9802 Huibin Wang <huibin_wang@c-sky.com>
9803 Sandra Loosemore <sandra@codesourcery.com>
9804 Chung-Lin Tang <cltang@codesourcery.com>
9806 C-SKY port: Backend implementation
9808 * config/csky/*: New.
9809 * common/config/csky/*: New.
9811 2018-08-17 Jojo <jijie_rong@c-sky.com>
9812 Huibin Wang <huibin_wang@c-sky.com>
9813 Sandra Loosemore <sandra@codesourcery.com>
9814 Chung-Lin Tang <cltang@codesourcery.com>
9815 Andrew Jenner <andrew@codesourcery.com>
9817 C-SKY port: Configury
9819 * config.gcc (csky-*-*): New.
9820 * configure.ac: Add csky to targets for dwarf2 debug_line support.
9821 * configure: Regenerated.
9823 2018-08-17 David Malcolm <dmalcolm@redhat.com>
9825 * dump-context.h: Include "dumpfile.h".
9826 (dump_context::dump_printf_va): Convert final param from va_list
9827 to va_list *. Convert from ATTRIBUTE_PRINTF to
9828 ATTRIBUTE_GCC_DUMP_PRINTF.
9829 (dump_context::dump_printf_loc_va): Likewise.
9830 * dumpfile.c: Include "stringpool.h".
9831 (make_item_for_dump_printf_va): Delete.
9832 (make_item_for_dump_printf): Delete.
9833 (class dump_pretty_printer): New class.
9834 (dump_pretty_printer::dump_pretty_printer): New ctor.
9835 (dump_pretty_printer::emit_items): New member function.
9836 (dump_pretty_printer::emit_any_pending_textual_chunks): New member
9838 (dump_pretty_printer::emit_item): New member function.
9839 (dump_pretty_printer::stash_item): New member function.
9840 (dump_pretty_printer::format_decoder_cb): New member function.
9841 (dump_pretty_printer::decode_format): New member function.
9842 (dump_context::dump_printf_va): Reimplement in terms of
9843 dump_pretty_printer.
9844 (dump_context::dump_printf_loc_va): Convert final param from va_list
9846 (dump_context::begin_scope): Reimplement call to
9847 make_item_for_dump_printf.
9848 (dump_printf): Update for change to dump_printf_va.
9849 (dump_printf_loc): Likewise.
9850 (selftest::test_capture_of_dump_calls): Convert "stmt" from
9851 greturn * to gimple *. Add a test_decl. Add tests of dump_printf
9852 with %T, %E, and %G.
9853 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
9854 (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
9855 ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
9856 (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
9857 ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
9858 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
9859 use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
9860 within a dump_printf_loc call to "%wu".
9861 (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
9862 converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd". Add a
9863 missing space after "=".
9864 * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
9865 call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
9866 * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
9867 convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
9868 * tree-vectorizer.c (try_vectorize_loop_1): Likewise. Remove
9869 duplicate "vectorized" from message.
9871 2018-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
9873 * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
9874 polyNxK_t element's TYPE_STRING_FLAG.
9876 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
9878 * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
9879 (they were unnamed before). Fix comments.
9881 2018-08-17 Nathan Sidwell <nathan@acm.org>
9883 * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
9885 2018-08-17 Richard Biener <rguenther@suse.de>
9887 PR tree-optimization/86841
9888 * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
9890 2018-08-17 Martin Liska <mliska@suse.cz>
9892 * common.opt: Remove Warn, Init and Report for options with
9893 Ignore/Deprecated flag. Warning is done automatically for
9895 * config/i386/i386.opt: Likewise.
9896 * config/ia64/ia64.opt: Likewise.
9897 * config/rs6000/rs6000.opt: Likewise.
9898 * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
9899 Remove usage of flag_check_pointer_bounds.
9900 * lto-wrapper.c (merge_and_complain): Do not handle
9901 OPT_fcheck_pointer_bounds.
9902 (append_compiler_options): Likewise.
9903 * opt-functions.awk: Do not handle Deprecated.
9904 * optc-gen.awk: Check that Var, Report and Init are not
9905 used for an option with Ignore/Deprecated flag.
9906 * opts-common.c (decode_cmdline_option): Do not report
9908 (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
9910 * opts.h (struct cl_option): Remove cl_deprecated flag.
9911 (CL_ERR_DEPRECATED): Remove error enum value.
9913 2018-08-17 Richard Biener <rguenther@suse.de>
9916 * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
9917 across a va-arg-pack using call adjust its return value accordingly.
9919 2018-08-16 Martin Sebor <msebor@redhat.com>
9921 PR tree-optimization/86853
9922 * gimple-ssa-sprintf.c (struct format_result): Rename member.
9923 (struct fmtresult): Add member and initialize it in ctors.
9924 (format_character): Handle %C. Extend range to NUL. Set MAYFAIL.
9925 (format_string): Handle %S the same as %ls. Set MAYFAIL.
9926 (format_directive): Set POSUNDER4K when MAYFAIL is set.
9927 (parse_directive): Handle %C same as %c.
9928 (sprintf_dom_walker::compute_format_length): Adjust.
9929 (is_call_safe): Adjust.
9931 2018-08-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
9933 * builtins.c (c_strlen): Add new parameter eltsize. Use it
9934 for determining how to count the elements.
9935 * builtins.h (c_strlen): Adjust prototype.
9936 * expr.c (string_constant): Add new parameter mem_size.
9937 Set *mem_size appropriately.
9938 * expr.h (string_constant): Adjust protoype.
9939 * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
9940 * gimple-fold.h (get_range_strlen): Adjust prototype.
9941 * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
9942 (format_string): Call get_string_length with eltsize.
9944 2018-08-16 David Malcolm <dmalcolm@redhat.com>
9946 * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
9947 to emit the span, rather than setting it as the prefix.
9949 2018-08-16 David Malcolm <dmalcolm@redhat.com>
9951 * diagnostic-show-locus.c (layout::start_annotation_line): Add
9952 "margin_char" parameter, defaulting to space. Use it in place
9953 of pp_space for the initial part of the margin.
9954 (layout::print_leading_fixits): Use '+' when filling the margin
9955 of line-insertion fix-it hints.
9957 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
9959 * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
9962 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
9964 * config/rs6000/altivec.md: Don't set length attribute to the default
9966 * config/rs6000/darwin.md: Ditto.
9967 * config/rs6000/dfp.md: Ditto.
9968 * config/rs6000/htm.md: Ditto.
9969 * config/rs6000/rs6000.md: Ditto.
9970 * config/rs6000/sync.md: Ditto.
9971 * config/rs6000/vsx.md: Ditto.
9973 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
9975 * config/rs6000/altivec.md: Don't set length attribute to the default
9976 value, for branch instructions.
9977 * config/rs6000/darwin.md: Ditto.
9978 * config/rs6000/rs6000.md: Ditto.
9980 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
9982 * config/rs6000/rs6000.md (length): Always define as const_int 4.
9983 (unnamed conditional branch define_insn): Set length to 4 or 8
9984 depending on offset.
9985 (<bd>_<mode>): Similar, for alternative 0.
9986 (<bd>tf_<mode>): Ditto.
9988 2018-08-16 Tamar Christina <tamar.christina@arm.com>
9990 * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
9992 2018-08-16 Matthew Malcomson <matthew.malcomson@arm.com>
9994 * doc/rtl.texi: Replace old RTX class names with new names.
9997 2018-08-16 Vlad Lazar <vlad.lazar@arm.com>
9999 * expmed.h (canonicalize_comparison): New declaration.
10000 * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
10001 * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
10002 * optabs.c (prepare_cmp_insn): Likewise.
10003 * rtl.h (unsigned_condition_p): New function which checks if a
10004 comparison operator is unsigned.
10006 2018-08-16 Nathan Sidwell <nathan@acm.org>
10008 * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
10009 * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
10011 2018-08-16 Tamar Christina <tamar.christina@arm.com>
10014 * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
10015 * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
10016 (mov<mov>): ..this and enable unconditionally.
10018 2018-08-16 Tamar Christina <tamar.christina@arm.com>
10020 * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
10022 2018-08-16 Sam Tebbs <sam.tebbs@arm.com>
10024 * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
10025 (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
10026 "Common" with "Target".
10028 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
10030 * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
10031 * doc/invoke.texi (mmitigate-rop): Remove.
10032 * config/i386/i386.c: Do not include "regrename.h".
10033 (ix86_rop_should_change_byte_p, reg_encoded_number)
10034 (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
10036 (ix86_reorg): Remove call to ix86_mitigate_rop.
10037 * config/i386/i386.md (attr "modrm_class"): Remove.
10038 (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
10039 (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
10040 (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
10042 2018-08-15 Will Schmidt <will_schmidt@vnet.ibm.com>
10044 * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
10045 allow folding of mergeh() and mergel() for the float and double types.
10046 (fold_mergehl_helper): Rework to handle building a permute tree
10049 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
10051 * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
10054 2018-08-15 David Malcolm <dmalcolm@redhat.com>
10056 * common.opt (fdiagnostics-show-labels): New option.
10057 * diagnostic-show-locus.c (class layout_range): Add field
10059 (class layout): Add field "m_show_labels_p".
10060 (layout_range::layout_range): Add param "label" and use it to
10061 initialize m_label.
10062 (make_range): Pass in NULL for new "label" param of layout_range's
10064 (layout::layout): Initialize m_show_labels_p.
10065 (layout::maybe_add_location_range): Pass in loc_range->m_label
10066 when constructing layout_range instances.
10067 (struct line_label): New struct.
10068 (layout::print_any_labels): New member function.
10069 (layout::print_line): Call it if label-printing is enabled.
10070 (selftest::test_one_liner_labels): New test.
10071 (selftest::test_diagnostic_show_locus_one_liner): Call it.
10072 * diagnostic.c (diagnostic_initialize): Initialize
10073 context->show_labels_p.
10074 * diagnostic.h (struct diagnostic_context): Add field
10076 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
10077 -fno-diagnostics-show-labels.
10078 * dwarf2out.c (gen_producer_string): Add
10079 OPT_fdiagnostics_show_labels to the ignored options.
10080 * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
10082 (gcc_rich_location::maybe_add_expr): Likewise.
10083 * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
10084 label" param, defaulting to NULL.
10085 (gcc_rich_location::add_expr): Add "label" param.
10086 (gcc_rich_location::maybe_add_expr): Likewise.
10087 (class text_range_label): New class.
10088 (class range_label_for_type_mismatch): New class.
10089 * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
10090 of format_warning_va.
10091 (fmtwarn_n): Likewise for new params of format_warning_n_va.
10092 * lto-wrapper.c (merge_and_complain): Add
10093 OPT_fdiagnostics_show_labels to the "pick one setting" options.
10094 (append_compiler_options): Likewise to the dropped options.
10095 (append_diag_options): Likewise to the passed-on options.
10096 * opts.c (common_handle_option): Handle the new option.
10097 * selftest-diagnostic.c
10098 (test_diagnostic_context::test_diagnostic_context): Enable
10100 * substring-locations.c: Include "gcc-rich-location.h".
10101 (format_warning_n_va): Add "fmt_label" and "param_label" params
10102 and use them as appropriate.
10103 (format_warning_va): Add "fmt_label" and "param_label" params,
10104 passing them on to format_warning_n_va.
10105 (format_warning_at_substring): Likewise.
10106 (format_warning_at_substring_n): Likewise.
10107 * substring-locations.h (format_warning_va): Add "fmt_label" and
10108 "param_label" params.
10109 (format_warning_n_va): Likewise.
10110 (format_warning_at_substring): Likewise.
10111 (format_warning_at_substring_n): Likewise.
10112 * toplev.c (general_init): Initialize global_dc->show_labels_p.
10114 2018-08-15 Qing Zhao <qing.zhao@oracle.com>
10117 * builtins.c (expand_builtin_memcmp): Do not expand the call
10118 when overflow is detected.
10120 2018-08-15 Martin Sebor <msebor@redhat.com>
10122 PR tree-optimization/71625
10123 * config/aarch64/aarch64-builtins.c
10124 (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
10126 2018-08-15 Ilya Leoshkevich <iii@linux.ibm.com>
10128 * config/s390/s390.c (s390_reorg): Remove loop.
10130 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
10133 (darwin_function_switched_text_sections): Delete.
10134 * gcc/config/darwin.h
10135 (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
10137 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
10140 * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
10141 DEBUG_RNGLISTS_SECTION) new macros. (DEBUG_PUBNAMES_SECTION,
10142 DEBUG_PUBTYPES_SECTION) update to include GNU variant.
10144 2018-08-15 Martin Liska <mliska@suse.cz>
10146 PR tree-optimization/86925
10147 * predict.c (expr_expected_value_1): When taking
10148 later predictor, assign also probability.
10149 Use fold_build2_initializer_loc in order to fold
10150 the expression in -frounding-math.
10152 2018-08-14 Allan Sandfeld Jensen <allan.jensen@qt.io>
10154 * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
10156 (expand_vec_perm_1): Try the new method.
10158 2018-08-14 Ilya Leoshkevich <iii@linux.ibm.com>
10161 * lra-lives.c (remove_some_program_points_and_update_live_ranges):
10162 Check whether lra_live_max_point is 0 before dividing.
10164 2018-08-14 Martin Sebor <msebor@redhat.com>
10166 PR tree-optimization/86650
10167 * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
10168 (vrp_prop::check_mem_ref): Same.
10170 2018-08-13 Liu Hao <lh_mouse@126.com>
10172 * pretty-print.c (eat_esc_sequence): Swap the foreground and
10173 background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
10174 and clear it thereafter, as it only works for DBCS.
10176 2018-08-13 Liu Hao <lh_mouse@126.com>
10178 * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
10179 handle returned by _get_osf_handle().
10181 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
10183 * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
10184 for folding vec_perm.
10186 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
10188 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
10189 Add support for gimple-folding of vec_pack() and vec_unpack()
10192 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
10194 * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
10195 vec_xst variants to the list.
10196 (rs6000_gimple_fold_builtin): Add support for folding unaligned
10197 vector loads and stores.
10199 2018-08-13 David Edelsohn <dje.gcc@gmail.com>
10201 * config.gcc (rs6000-ibm-aix4.x): Delete.
10202 (rs6000-ibm-aix5.1): Delete.
10203 (rs6000-ibm-aix5.2): Delete.
10204 (rs6000-ibm-aix5.3): Delete.
10205 * config/rs6000/aix43.h: Delete.
10206 * config/rs6000/aix51.h: Delete.
10207 * config/rs6000/aix52.h: Delete.
10208 * config/rs6000/t-aix43: Delete.
10210 2018-08-13 Ilya Leoshkevich <iii@linux.ibm.com>
10212 * config/s390/s390.c (s390_decompose_constant_pool_ref):
10214 (s390_decompose_address): Factor out constant pool ref
10217 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
10219 * config/nds32/nds32-predicates.c
10220 (nds32_can_use_bclr_p): Change return type as bool.
10221 (nds32_can_use_bset_p): Ditto.
10222 (nds32_can_use_btgl_p): Ditto.
10223 (nds32_can_use_bitci_p): Ditto.
10224 * config/nds32/nds32-protos.h
10225 (nds32_can_use_bclr_p): Change declaration.
10226 (nds32_can_use_bset_p): Ditto.
10227 (nds32_can_use_btgl_p): Ditto.
10228 (nds32_can_use_bitci_p): Ditto.
10230 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
10232 * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
10233 Support -msched-prolog-epilog option.
10234 * config/nds32/nds32.opt (msched-prolog-epilog): New option.
10236 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
10238 * common/config/nds32/nds32-common.c
10239 (nds32_option_optimization_table): Enalbe -malways-align.
10241 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
10243 * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
10245 * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
10246 OPT_misr_secure_ case.
10247 * config/nds32/nds32-isr.c: Implementation of backward compatibility.
10248 * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
10249 * config/nds32/nds32.c (nds32_attribute_table): Add critical and
10251 * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
10252 (nds32_isr_info): New field security_level.
10253 (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
10254 * config/nds32/nds32.md (return_internal): Consider critical attribute.
10255 * config/nds32/nds32.opt (misr-secure): New option.
10256 * config/nds32/nds32_init.inc: New file.
10257 * config/nds32/nds32_isr.h: New file.
10259 2018-08-11 John David Anglin <danglin@gcc.gnu.org>
10261 * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
10262 Update comment for atomic instructions.
10263 (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
10264 atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
10266 (atomic_loaddi): Revise fence expansion to only emit fence prior to
10267 load for __ATOMIC_SEQ_CST model.
10268 (atomic_loaddi_1): Remove float register target.
10269 (atomic_storedi): Handle CONST_INT values.
10270 (atomic_storedi_1): Remove float register source. Add special case
10272 (memory_barrier): New expander and insn.
10274 2018-08-11 Jakub Jelinek <jakub@redhat.com>
10276 PR tree-optimization/86835
10277 * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
10278 new_stmt after def_gsi, make sure to insert new_square_stmt after
10279 that stmt, not 2 stmts before it.
10281 2018-08-10 Alexander Monakov <amonakov@ispras.ru>
10284 * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
10287 2018-08-10 Martin Liska <mliska@suse.cz>
10290 * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
10292 * builtins.c (expand_builtin_expect_with_probability):
10294 (expand_builtin_expect_with_probability): New function.
10295 (build_builtin_expect_predicate): Add new argumnet probability
10296 for BUILT_IN_EXPECT_WITH_PROBABILITY.
10297 (fold_builtin_expect):
10300 * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
10301 * builtins.h (fold_builtin_expect): Set new argument.
10302 * doc/extend.texi: Document __builtin_expect_with_probability.
10303 * doc/invoke.texi: Likewise.
10304 * gimple-fold.c (gimple_fold_call): Pass new argument.
10305 * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
10306 also BUILT_IN_EXPECT_WITH_PROBABILITY.
10307 * predict.c (get_predictor_value): New function.
10308 (expr_expected_value): Add new argument probability. Assume
10309 that predictor and probability are always non-null.
10310 (expr_expected_value_1): Likewise. For __builtin_expect and
10311 __builtin_expect_with_probability set probability. Handle
10312 combination in binary expressions.
10313 (tree_predict_by_opcode): Simplify code by simply calling
10314 get_predictor_value.
10315 (pass_strip_predict_hints::execute): Add handling of
10316 BUILT_IN_EXPECT_WITH_PROBABILITY.
10317 * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
10319 * tree.h (DECL_BUILT_IN_P): New function.
10321 2018-08-10 Martin Liska <mliska@suse.cz>
10323 PR tree-optimization/85799
10324 * passes.def: Add argument for pass_strip_predict_hints.
10325 * predict.c (class pass_strip_predict_hints): Add new argument
10327 (strip_predictor_early): New function.
10328 (pass_strip_predict_hints::execute): Call the function to
10330 (strip_predict_hints): New function.
10331 * predict.def: Fix comment.
10333 2018-08-10 Thomas Preud'homme <thomas.preudhomme@linaro.org>
10335 * Makefile.in: Clarify which tm.texi to copy over to assert the
10336 right to grant a GFDL license for all.
10338 2018-08-09 Jeff Law <law@redhat.com>
10340 * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
10343 2018-08-09 Andreas Schwab <schwab@linux-m68k.org>
10345 * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
10348 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
10350 * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
10351 reductions for variable-length vectors.
10353 2018-08-09 David Malcolm <dmalcolm@redhat.com>
10356 * common.opt (fdiagnostics-show-line-numbers): New option.
10357 * diagnostic-show-locus.c (class layout): Add fields
10358 "m_show_line_numbers_p" and "m_linenum_width";
10359 (num_digits): New function.
10360 (test_num_digits): New function.
10361 (layout::layout): Initialize new fields. Update m_x_offset
10362 logic to handle any left margin.
10363 (layout::print_source_line): Print line number when requested.
10364 (layout::start_annotation_line): New member function.
10365 (layout::print_annotation_line): Call it.
10366 (layout::print_leading_fixits): Likewise.
10367 (layout::print_trailing_fixits): Likewise. Update calls to
10368 move_to_column for new parameter.
10369 (layout::get_x_bound_for_row): Add "add_left_margin" param and use
10370 it to potentially call start_annotation_line.
10371 (layout::show_ruler): Call start_annotation_line.
10372 (selftest::test_line_numbers_multiline_range): New selftest.
10373 (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
10374 and selftest::test_line_numbers_multiline_range.
10375 * diagnostic.c (diagnostic_initialize): Initialize
10376 show_line_numbers_p.
10377 * diagnostic.h (struct diagnostic_context): Add field
10378 "show_line_numbers_p".
10379 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
10380 -fno-diagnostics-show-line-numbers.
10381 * dwarf2out.c (gen_producer_string): Add
10382 OPT_fdiagnostics_show_line_numbers to the ignored options.
10383 * lto-wrapper.c (merge_and_complain): Likewise to the "pick
10384 one setting" options.
10385 (append_compiler_options): Likewise to the dropped options.
10386 (append_diag_options): Likewise to the passed-on options.
10387 * opts.c (common_handle_option): Handle the new option.
10388 * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
10390 2018-08-09 Kelvin Nilsen <kelvin@gcc.gnu.org>
10392 * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
10393 ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub. Add
10394 third argument of type "const signed char" to descriptions of
10395 __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
10396 __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
10397 __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
10398 __builtin_bcdsub_ov functions.
10400 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
10402 PR tree-optimization/86858
10403 * tree-vect-loop.c (vect_is_simple_reduction): Restore
10404 flow_bb_inside_loop_p calls.
10406 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
10408 PR tree-optimization/86871
10409 * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
10410 instead of gimple_assign_lhs.
10412 2018-08-09 Richard Earnshaw <rearnsha@arm.com>
10415 * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
10416 register constraint to operand 0.
10417 (add<mode>3_carryinC): Likewise.
10418 (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
10420 2018-08-09 Martin Liska <mliska@suse.cz>
10423 * common.opt: Remove extra line.
10425 2018-08-09 Martin Liska <mliska@suse.cz>
10427 * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
10428 at the end of a line, make first letter capital and end up
10429 a sentence with a dot.
10430 (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
10431 (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
10432 (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
10433 (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
10434 (PARAM_MAX_ISL_OPERATIONS): Likewise.
10435 (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
10436 (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
10437 (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
10438 (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
10439 (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
10440 (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
10441 (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
10442 (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
10443 (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
10444 (PARAM_TREE_REASSOC_WIDTH): Likewise.
10445 (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
10446 (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
10447 (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
10449 2018-08-09 Andreas Krebbel <krebbel@linux.ibm.com>
10452 * config/s390/s390.c (s390_option_override_internal): Reduce the
10453 stack-clash-protection-probe-interval param if it would be too big
10456 2018-08-08 Andreas Schwab <schwab@linux-m68k.org>
10459 * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
10460 * config/m68k/m68k.c (handle_move_double): Don't call
10461 m68k_final_prescan_insn.
10462 (m68k_adjust_decorated_operand): Renamed from
10463 m68k_final_prescan_insn, remove first and third operand and
10465 (print_operand): Call it.
10466 (print_operand_address): Call it.
10468 2018-08-08 Nathan Sidwell <nathan@acm.org>
10470 * diagnostic.c (diagnostic_report_current_module): Use
10471 linemap_included_from & linemap_included_from_linemap.
10473 2018-08-08 Hongbo Zhang <hongbo.zhang@linaro.org>
10475 * config/aarch64/aarch64-cores.def: Add phecda core.
10476 * config/aarch64/aarch64-tune.md: Regenerate.
10477 * doc/invoke.texi: Add phecda core.
10479 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
10482 * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
10484 * config/s390/s390.md ("movti"): Add more alternatives for
10485 constant to GPR copies.
10487 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
10489 * config/s390/s390.c: Fix whitespace damage throughout the file.
10490 * config/s390/s390.h: Likewise.
10491 * config/s390/tpf.h: Likewise.
10493 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
10495 * config/s390/s390.c (s390_loadrelative_operand_p):
10496 Remove TARGET_CPU_ZARCH usages.
10497 (s390_rtx_costs): Likewise.
10498 (s390_legitimate_constant_p): Likewise.
10499 (s390_cannot_force_const_mem): Likewise.
10500 (legitimate_reload_constant_p): Likewise.
10501 (s390_preferred_reload_class): Likewise.
10502 (legitimize_pic_address): Likewise.
10503 (legitimize_tls_address): Likewise.
10504 (s390_split_branches): Removed.
10505 (s390_add_execute): Removed.
10506 (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
10507 (s390_mainpool_start): Likewise.
10508 (s390_mainpool_finish): Likewise.
10509 (s390_mainpool_cancel): Removed.
10510 (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
10511 (s390_chunkify_cancel): Likewise.
10512 (s390_return_addr_rtx): Likewise.
10513 (s390_register_info): Remove split_branches_pending_p uages.
10514 (s390_optimize_register_info): Likewise.
10515 (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
10516 split_branches_pending_p usages.
10517 (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
10518 (s390_load_got): Likewise.
10519 (s390_expand_split_stack_prologue): Likewise.
10520 (output_asm_nops): Likewise.
10521 (s390_function_profiler): Likewise.
10522 (s390_emit_call): Likewise.
10523 (s390_conditional_register_usage): Likewise.
10524 (s390_optimize_prologue): Likewise.
10525 (s390_reorg): Remove TARGET_CPU_ZARCH and
10526 split_branches_pending_p usages.
10527 (s390_option_override_internal): Remove TARGET_CPU_ZARCH
10529 (s390_output_indirect_thunk_function): Likewise.
10530 * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
10531 (TARGET_CPU_ZARCH_P): Removed.
10532 (struct machine_function): Remove split_branches_pending_p.
10533 * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
10535 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
10537 * common/config/s390/s390-common.c (processor_flags_table):
10539 * config.gcc: Remove with_arch/with_tune support.
10540 * config/s390/2064.md: Remove cpu attribute comparisons.
10541 * config/s390/driver-native.c (s390_host_detect_local_cpu):
10543 * config/s390/linux.h (ASM_SPEC):
10544 Remove -march support.
10545 * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
10546 Use a table to get an arch level.
10547 * config/s390/s390-opts.h (enum processor_type):
10548 Remove enum values.
10549 * config/s390/s390.c
10550 (processor_table): Remove entries, add arch_level values.
10551 (s390_issue_rate): Remove cases.
10552 (s390_option_override): Adjust
10553 s390_option_override_internal() call.
10554 (s390_option_override_internal): Remove deprecation warning.
10555 (s390_valid_target_attribute_tree): Adjust
10556 s390_option_override_internal() call.
10557 * config/s390/s390.h (struct s390_processor):
10558 Share with s390-c.c, add arch_level field.
10559 * config/s390/s390.md:
10560 Remove occurrences in cpu attribute.
10561 * config/s390/s390.opt: Remove -march/-mtune support.
10562 * config/s390/tpf.h (ASM_SPEC): Remove -march support.
10563 * doc/invoke.texi: Remove deprecation warning.
10565 2018-08-08 Luis Machado <luis.machado@linaro.org>
10567 * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
10569 (qdf24xx_tunings): Set vector cost structure to
10570 qdf24xx_vector_cost.
10572 * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
10573 <register_sextend>: Set to 3.
10575 2018-08-07 Richard Sandiford <richard.sandiford@arm.com>
10578 * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
10579 * config/aarch64/aarch64-simd.md
10580 (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
10581 (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
10582 (aarch64_frecpx<mode>): ...this new pattern.
10583 * config/aarch64/aarch64-simd-builtins.def: Remove comment
10584 about aarch64_frecp<FRECP:frecp_suffix><mode>.
10586 2018-08-07 Martin Liska <mliska@suse.cz>
10588 PR middle-end/83023
10589 * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
10590 BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
10591 * predict.def (PRED_MALLOC_NONNULL): New predictor.
10592 * doc/extend.texi: Document that malloc attribute adds
10595 2018-08-06 John David Anglin <danglin@gcc.gnu.org>
10598 * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10599 Define to speculation_safe_value_not_needed.
10601 2018-08-06 Jeff Law <law@redhat.com>
10603 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
10604 the vr_values instance to cprop_into_stmt.
10605 (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
10606 (cprop_operand): Also query EVRP to determine if OP is a constant.
10608 2018-08-06 Nathan Sidwell <nathan@acm.org>
10610 * diagnostic.c (diagnostic_report_current_module): Reroll
10611 included-at loop. Translate text.
10613 2018-08-06 David Malcolm <dmalcolm@redhat.com>
10615 * function-tests.c (selftest::test_expansion_to_rtl): Call
10616 free_after_compilation.
10618 2018-08-06 Alan Hayward <alan.hayward@arm.com>
10620 * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
10622 2018-08-06 Andreas Krebbel <krebbel@linux.ibm.com>
10624 * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
10625 loops with memory block operations from getting unrolled.
10627 2018-08-06 Ulrich Weigand <uweigand@de.ibm.com>
10630 * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10631 Define to speculation_safe_value_not_needed.
10633 2018-08-06 Jeff Law <law@redhat.com>
10635 * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
10638 2018-08-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
10641 * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
10642 with all enabled __intN types.
10644 * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
10646 2018-08-06 Alan Hayward <alan.hayward@arm.com>
10648 * alias.c (record_set): Check for clobber high.
10649 * cfgexpand.c (expand_gimple_stmt): Likewise.
10650 * combine-stack-adj.c (single_set_for_csa): Likewise.
10651 * combine.c (find_single_use_1): Likewise.
10652 (set_nonzero_bits_and_sign_copies): Likewise.
10653 (get_combine_src_dest): Likewise.
10654 (is_parallel_of_n_reg_sets): Likewise.
10655 (try_combine): Likewise.
10656 (record_dead_and_set_regs_1): Likewise.
10657 (reg_dead_at_p_1): Likewise.
10658 (reg_dead_at_p): Likewise.
10659 * dce.c (deletable_insn_p): Likewise.
10660 (mark_nonreg_stores_1): Likewise.
10661 (mark_nonreg_stores_2): Likewise.
10662 * df-scan.c (df_find_hard_reg_defs): Likewise.
10663 (df_uses_record): Likewise.
10664 (df_get_call_refs): Likewise.
10665 * dwarf2out.c (mem_loc_descriptor): Likewise.
10666 * haifa-sched.c (haifa_classify_rtx): Likewise.
10667 * ira-build.c (create_insn_allocnos): Likewise.
10668 * ira-costs.c (scan_one_insn): Likewise.
10669 * ira.c (equiv_init_movable_p): Likewise.
10670 (rtx_moveable_p): Likewise.
10671 (interesting_dest_for_shprep): Likewise.
10672 * jump.c (mark_jump_label_1): Likewise.
10673 * postreload-gcse.c (record_opr_changes): Likewise.
10674 * postreload.c (reload_cse_simplify): Likewise.
10675 (struct reg_use): Add source expr.
10676 (reload_combine): Check for clobber high.
10677 (reload_combine_note_use): Likewise.
10678 (reload_cse_move2add): Likewise.
10679 (move2add_note_store): Likewise.
10680 * print-rtl.c (print_pattern): Likewise.
10681 * recog.c (decode_asm_operands): Likewise.
10682 (store_data_bypass_p): Likewise.
10683 (if_test_bypass_p): Likewise.
10684 * regcprop.c (kill_clobbered_value): Likewise.
10685 (kill_set_value): Likewise.
10686 * reginfo.c (reg_scan_mark_refs): Likewise.
10687 * reload1.c (maybe_fix_stack_asms): Likewise.
10688 (eliminate_regs_1): Likewise.
10689 (elimination_effects): Likewise.
10690 (mark_not_eliminable): Likewise.
10691 (scan_paradoxical_subregs): Likewise.
10692 (forget_old_reloads_1): Likewise.
10693 * reorg.c (find_end_label): Likewise.
10694 (try_merge_delay_insns): Likewise.
10695 (redundant_insn): Likewise.
10696 (own_thread_p): Likewise.
10697 (fill_simple_delay_slots): Likewise.
10698 (fill_slots_from_thread): Likewise.
10699 (dbr_schedule): Likewise.
10700 * resource.c (update_live_status): Likewise.
10701 (mark_referenced_resources): Likewise.
10702 (mark_set_resources): Likewise.
10703 * rtl.c (copy_rtx): Likewise.
10704 * rtlanal.c (reg_referenced_p): Likewise.
10705 (single_set_2): Likewise.
10706 (noop_move_p): Likewise.
10707 (note_stores): Likewise.
10708 * sched-deps.c (sched_analyze_reg): Likewise.
10709 (sched_analyze_insn): Likewise.
10711 2018-08-06 Alan Hayward <alan.hayward@arm.com>
10713 * cse.c (invalidate_reg): New function extracted from...
10714 (invalidate): ...here.
10715 (canonicalize_insn): Check for clobber high.
10716 (invalidate_from_clobbers): invalidate clobber highs.
10717 (invalidate_from_sets_and_clobbers): Likewise.
10718 (count_reg_usage): Check for clobber high.
10719 (insn_live_p): Likewise.
10720 * cselib.c (cselib_expand_value_rtx_1):Likewise.
10721 (cselib_invalidate_regno): Check for clobber in setter.
10722 (cselib_invalidate_rtx): Pass through setter.
10723 (cselib_invalidate_rtx_note_stores):
10724 (cselib_process_insn): Check for clobber high.
10725 * cselib.h (cselib_invalidate_rtx): Add operand.
10727 2018-08-06 Alan Hayward <alan.hayward@arm.com>
10729 * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
10730 (mark_not_eliminable): Likewise.
10731 * lra-int.h (struct lra_insn_reg): Add clobber high marker.
10732 * lra-lives.c (process_bb_lives): Check for clobber high.
10733 * lra.c (new_insn_reg): Remember clobber highs.
10734 (collect_non_operand_hard_regs): Check for clobber high.
10735 (lra_set_insn_recog_data): Likewise.
10736 (add_regs_to_insn_regno_info): Likewise.
10737 (lra_update_insn_regno_info): Likewise.
10739 2018-08-06 Alan Hayward <alan.hayward@arm.com>
10741 * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
10742 * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
10744 2018-08-06 Alan Hayward <alan.hayward@arm.com>
10746 * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
10747 (copy_insn_1): Likewise.
10748 (gen_hard_reg_clobber_high): New gen function.
10749 * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
10750 * genemit.c (gen_exp): Likewise.
10751 (gen_emit_seq): Pass through info.
10752 (gen_insn): Check for CLOBBER_HIGH.
10753 (gen_expand): Pass through info.
10754 (gen_split): Likewise.
10755 (output_add_clobbers): Likewise.
10756 * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
10757 (remove_clobbers): Likewise.
10758 * rtl.h (gen_hard_reg_clobber_high): New declaration.
10760 2018-08-06 Alan Hayward <alan.hayward@arm.com>
10762 * doc/rtl.texi (clobber_high): Add.
10763 (parallel): Add in clobber high
10764 * rtl.c (rtl_check_failed_code3): Add function.
10765 * rtl.def (CLOBBER_HIGH): Add expression.
10766 * rtl.h (RTL_CHECKC3): Add macro.
10767 (rtl_check_failed_code3): Add declaration.
10768 (XC3EXP): Add macro.
10770 2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
10773 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
10774 cfun->machine->max_used_stack_alignment if needed.
10776 2018-08-04 Martin Sebor <msebor@redhat.com>
10778 PR tree-optimization/86571
10779 * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
10782 2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
10785 * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10788 2018-08-03 Jeff Law <law@redhat.com>
10791 * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10792 Define to speculation_safe_value_not_needed.
10794 2018-08-03 David Malcolm <dmalcolm@redhat.com>
10796 * doc/gcov.texi (-x): Remove duplicate "to".
10797 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
10798 (-Wif-not-aligned): Remove duplicate "is".
10799 (-flto): Remove duplicate "the".
10800 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
10801 duplicate "v5.00.b".
10802 (MSP430 Options): Remove duplicate "and" from the description
10803 of "-mgprel-sec=regexp".
10804 (x86 Options): Remove duplicate copies of "vmldLog102" and
10805 vmlsLog104 from description of "-mveclibabi=type".
10807 2018-08-03 Richard Sandiford <richard.sandiford@arm.com>
10809 * internal-fn.h (first_commutative_argument): Declare.
10810 * internal-fn.c (first_commutative_argument): New function.
10811 * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
10812 restrictions for pattern statements. Use first_commutative_argument
10813 to look for commutative operands in calls to internal functions.
10815 2018-08-03 Aldy Hernandez <aldyh@redhat.com>
10817 * Makefile.in (wide-int-range.o): New.
10818 * tree-vrp.c: Move all the wide_int_* functions to...
10819 * wide-int-range.cc: ...here.
10820 * tree-vrp.h: Move all the wide_int_* prototypes to...
10821 * wide-int-range.h: ...here.
10823 2018-08-03 Tom de Vries <tdevries@suse.de>
10825 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
10827 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
10828 * except.c (output_function_exception_table): Do early exit if
10829 targetm_common.except_unwind_info (&global_options) == UI_NONE.
10831 2018-08-03 Martin Liska <mliska@suse.cz>
10833 * predict.c (dump_prediction): Change to 2 digits
10836 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
10838 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
10840 (falkor_am_1_gtov_gtov): ... a new insn reservation.
10842 2018-07-19 Ilya Leoshkevich <iii@linux.ibm.com>
10844 * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
10845 * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
10846 * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
10847 * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
10848 * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
10850 2018-08-02 David Malcolm <dmalcolm@redhat.com>
10852 * diagnostic-show-locus.c (diagnostic_show_locus): Use
10853 pp_take_prefix when saving the existing prefix.
10854 * diagnostic.c (diagnostic_append_note): Likewise.
10855 * langhooks.c (lhd_print_error_function): Likewise.
10856 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
10857 param's type. Free the existing prefix.
10858 (pp_take_prefix): New function.
10859 (pretty_printer::pretty_printer): Drop the prefix parameter.
10860 Rename the length parameter to match the comment.
10861 (pretty_printer::~pretty_printer): Free the prefix.
10862 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
10864 (struct pretty_printer): Drop the "const" from "prefix" field's
10865 type and clarify memory management.
10866 (pp_set_prefix): Drop the "const" from the 2nd param.
10867 (pp_take_prefix): New decl.
10869 2018-08-02 Aaron Sawdey <acsawdey@linux.ibm.com>
10871 * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
10872 for word_mode_ok here instead of passing as argument.
10873 (expand_block_compare): Change select_block_compare_mode() call.
10874 (expand_strncmp_gpr_sequence): New function.
10875 (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
10877 2018-08-02 Jeff Law <law@redhat.com>
10880 * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10881 Define to speculation_safe_value_not_needed.
10884 * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10885 Define to speculation_safe_value_not_needed.
10887 2018-08-02 Tom de Vries <tdevries@suse.de>
10890 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
10891 function. Return UI_TARGET unconditionally.
10892 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
10893 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
10895 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
10897 * genemit.c (print_overload_test): Fix typo.
10899 2018-08-02 Richard Biener <rguenther@suse.de>
10901 PR tree-optimization/86816
10902 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
10903 which checks for value availability before querying it.
10904 (gvn_uses_equal): Use it.
10905 (same_succ_hash): Likewise.
10906 (gimple_equal_p): Likewise.
10908 2018-08-02 Nick Clifton <nickc@redhat.com>
10911 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10912 Define to speculation_safe_value_not_needed.
10915 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10916 Define to speculation_safe_value_not_needed.
10919 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10920 Define to speculation_safe_value_not_needed.
10923 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10924 Define to speculation_safe_value_not_needed.
10927 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10928 Define to speculation_safe_value_not_needed.
10931 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10932 Define to speculation_safe_value_not_needed.
10935 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10936 Define to speculation_safe_value_not_needed.
10939 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10940 Define to speculation_safe_value_not_needed.
10943 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
10944 speculation_safe_value_not_needed.
10947 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
10948 to speculation_safe_value_not_needed.
10950 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
10952 * doc/md.texi: Expand the documentation of instruction names
10953 to mention port-local uses. Document '@' in pattern names.
10954 * read-md.h (overloaded_instance, overloaded_name): New structs.
10955 (mapping): Declare.
10956 (md_reader::handle_overloaded_name): New member function.
10957 (md_reader::get_overloads): Likewise.
10958 (md_reader::m_first_overload): New member variable.
10959 (md_reader::m_next_overload_ptr): Likewise.
10960 (md_reader::m_overloads_htab): Likewise.
10961 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
10962 m_next_overload_ptr and m_overloads_htab.
10963 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
10964 (get_mode_token, get_code_token, get_int_token): New functions.
10965 (map_attr_string): Add an optional argument that passes back
10966 the associated iterator.
10967 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
10968 (md_reader::handle_overloaded_name, add_overload_instance): New
10970 (apply_iterators): Handle '@' names. Report an error if '@'
10971 is used without iterators.
10972 (initialize_iterators): Initialize the new iterator_group fields.
10973 * genopinit.c (handle_overloaded_code_for)
10974 (handle_overloaded_gen): New functions.
10975 (main): Use them to print declarations of maybe_code_for_* and
10976 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
10977 * genemit.c (print_overload_arguments, print_overload_test)
10978 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
10979 (main): Use it to print definitions of maybe_code_for_* and
10980 maybe_gen_* functions.
10981 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
10982 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
10983 instead of explicit mode checks.
10984 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
10985 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
10986 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
10987 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
10988 (aarch64_expand_compare_and_swap): Likewise
10989 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
10990 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
10991 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
10992 (aarch64_constant_pool_reload_icode): Delete.
10993 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
10994 instead of aarch64_constant_pool_reload_icode. Use
10995 code_for_aarch64_reload_mov instead of explicit mode checks.
10996 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
10997 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
10998 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
10999 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
11000 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
11001 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
11002 (aarch64_atomic_load_op_code): Delete.
11003 (aarch64_emit_atomic_load_op): Likewise.
11004 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
11005 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
11006 instead of aarch64_emit_atomic_load_op.
11007 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
11008 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
11009 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
11010 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
11011 character before the pattern name.
11012 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
11013 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
11014 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
11015 (aarch64_frecps<mode>): Likewise.
11016 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
11017 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
11018 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
11019 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
11020 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
11022 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
11024 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
11025 Allow HFmode constants if TARGET_FP_F16INST.
11027 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
11030 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
11031 No longer check last store for clobber of address register.
11033 2018-08-02 Martin Liska <mliska@suse.cz>
11035 PR gcov-profile/86817
11036 * gcov.c (process_all_functions): New function.
11038 (process_file): Move functions processing to
11039 process_all_functions.
11041 2018-08-02 David Malcolm <dmalcolm@redhat.com>
11043 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
11044 "const" to the "gimple *" and "rtx_insn *" parameters.
11045 * dumpfile.h (dump_user_location_t::dump_user_location_t):
11047 (dump_location_t::dump_location_t): Likewise.
11049 2018-08-01 Martin Sebor <msebor@redhat.com>
11051 PR tree-optimization/86650
11052 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
11053 rather than a "gcall *". Directly pass the data of interest
11054 to percent_K_format, rather than building a temporary CALL_EXPR
11056 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
11057 (gimple_fold_builtin_strncat): Adjust.
11058 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
11059 gcall* argument with gimple*.
11060 * gimple-ssa-warn-restrict.c (check_call): Same.
11061 (wrestrict_dom_walker::before_dom_children): Same.
11062 (builtin_access::builtin_access): Same.
11063 (check_bounds_or_overlap): Same
11064 (maybe_diag_overlap): Same.
11065 (maybe_diag_offset_bounds): Same.
11066 * tree-diagnostic.c (default_tree_printer): Move usage of
11067 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
11069 * tree-pretty-print.c (percent_K_format): Add argument.
11070 * tree-pretty-print.h: Add argument.
11071 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
11072 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
11073 (maybe_diag_stxncpy_trunc): Same.
11074 (handle_builtin_stxncpy): Same.
11075 (handle_builtin_strcat): Same.
11077 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
11079 * match.pd: Optimise pointer range checks.
11081 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
11083 PR tree-optimization/86758
11084 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
11085 to remove pattern statements.
11087 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
11089 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
11090 result of dfs_enumerate_from when constructing stmt_vec_infos,
11091 instead of additionally calling get_loop_body.
11093 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
11095 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
11097 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
11098 When creating an iv, assert that the step is not known to be zero.
11099 (vect_setup_realignment): Update call accordingly.
11100 * tree-vect-stmts.c (vectorizable_store): Likewise.
11101 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
11103 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
11105 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
11106 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
11107 (vectorizable_reduction): Likewise.
11108 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
11109 (vect_detect_hybrid_slp_stmts): Likewise.
11110 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
11112 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
11114 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
11115 (wide_int_set_zero_nonzero_bits): ...this.
11116 (zero_nonzero_bits_from_vr): Rename to...
11117 (vrp_set_zero_nonzero_bits): ...this.
11118 (extract_range_from_multiplicative_op_1): Abstract wide int
11120 (wide_int_range_multiplicative_op): ...here.
11121 (extract_range_from_binary_expr_1): Extract wide int binary
11122 operations into their own functions.
11123 (wide_int_range_lshift): New.
11124 (wide_int_range_can_optimize_bit_op): New.
11125 (wide_int_range_shift_undefined_p): New.
11126 (wide_int_range_bit_xor): New.
11127 (wide_int_range_bit_ior): New.
11128 (wide_int_range_bit_and): New.
11129 (wide_int_range_trunc_mod): New.
11130 (extract_range_into_wide_ints): New.
11131 (vrp_shift_undefined_p): New.
11132 (extract_range_from_multiplicative_op): New.
11133 (vrp_can_optimize_bit_op): New.
11134 * tree-vrp.h (value_range::dump): New.
11135 (wide_int_range_multiplicative_op): New.
11136 (wide_int_range_lshift):New.
11137 (wide_int_range_shift_undefined_p): New.
11138 (wide_int_range_bit_xor): New.
11139 (wide_int_range_bit_ior): New.
11140 (wide_int_range_bit_and): New.
11141 (wide_int_range_trunc_mod): New.
11142 (zero_nonzero_bits_from_bounds): Rename to...
11143 (wide_int_set_zero_nonzero_bits): ...this.
11144 (zero_nonzero_bits_from_vr): Rename to...
11145 (vrp_set_zero_nonzero_bits): ...this.
11146 (range_easy_mask_min_max): Rename to...
11147 (wide_int_range_can_optimize_bit_op): this.
11148 * vr-values.c (simplify_bit_ops_using_ranges): Rename
11149 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
11151 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
11153 * tree-vectorizer.h (vect_orig_stmt): New function.
11154 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
11155 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
11156 (vect_create_epilog_for_reduction): Likewise.
11157 (vectorizable_live_operation): Likewise.
11158 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
11159 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
11160 * tree-vect-stmts.c (vectorizable_call): Likewise.
11161 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
11163 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
11165 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
11167 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
11168 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
11169 (vect_transform_loop): Likewise.
11170 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
11172 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
11174 * tree-vectorizer.h (vect_schedule_slp): Return void.
11175 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
11176 (vect_schedule_slp): Likewise.
11178 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
11180 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
11182 (vect_transform_loop): Update calls accordingly. Schedule SLP
11183 instances before the main loop, if any exist.
11185 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
11187 PR tree-optimization/86749
11188 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
11189 If the lhs is used in a COND_EXPR, check that it is being used
11190 as the "then" or "else" value.
11192 2018-08-01 Tom de Vries <tdevries@suse.de>
11195 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
11196 speculation_safe_value_not_needed.
11198 2018-08-01 Richard Biener <rguenther@suse.de>
11200 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
11201 as base and offset.
11203 2018-08-01 Martin Liska <mliska@suse.cz>
11205 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
11206 format how successful transformation is dumped.
11207 (gimple_mod_pow2_value_transform): Likewise.
11208 (gimple_mod_subtract_transform): Likewise.
11209 (gimple_stringops_transform): Likewise.
11211 2018-08-01 Martin Liska <mliska@suse.cz>
11213 PR value-prof/35543
11214 * value-prof.c (interesting_stringop_to_profile_p):
11215 Simplify the code and add BUILT_IN_MEMMOVE.
11216 (gimple_stringops_transform): Likewise.
11218 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
11220 * config/aarch64/aarch64-simd.md
11221 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
11222 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
11223 use GPI iterator instead of SI mode.
11225 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
11227 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
11228 rs6000_speculation_barrier.
11229 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
11230 new barrier pattern name.
11232 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
11234 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
11235 (speculation_barrier): New insn.
11237 2018-08-01 Richard Biener <rguenther@suse.de>
11240 * graphite.h: Include isl/id.h and isl/space.h to allow build
11243 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
11246 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
11247 mode for COFF targets.
11248 * defaults.h (TARGET_COFF): Define.
11249 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
11250 TARGET_COFF): Define.
11251 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
11252 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
11253 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
11255 2018-07-31 Alexandre Oliva <oliva@adacore.com>
11257 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
11258 * gimple-streamer-out.c (output_bb): Save it.
11259 * lto-streamer-in.c (input_struct_function_base): Restore
11260 instance discriminator if available. Create map on demand.
11261 * lto-streamer-out.c (output_struct_function_base): Save it if
11263 * final.c (decl_to_instance_map): Document LTO strategy.
11265 2018-07-31 Alexandre Oliva <oliva@adacore.com>
11266 Olivier Hainque <hainque@adacore.com>
11268 * debug.h (decl_to_instance_map_t): New type.
11269 (decl_to_instance_map): Declare.
11270 (maybe_create_decl_to_instance_map): New inline function.
11271 * final.c (bb_discriminator, last_bb_discriminator): New statics,
11272 to track basic block discriminators.
11273 (final_start_function_1): Initialize them.
11274 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
11276 (decl_to_instance_map): New variable.
11277 (map_decl_to_instance, maybe_set_discriminator): New functions.
11278 (notice_source_line): Set discriminator.
11280 2018-07-31 Ian Lance Taylor <iant@golang.org>
11282 * targhooks.c (default_have_speculation_safe_value): Add
11285 2018-07-31 David Malcolm <dmalcolm@redhat.com>
11287 * dump-context.h: Include "pretty-print.h".
11288 (dump_context::refresh_dumps_are_enabled): New decl.
11289 (dump_context::emit_item): New decl.
11290 (class dump_context): Add fields "m_test_pp" and
11292 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
11293 (temp_dump_context::get_dumped_text): New decl.
11294 (class temp_dump_context): Add field "m_pp".
11295 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
11296 (dump_context::refresh_dumps_are_enabled): ...and add a test for
11298 (set_dump_file): Update for above change.
11299 (set_alt_dump_file): Likewise.
11300 (dump_loc): New overload, taking a pretty_printer *.
11301 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
11302 to any test pretty-printer.
11303 (make_item_for_dump_gimple_stmt): New function, adapted from
11304 optinfo::add_gimple_stmt.
11305 (dump_context::dump_gimple_stmt): Call it, and use the result,
11306 eliminating the direct usage of dump_file and alt_dump_file in
11307 favor of indirectly using them via emit_item.
11308 (make_item_for_dump_gimple_expr): New function, adapted from
11309 optinfo::add_gimple_expr.
11310 (dump_context::dump_gimple_expr): Call it, and use the result,
11311 eliminating the direct usage of dump_file and alt_dump_file in
11312 favor of indirectly using them via emit_item.
11313 (make_item_for_dump_generic_expr): New function, adapted from
11315 (dump_context::dump_generic_expr): Call it, and use the result,
11316 eliminating the direct usage of dump_file and alt_dump_file in
11317 favor of indirectly using them via emit_item.
11318 (make_item_for_dump_printf_va): New function, adapted from
11319 optinfo::add_printf_va.
11320 (make_item_for_dump_printf): New function.
11321 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
11322 and use the result, eliminating the direct usage of dump_file and
11323 alt_dump_file in favor of indirectly using them via emit_item.
11324 (make_item_for_dump_dec): New function.
11325 (dump_context::dump_dec): Call it, and use the result,
11326 eliminating the direct usage of dump_file and alt_dump_file in
11327 favor of indirectly using them via emit_item.
11328 (make_item_for_dump_symtab_node): New function, adapted from
11329 optinfo::add_symtab_node.
11330 (dump_context::dump_symtab_node): Call it, and use the result,
11331 eliminating the direct usage of dump_file and alt_dump_file in
11332 favor of indirectly using them via emit_item.
11333 (dump_context::begin_scope): Reimplement, avoiding direct usage
11334 of dump_file and alt_dump_file in favor of indirectly using them
11336 (dump_context::emit_item): New member function.
11337 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
11338 Set up test pretty-printer on the underlying context. Call
11339 refresh_dumps_are_enabled.
11340 (temp_dump_context::~temp_dump_context): Call
11341 refresh_dumps_are_enabled.
11342 (temp_dump_context::get_dumped_text): New member function.
11343 (selftest::verify_dumped_text): New function.
11344 (ASSERT_DUMPED_TEXT_EQ): New macro.
11345 (selftest::test_capture_of_dump_calls): Run all tests twice, with
11346 and then without optinfo enabled. Add uses of
11347 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
11348 * dumpfile.h: Update comment for the dump_* API.
11349 * optinfo-emit-json.cc
11350 (selftest::test_building_json_from_dump_calls): Update for new
11351 param for temp_dump_context ctor.
11352 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
11353 and "m_owned" field.
11354 (optinfo_item::~optinfo_item): Likewise.
11355 (optinfo::add_item): New member function.
11356 (optinfo::emit): Update comment.
11357 (optinfo::add_string): Delete.
11358 (optinfo::add_printf): Delete.
11359 (optinfo::add_printf_va): Delete.
11360 (optinfo::add_gimple_stmt): Delete.
11361 (optinfo::add_gimple_expr): Delete.
11362 (optinfo::add_tree): Delete.
11363 (optinfo::add_symtab_node): Delete.
11364 (optinfo::add_dec): Delete.
11365 * optinfo.h (class dump_context): New forward decl.
11366 (optinfo::add_item): New decl.
11367 (optinfo::add_string): Delete.
11368 (optinfo::add_printf): Delete.
11369 (optinfo::add_printf_va): Delete.
11370 (optinfo::add_gimple_stmt): Delete.
11371 (optinfo::add_gimple_expr): Delete.
11372 (optinfo::add_tree): Delete.
11373 (optinfo::add_symtab_node): Delete.
11374 (optinfo::add_dec): Delete.
11375 (optinfo::add_poly_int): Delete.
11376 (optinfo_item::optinfo_item): Remove "owned" param.
11377 (class optinfo_item): Remove field "m_owned".
11379 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
11381 PR middle-end/86705
11382 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
11383 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
11384 requested variable alignment.
11385 (expand_one_ssa_partition): Likewise.
11386 (expand_one_var): Likewise.
11388 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
11390 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
11391 to speculation_safe_value_not_needed.
11393 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
11395 * targhooks.h (speculation_safe_value_not_needed): New prototype.
11396 * targhooks.c (speculation_safe_value_not_needed): New function.
11397 * target.def (have_speculation_safe_value): Update documentation.
11398 * doc/tm.texi: Regenerated.
11400 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
11402 * config/aarch64/iterators.md (ALLI_TI): New iterator.
11403 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
11405 (despeculate_copy<ALLI:mode>_insn): New insn.
11406 (despeculate_copyti_insn): New insn.
11407 (despeculate_simple<ALLI:mode>): New insn
11408 (despeculate_simpleti): New insn.
11409 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
11411 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
11412 aarch64_speculation_safe_value.
11413 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
11415 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
11417 * config/aarch64/aarch64-speculation.cc: New file.
11418 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
11419 before pass_reorder_blocks.
11420 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
11422 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
11423 X14 and X15 when tracking speculation.
11424 * config/aarch64/aarch64.md (register name constants): Add
11425 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
11426 (unspec): Add UNSPEC_SPECULATION_TRACKER.
11427 (speculation_barrier): New insn attribute.
11428 (cmp<mode>): Allow SP in comparisons.
11429 (speculation_tracker): New insn.
11430 (speculation_barrier): Add speculation_barrier attribute.
11431 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
11432 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
11433 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
11435 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
11437 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
11438 aarch64_track_speculation is true.
11439 (tb<optab><mode>1): Likewise.
11440 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
11441 generate CB[N]Z when tracking speculation.
11442 (aarch64_split_compare_and_swap): Likewise.
11443 (aarch64_split_atomic_op): Likewise.
11445 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
11447 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
11449 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
11451 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
11452 (speculation_barrier): New insn.
11454 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
11456 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
11457 * config/arm/arm.md (speculation_barrier): New expand.
11458 (speculation_barrier_insn): New pattern.
11460 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
11462 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
11463 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
11464 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
11465 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
11467 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
11468 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
11469 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
11470 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
11471 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
11472 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
11473 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
11474 * builtins.c (expand_speculation_safe_value): New function.
11475 (expand_builtin): Call it.
11476 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
11477 * doc/extend.texi: Document __builtin_speculation_safe_value.
11478 * doc/md.texi: Document "speculation_barrier" pattern.
11479 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
11480 TARGET_HAVE_SPECULATION_SAFE_VALUE.
11481 * doc/tm.texi: Regenerated.
11482 * target.def (have_speculation_safe_value, speculation_safe_value): New
11484 * targhooks.c (default_have_speculation_safe_value): New function.
11485 (default_speculation_safe_value): New function.
11486 * targhooks.h (default_have_speculation_safe_value): Add prototype.
11487 (default_speculation_safe_value): Add prototype.
11489 2018-07-31 David Malcolm <dmalcolm@redhat.com>
11491 * dump-context.h (dump_context::dump_loc): New decl.
11492 * dumpfile.c (dump_context::dump_loc): New member function.
11493 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
11494 and dump_gimple_stmt.
11495 (dump_context::dump_gimple_expr_loc): Likewise, using
11497 (dump_context::dump_generic_expr_loc): Likewise, using
11499 (dump_context::dump_printf_loc_va): Likewise, using
11501 (dump_context::begin_scope): Explicitly using the global function
11502 "dump_loc", rather than the member function.
11504 2018-07-31 Martin Sebor <msebor@redhat.com>
11506 PR tree-optimization/86741
11507 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
11509 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
11511 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
11512 depend on whether prefetch instructions will be emitted or not.
11513 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
11514 will be emitted or not.
11515 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
11516 (TARGET_SETMEM_PFD): New macros.
11518 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11520 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
11521 (NULL_STMT_VEC_INFO): Delete.
11522 (stmt_vec_info::operator*): Likewise.
11523 (stmt_vec_info::operator gimple *): Likewise.
11524 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
11525 of NULL_STMT_VEC_INFO.
11526 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
11527 (vect_reassociating_reduction_p): Likewise.
11528 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
11529 (vectorizable_store): Likewise.
11530 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
11531 (vec_info::free_stmt_vec_infos): Likewise.
11533 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11535 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
11536 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
11538 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11540 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
11541 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
11542 (vec_info::free_stmt_vec_info): New private member functions.
11543 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
11544 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
11545 * tree-parloops.c (gather_scalar_reductions): Remove calls to
11546 set_stmt_vec_info_vec and free_stmt_vec_infos.
11547 * tree-vect-loop.c (_loop_vec_info): Remove call to
11548 set_stmt_vec_info_vec.
11549 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
11550 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
11551 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
11552 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
11553 (vec_info::free_stmt_vec_info): ...these new functions. Remove
11554 assignments in {vec_info::,}new_stmt_vec_info that are redundant
11555 with the clearing in the xcalloc.
11556 (stmt_vec_info_vec): Delete.
11557 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
11558 (vectorize_loops): Likewise.
11559 (vec_info::~vec_info): Remove argument from call to
11560 free_stmt_vec_infos.
11561 (vec_info::add_stmt): Remove vinfo argument from call to
11564 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11566 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
11567 rather than a gimple stmt.
11568 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
11569 information for pattern statements when passed the original
11570 statement; instead wait to be passed the pattern statement itself.
11571 Don't call set_vinfo_for_stmt here.
11572 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
11573 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
11574 stmt_vec_infos here.
11575 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
11576 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
11577 stmt_vec_infos entry.
11579 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11581 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
11582 * tree-vectorizer.c (vec_info::replace_stmt): New function.
11583 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
11584 * tree-vect-stmts.c (vectorizable_call): Likewise.
11585 (vectorizable_simd_clone_call): Likewise.
11587 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11589 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
11590 * tree-vectorizer.c (vec_info::remove_stmt): New function.
11591 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
11592 * tree-vect-loop.c (vect_transform_loop): Likewise.
11593 * tree-vect-slp.c (vect_schedule_slp): Likewise.
11594 * tree-vect-stmts.c (vect_remove_stores): Likewise.
11596 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11598 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
11599 (vect_dr_stmt): Delete.
11600 * tree-vectorizer.c (vec_info::lookup_dr): New function.
11601 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
11603 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
11604 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
11605 (vect_verify_datarefs_alignment, vect_peeling_supportable)
11606 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
11607 (vect_analyze_data_refs): Likewise.
11608 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
11610 (vect_find_same_alignment_drs): Likewise.
11611 (vect_slp_analyze_node_dependences): Update calls accordingly.
11612 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
11613 instead of DR_VECT_AUX.
11614 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
11615 of a vector data references. Use vec_info::lookup_dr instead of
11617 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
11618 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
11619 instead of DR_VECT_AUX.
11621 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11623 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
11625 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
11627 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
11628 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
11629 (vect_gen_prolog_loop_niters): Likewise.
11631 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11633 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
11634 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
11635 (vect_known_alignment_in_bytes, vect_dr_behavior)
11636 (vect_get_scalar_dr_size): Take references as dr_vec_infos
11637 instead of data_references. Update calls to other routines for
11638 which the same change has been made.
11639 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
11640 dr_vec_infos instead of stmt_vec_infos.
11641 (vect_analyze_data_ref_dependence): Update call accordingly.
11642 (vect_slp_analyze_data_ref_dependence)
11643 (vect_record_base_alignments): Use DR_VECT_AUX.
11644 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
11645 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
11646 (vector_alignment_reachable_p, vect_get_data_access_cost)
11647 (vect_peeling_supportable, vect_analyze_group_access_1)
11648 (vect_analyze_group_access, vect_analyze_data_ref_access)
11649 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
11650 (vect_compile_time_alias, vect_small_gap_p)
11651 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
11652 (vect_supportable_dr_alignment): Take references as dr_vec_infos
11653 instead of data_references. Update calls to other routines for
11654 which the same change has been made.
11655 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
11656 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
11657 (vect_slp_analyze_and_verify_node_alignment)
11658 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
11659 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
11660 (vect_setup_realignment): Use dr_vec_infos. Update calls after
11662 (_vect_peel_info::dr): Replace with...
11663 (_vect_peel_info::dr_info): ...this new field.
11664 (vect_peeling_hash_get_most_frequent)
11665 (vect_peeling_hash_choose_best_peeling): Update accordingly.
11666 (vect_peeling_hash_get_lowest_cost):
11667 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
11668 routines for which the same change has been made.
11669 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
11671 * tree-vect-loop-manip.c (get_misalign_in_elems)
11672 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
11674 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
11675 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
11676 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
11677 (get_group_load_store_type, get_negative_load_store_type)
11678 (vect_get_data_ptr_increment, vectorizable_store)
11679 (vectorizable_load): Likewise.
11680 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
11681 Update calls to other routines for which the same change has been made.
11683 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11685 * tree-vectorizer.h (vec_info::move_dr): New member function.
11686 (dataref_aux): Rename to...
11687 (dr_vec_info): ...this and add "dr" and "stmt" fields.
11688 (_stmt_vec_info::dr_aux): Update accordingly.
11689 (_stmt_vec_info::data_ref_info): Delete.
11690 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
11691 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
11692 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
11693 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
11695 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
11696 (STMT_VINFO_DR_INFO): New macro.
11697 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
11698 (set_dr_misalignment): Update after rename of dataref_aux.
11699 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
11700 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
11701 initialization of STMT_VINFO_DATA_REF.
11702 * tree-vectorizer.c (vec_info::move_dr): New function.
11703 * tree-vect-patterns.c (vect_recog_bool_pattern)
11704 (vect_recog_mask_conversion_pattern)
11705 (vect_recog_gather_scatter_pattern): Use it.
11706 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
11707 the "dr" and "stmt" fields of dr_vec_info instead of
11708 STMT_VINFO_DATA_REF.
11710 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11712 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
11713 (is_pattern_stmt_p): Use it.
11714 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
11715 on pattern statements.
11717 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11719 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
11720 original stmt as a stmt_vec_info rather than a gimple stmt.
11721 (vect_pattern_recog_1): Take the statement directly as a
11722 stmt_vec_info, rather than via a gimple_stmt_iterator.
11723 Update call to vect_mark_pattern_stmts.
11724 (vect_pattern_recog): Update calls accordingly.
11726 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11728 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
11729 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
11730 a vect_def_type for the first argument.
11731 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
11732 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
11733 operand if it isn't defined by a vectorized statement.
11734 (vect_build_gather_load_calls): Remove the mask_dt argument and
11735 update calls to vect_get_vec_def_for_stmt_copy.
11736 (vectorizable_bswap): Likewise the dt argument.
11737 (vectorizable_call): Update calls to vectorizable_bswap and
11738 vect_get_vec_def_for_stmt_copy.
11739 (vectorizable_simd_clone_call, vectorizable_assignment)
11740 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
11741 (vectorizable_comparison): Update calls to
11742 vect_get_vec_def_for_stmt_copy.
11743 (vectorizable_store): Likewise. Remove now-unnecessary calls to
11744 vect_is_simple_use.
11745 (vect_get_loop_based_defs): Remove dt argument and update call
11746 to vect_get_vec_def_for_stmt_copy.
11747 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
11748 and vect_get_vec_def_for_stmt_copy.
11749 (vectorizable_load): Update calls to vect_build_gather_load_calls
11750 and vect_get_vec_def_for_stmt_copy.
11751 * tree-vect-loop.c (vect_create_epilog_for_reduction)
11752 (vectorizable_reduction, vectorizable_live_operation): Update calls
11753 to vect_get_vec_def_for_stmt_copy.
11755 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11757 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
11758 and gimple stmt arguments with a stmt_vec_info.
11759 (vect_record_base_alignments): Update calls accordingly.
11760 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
11761 and gimple stmt arguments with a stmt_vec_info.
11762 (vect_build_slp_tree_1): Remove vinfo argument and update call
11763 to vect_record_max_nunits.
11764 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
11765 and vect_record_max_nunits.
11767 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11769 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
11770 file and take a stmt_vec_info instead of a gimple stmt.
11771 (supportable_widening_operation, vect_finish_replace_stmt)
11772 (vect_finish_stmt_generation, vect_get_store_rhs)
11773 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
11774 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
11775 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
11776 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
11777 (vect_create_data_ref_ptr, bump_vector_ptr)
11778 (vect_permute_store_chain, vect_setup_realignment)
11779 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
11780 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
11781 (vectorizable_reduction, vectorizable_induction)
11782 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
11783 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
11784 than gimple stmts as arguments.
11785 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
11786 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
11787 (can_group_stmts_p, vect_check_gather_scatter)
11788 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
11789 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
11790 (vect_permute_load_chain, vect_shift_permute_load_chain)
11791 (vect_transform_grouped_load)
11792 (vect_record_grouped_load_vectors): Likewise.
11793 * tree-vect-loop.c (vect_fixup_reduc_chain)
11794 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
11795 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
11796 (vectorizable_reduction, vectorizable_induction)
11797 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
11798 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
11799 (vect_get_load_store_mask): Likewise.
11800 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
11801 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
11802 * tree-vect-stmts.c (vect_mark_relevant)
11803 (is_simple_and_all_uses_invariant)
11804 (exist_non_indexing_operands_for_use_p, process_use)
11805 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
11806 (vect_get_vec_def_for_operand, vect_get_vec_defs)
11807 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
11808 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
11809 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
11810 (get_negative_load_store_type, get_load_store_type)
11811 (vect_check_load_store_mask, vect_check_store_rhs)
11812 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
11813 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
11814 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
11815 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
11816 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
11817 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
11818 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
11819 (supportable_widening_operation): Likewise.
11821 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11823 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
11824 a stmt_vec_info instead of a gcall.
11825 (vect_check_gather_scatter): Update call accordingly.
11826 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
11828 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
11829 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
11830 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
11831 instead of a gimple stmt.
11832 (vect_transform_loop): Update calls accordingly.
11833 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
11834 stmt_vec_infos instead of gimple stmts.
11835 (vect_analyze_slp_instance): Update use accordingly.
11836 * tree-vect-stmts.c (read_vector_array, write_vector_array)
11837 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
11838 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
11839 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
11840 (vect_gen_widened_results_half, vect_get_loop_based_defs)
11841 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
11842 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
11843 down to subroutines.
11845 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11847 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
11848 of the worklist from a vector of gimple stmts to a vector of
11850 * tree-vect-stmts.c (vect_mark_relevant, process_use)
11851 (vect_mark_stmts_to_be_vectorized): Likewise
11853 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11855 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
11856 statement before passing it to vect_analyze_stmt.
11857 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
11858 the chain of phi vector definitions. Track the exit phi via its
11860 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
11861 STMT_VINFO_REDUC_DEF.
11862 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
11863 stmt_vec_infos to handle the statement chains.
11864 (vect_get_slp_defs): Record the first statement in the node
11865 using a stmt_vec_info.
11866 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
11867 statements here and pass their stmt_vec_info down to subroutines.
11868 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
11869 down to vect_finish_stmt_generation.
11870 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
11871 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
11872 stmt_vec_infos to subroutines.
11873 (vect_remove_stores): Use stmt_vec_infos to handle the statement
11876 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11878 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
11879 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
11880 (vect_permute_store_chain, vect_setup_realignment)
11881 (vect_permute_load_chain, vect_shift_permute_load_chain)
11882 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
11883 stmts internally, and when passing values to other vectorizer routines.
11884 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
11885 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
11886 (vect_analyze_loop_operations, get_initial_def_for_reduction)
11887 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
11888 (vectorizable_reduction, vectorizable_induction)
11889 (vectorizable_live_operation, vect_transform_loop_stmt)
11890 (vect_transform_loop): Likewise.
11891 * tree-vect-patterns.c (vect_reassociating_reduction_p)
11892 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
11893 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
11894 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
11895 (vect_slp_analyze_node_operations_1): Likewise.
11896 * tree-vect-stmts.c (vect_mark_relevant, process_use)
11897 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
11898 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
11899 (vect_finish_stmt_generation_1, get_group_load_store_type)
11900 (get_load_store_type, vect_build_gather_load_calls)
11901 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
11902 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
11903 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
11904 (vectorizable_store, vectorizable_load, vectorizable_condition)
11905 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
11906 (supportable_widening_operation): Likewise.
11907 (vect_get_vector_types_for_stmt): Likewise.
11908 * tree-vectorizer.h (vect_dr_behavior): Likewise.
11910 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11912 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
11913 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
11914 (vect_permute_store_chain, vect_permute_load_chain)
11915 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
11916 repeated stmt_vec_info lookups.
11917 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
11918 (vect_update_ivs_after_vectorizer): Likewise.
11919 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
11920 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
11921 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
11922 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
11923 (vect_bb_slp_scalar_cost): Likewise.
11924 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
11926 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11928 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
11929 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
11930 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
11931 to get gassigns and gcalls, rather than operating on generc gimple
11933 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
11934 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
11935 (vectorizable_load, vect_analyze_stmt): Likewise.
11936 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
11938 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11940 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
11941 return stmt_vec_infos rather than gimple stmts. Do not accept
11943 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
11945 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
11946 Update use of get_later_stmt.
11947 (vect_get_constant_vectors): Update call accordingly.
11948 (vect_schedule_slp_instance): Likewise
11949 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
11950 (vect_slp_analyze_instance_dependence): Likewise.
11951 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
11953 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11955 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
11956 (stmt_info_for_cost::stmt_info): ...this new field.
11957 (add_stmt_costs): Update accordingly.
11958 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
11959 (vect_get_known_peeling_cost): Likewise.
11960 (vect_estimate_min_profitable_iters): Likewise.
11961 * tree-vect-stmts.c (record_stmt_cost): Likewise.
11963 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11965 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
11966 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
11967 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
11969 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
11971 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11973 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
11974 a gimple stmt to a stmt_vec_info.
11975 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
11977 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11979 * tree-vectorizer.h (vec_info::grouped_stores): Change from
11980 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
11981 (_loop_vec_info::reduction_chains): Likewise.
11982 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
11984 * tree-vect-slp.c (vect_analyze_slp): Likewise.
11986 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11988 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
11989 a gimple stmt to a stmt_vec_info.
11990 (_stmt_vec_info::next_element): Likewise.
11991 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
11992 (vect_slp_analyze_and_verify_node_alignment)
11993 (vect_analyze_group_access_1, vect_analyze_group_access)
11994 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
11995 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
11996 (vect_supportable_dr_alignment): Update accordingly.
11997 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
11998 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
11999 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
12000 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
12001 * tree-vect-slp.c (vect_build_slp_tree_1)
12002 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
12003 (vect_split_slp_store_group, vect_analyze_slp_instance)
12004 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
12005 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
12006 (get_group_load_store_type, get_load_store_type)
12007 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
12008 (vect_transform_stmt, vect_remove_stores): Likewise.
12010 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12012 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
12013 than a gimple stmt.
12014 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
12015 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
12016 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
12017 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
12018 (vector_alignment_reachable_p, vect_get_data_access_cost)
12019 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
12020 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
12021 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
12022 (vect_analyze_group_access_1, vect_analyze_group_access)
12023 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
12024 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
12025 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
12026 result of vect_dr_stmt and use the stmt_vec_info instead of
12027 the associated gimple stmt.
12028 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
12029 (vect_gen_prolog_loop_niters): Likewise.
12030 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
12032 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12034 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
12035 to a vec<stmt_vec_info>.
12036 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
12037 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
12038 vec<stmt_vec_info>.
12039 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
12040 to a vec<stmt_vec_info>.
12041 (bst_traits::value_type, bst_traits::value_type): Likewise.
12042 (bst_traits::hash): Update accordingly.
12043 (vect_get_and_check_slp_defs): Change the stmts parameter from
12044 a vec<gimple *> to a vec<stmt_vec_info>.
12045 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
12046 (vect_build_slp_tree): Likewise.
12047 (vect_build_slp_tree_2): Likewise. Update uses of
12048 SLP_TREE_SCALAR_STMTS.
12049 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
12050 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
12051 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
12052 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
12053 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
12054 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
12055 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
12056 (vect_get_constant_vectors, vect_get_slp_defs)
12057 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
12058 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
12059 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
12060 instead of gimple stmts.
12061 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
12062 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
12063 (vect_slp_analyze_instance_dependence): Update uses of
12064 SLP_TREE_SCALAR_STMTS.
12065 (vect_slp_analyze_and_verify_node_alignment): Likewise.
12066 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
12067 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
12068 (get_initial_defs_for_reduction): Likewise.
12069 (vect_create_epilog_for_reduction): Likewise.
12070 (vectorize_fold_left_reduction): Likewise.
12071 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
12072 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
12073 (can_vectorize_live_stmts): Likewise.
12075 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12077 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
12078 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
12079 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
12081 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
12083 (gather_scalar_reductions): Update after above interface changes.
12084 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
12085 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
12087 (vect_force_simple_reduction): Likewise.
12088 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
12089 LOOP_VINFO_REDUCTIONS.
12090 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
12092 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12094 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
12095 a gimple stmt to a stmt_vec_info.
12096 * tree-vect-loop.c (vect_active_double_reduction_p)
12097 (vect_force_simple_reduction, vectorizable_reduction): Update
12100 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12102 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
12103 vec<gimple *> to a vec<stmt_vec_info>.
12104 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
12105 the reduction_phis argument from a vec<gimple *> to a
12106 vec<stmt_vec_info>.
12107 (vectorizable_reduction): Likewise the phis local variable that
12108 is passed to vect_create_epilog_for_reduction. Update for new type
12109 of SLP_TREE_VEC_STMTS.
12110 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
12111 (vectorizable_live_operation): Likewise.
12112 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
12113 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
12115 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12117 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
12118 a gimple stmt to a stmt_vec_info.
12119 (vectorizable_condition, vectorizable_live_operation)
12120 (vectorizable_reduction, vectorizable_induction): Pass back the
12121 vectorized statement as a stmt_vec_info.
12122 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
12123 use of STMT_VINFO_VEC_STMT.
12124 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
12125 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
12126 as stmt_vec_infos rather than gimple stmts.
12127 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
12128 to a stmt_vec_info.
12129 (vectorizable_live_operation): Likewise.
12130 (vectorizable_reduction, vectorizable_induction): Likewise,
12131 updating use of STMT_VINFO_VEC_STMT.
12132 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
12133 of STMT_VINFO_VEC_STMT.
12134 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
12135 (vectorizable_simd_clone_call, vectorizable_conversion)
12136 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
12137 (vectorizable_store, vectorizable_load, vectorizable_condition)
12138 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
12139 from a gimple stmt to a stmt_vec_info.
12140 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
12141 pointer to a stmt_vec_info to the vectorizable_* routines.
12143 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12145 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
12146 a gimple stmt to a stmt_vec_info.
12147 (is_pattern_stmt_p): Update accordingly.
12148 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
12149 (vect_record_grouped_load_vectors): Likewise.
12150 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
12151 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
12152 (vect_model_reduction_cost): Likewise.
12153 (vect_create_epilog_for_reduction): Likewise.
12154 (vectorizable_reduction, vectorizable_induction): Likewise.
12155 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
12156 Return the stmt_vec_info for the pattern statement.
12157 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
12158 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
12159 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
12160 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
12161 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
12162 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
12163 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
12164 (free_stmt_vec_info, vect_is_simple_use): Likewise.
12166 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12168 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
12169 (vect_finish_stmt_generation): Likewise.
12170 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
12171 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
12172 (vect_build_gather_load_calls): Use the return value of the above
12173 functions instead of a separate call to vinfo_for_stmt. Use narrow
12174 scopes for the input gimple stmt and wider scopes for the associated
12175 stmt_vec_info. Use vec_info::lookup_def when setting these
12176 stmt_vec_infos from an SSA_NAME definition.
12177 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
12178 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
12179 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
12180 (vectorizable_store, vectorizable_load, vectorizable_condition)
12181 (vectorizable_comparison): Likewise.
12182 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
12183 (vectorizable_reduction): Likewise.
12185 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12187 * tree-vectorizer.h (vect_is_simple_use): Add an optional
12188 stmt_vec_info * parameter before the optional gimple **.
12189 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
12190 (process_use, vect_get_vec_def_for_operand_1): Update callers.
12191 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
12192 * tree-vect-loop.c (vectorizable_reduction): Likewise.
12193 (vectorizable_live_operation): Likewise.
12194 * tree-vect-patterns.c (type_conversion_p): Likewise.
12195 (vect_look_through_possible_promotion): Likewise.
12196 (vect_recog_rotate_pattern): Likewise.
12197 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
12199 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12201 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
12202 a typedef to a wrapper class.
12203 (NULL_STMT_VEC_INFO): New macro.
12204 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
12205 (stmt_vec_info::operator*): New function.
12206 (stmt_vec_info::operator gimple *): Likewise.
12207 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
12208 (add_stmt_costs): Likewise.
12209 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
12210 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
12211 (vect_get_known_peeling_cost): Likewise.
12212 (vect_estimate_min_profitable_iters): Likewise.
12213 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
12214 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
12215 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
12216 (vectorizable_store, free_stmt_vec_infos): Likewise.
12217 (new_stmt_vec_info): Change return type of xcalloc to
12220 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12222 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
12223 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
12224 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
12225 a single_imm_use-based sequence.
12226 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
12228 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12230 * tree-vectorizer.h (vec_info::lookup_def): Declare.
12231 * tree-vectorizer.c (vec_info::lookup_def): New function.
12232 * tree-vect-patterns.c (vect_get_internal_def): Use it.
12233 (vect_widened_op_tree): Likewise.
12234 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
12235 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
12236 (vectorizable_reduction): Likewise.
12237 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
12239 (vect_is_slp_reduction): Update calls accordingly. Use
12240 vec_info::lookup_def.
12241 (vect_is_simple_reduction): Likewise
12242 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
12244 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12246 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
12247 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
12248 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
12250 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
12251 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
12252 (vect_update_vf_for_slp, vect_analyze_loop_operations)
12253 (vect_is_slp_reduction, vectorizable_induction)
12254 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
12255 * tree-vect-patterns.c (vect_init_pattern_stmt):
12256 (vect_determine_min_output_precision_1, vect_determine_precisions)
12257 (vect_pattern_recog): Likewise.
12258 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
12259 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
12260 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
12261 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
12262 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
12263 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
12264 info field from a loop to a loop_vec_info.
12266 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12268 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
12269 (vec_info::add_stmt): Declare.
12270 * tree-vectorizer.c (vec_info::add_stmt): New function.
12271 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
12272 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
12273 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
12274 (vectorizable_induction): Likewise.
12275 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
12276 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
12277 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
12278 (vectorizable_load): Likewise.
12279 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
12280 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
12281 (vect_recog_gather_scatter_pattern): Likewise.
12282 (append_pattern_def_seq): Likewise. Remove a check that is
12283 performed by add_stmt itself.
12285 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12287 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
12288 which make_ssa_name was called with new_stmt before new_stmt
12291 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12293 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
12295 (vect_is_slp_reduction): ...here...
12296 (vect_is_simple_reduction): ...and here. Remove repetition of tests
12297 that are already known to be false.
12299 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12301 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
12302 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
12303 STMT_VINFO_NUM_SLP_USES when it's true.
12304 (vect_free_slp_instance): Add a final_p parameter and pass it to
12305 vect_free_slp_tree.
12306 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
12307 (vect_analyze_slp_instance): Likewise.
12308 (vect_slp_analyze_operations): Likewise.
12309 (vect_slp_analyze_bb_1): Likewise.
12310 * tree-vectorizer.c (vec_info): Likewise.
12311 * tree-vect-loop.c (vect_transform_loop): Likewise.
12313 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12315 * tree-vect-loop.c (vectorizable_reduction): Assert that the
12316 function is not called for second and subsequent members of
12319 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12321 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
12322 cases for nested loops from here to ...
12323 (vect_create_epilog_for_reduction): ...here. Only call
12324 vect_is_simple_use for inner-loop reductions.
12326 2018-07-31 Martin Liska <mliska@suse.cz>
12328 PR gcov-profile/85338
12329 PR gcov-profile/85350
12330 PR gcov-profile/85372
12331 * profile.c (struct location_triplet): New.
12332 (struct location_triplet_hash): Likewise.
12333 (output_location): Do not output a BB that
12334 is already recorded for a line.
12335 (branch_prob): Use streamed_locations.
12337 2018-07-31 Martin Liska <mliska@suse.cz>
12339 PR gcov-profile/85370
12340 * coverage.c (coverage_begin_function): Do not mark target
12341 clones as artificial functions.
12343 2018-07-31 Martin Liska <mliska@suse.cz>
12345 PR gcov-profile/83813
12346 PR gcov-profile/84758
12347 PR gcov-profile/85217
12348 PR gcov-profile/85332
12349 * profile.c (branch_prob): Do not record GOTO expressions
12350 for GIMPLE statements which locations are already streamed.
12352 2018-07-31 Olivier Hainque <hainque@adacore.com>
12354 * gcc.c (handle_spec_function): Accept a soft_matched_part
12355 argument, as do_spec_1. Pass it down to ...
12356 (eval_spec_function): Accept a soft_matched_part argument,
12357 and pass it down to ...
12358 (do_spec_2): Accept a soft_matched_part argument, and pass
12359 it down to do_spec_1.
12360 (do_spec_1): Pass soft_matched_part to handle_spec_function.
12361 (handle_braces): Update call to handle_spec_function.
12362 (driver::set_up_specs): Update calls to do_spec_2.
12363 (compare_debug_dump_opt_spec_function): Likewise.
12364 (compare_debug_self_opt_spec_function): Likewise.
12366 2018-07-31 Olivier Hainque <hainque@adacore.com>
12368 * common.opt (nolibc): New option.
12369 * doc/invoke.texi (Link Options): Document it.
12370 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
12371 * config/alpha/linux.h: Likewise.
12372 * config/arc/elf.h: Likewise.
12373 * config/arm/uclinux-elf.h: Likewise.
12374 * config/arm/unknown-elf.h: Likewise.
12375 * config/avr/avrlibc.h: Likewise.
12376 * config/bfin/bfin.h: Likewise.
12377 * config/bfin/linux.h: Likewise.
12378 * config/bfin/uclinux.h: Likewise.
12379 * config/darwin.h: Likewise.
12380 * config/darwin10.h: Likewise.
12381 * config/darwin12.h: Likewise.
12382 * config/gnu-user.h: Likewise.
12383 * config/lm32/uclinux-elf.h: Likewise.
12384 * config/pa/pa-hpux11.h: Likewise.
12385 * config/pa/pa64-hpux.h: Likewise.
12386 * config/sparc/sparc.h: Likewise.
12388 2018-07-31 Olivier Hainque <hainque@adacore.com>
12390 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
12391 undefined variables.
12393 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
12396 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
12397 instead of GEN_INT.
12399 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
12401 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
12402 terminated string literal.
12404 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
12406 PR rtl-optimization/85160
12407 * combine.c (is_just_move): New function.
12408 (try_combine): Allow combining two instructions into two if neither of
12409 the original instructions was a move.
12411 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
12414 * doc/extend.texi (Global Register Variables): Discourage use of type
12416 (Local Register Variables): Likewise.
12418 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
12420 PR tree-optimization/86506
12421 * hwint.h (ceil_log2): Resync with hwint.c implementation.
12423 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
12426 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
12427 hard_regno, make sure no insn between `from` and `to` clobbers it.
12429 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
12430 Tom de Vries <tdevries@suse.de>
12432 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
12433 (PTX_DEFAULT_RUNTIME_DIM): ... this.
12434 (nvptx_goacc_validate_dims): Set default worker and gang dims to
12435 PTX_DEFAULT_RUNTIME_DIM.
12436 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
12438 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
12440 * config/pa/pa.c (pa_output_addr_vec): Align address table.
12441 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
12442 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
12444 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
12446 * config/rs6000/constraints.md (wG constraint): Delete, no longer
12448 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
12449 predicate to reflect toc fusion has been deleted.
12450 (toc_fusion_mem_raw): Delete, no longer used.
12451 (toc_fusion_mem_wrapped): Likewise.
12452 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
12454 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
12455 Delete, no longer used.
12456 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
12457 meant to be used for toc fusion.
12458 (rs6000_debug_print_mode): Delete toc fusion debugging.
12459 (rs6000_debug_reg_global): Likewise.
12460 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
12461 fusion and secondary reload support that were never used.
12462 (rs6000_option_override_internal): Delete TOC fusion, that was only
12463 partially defined, and it did not work unless you also used the
12465 (rs6000_legitimate_address_p): Delete TOC fusion support.
12466 (rs6000_opt_masks): Likewise.
12467 (fusion_wrap_memory_address): Delete function, no longer used.
12468 (fusion_split_address); Delete TOC fusion support.
12469 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
12470 longer used with toc fusion being deleted.
12471 (TARGET_TOC_FUSION_FP): Likewise.
12472 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
12474 (toc fusion spliter): Delete TOC fusion support.
12475 (toc_fusionload_<mode>): Likewise.
12476 (toc_fusionload_di): Likewise.
12477 (fusion_gpr_load_<mode>): Delete generator function, this insn no
12478 longer needs to be named. Rename predicate to delete TOC fusion.
12479 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
12480 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
12481 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
12482 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
12483 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
12485 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
12487 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
12488 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
12489 __int128 in built-in function prototypes.
12490 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
12491 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
12493 2018-07-27 Martin Sebor <msebor@redhat.com>
12495 PR tree-optimization/86696
12496 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
12497 types, including enums.
12498 (handle_char_store): Be prepared for the above function to fail.
12500 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
12502 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
12503 when optimization level is lower than 2 or optimize for size.
12505 2018-07-26 Martin Sebor <msebor@redhat.com>
12507 PR tree-optimization/86043
12508 PR tree-optimization/86042
12509 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
12510 (get_string_cst_length): Rename...
12511 (get_min_string_length): ...to this. Add argument.
12512 (handle_char_store): Extend to handle multi-character stores by
12514 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
12515 * tree.h (initializer_zerop): Add argument.
12517 2018-07-26 Jakub Jelinek <jakub@redhat.com>
12519 PR middle-end/86660
12520 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
12521 declare target to variables if they have always,{to,from,tofrom} map
12524 2018-07-26 Martin Liska <mliska@suse.cz>
12527 * lto-wrapper.c: Add linker_output as prefix
12528 for ltrans_output_file.
12530 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
12532 PR rtl-optimization/85805
12533 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
12534 value for hard registers if that was written in the same mode.
12536 2018-07-26 Martin Liska <mliska@suse.cz>
12538 PR gcov-profile/86536
12539 * gcov.c (format_gcov): Use printf format %.*f directly
12540 and do not handle special values.
12542 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
12544 * common/config/arc/arc-common.c (arc_option_optimization_table):
12545 Update default optimizations for size.
12547 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
12549 * config/arc/arc.md (movsf_insn): Add short instruction selection.
12550 * config/arc/constraints.md (CfZ): New constraint.
12551 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
12552 (subsf3_fpu): Likewise.
12553 (cmpsf_fpu): Likewise.
12554 (cmpsf_fpu_uneq): Likewise.
12556 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
12558 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
12560 (arc_is_uncached_mem_p): uncached applies to both the variable and
12563 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
12565 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
12568 2018-07-25 David Malcolm <dmalcolm@redhat.com>
12570 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
12571 field "m_scopes" from vec to auto_vec.
12573 2018-07-25 Martin Liska <mliska@suse.cz>
12575 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
12578 2018-07-25 Richard Biener <rguenther@suse.de>
12581 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
12582 special wrt context_die late.
12583 (gen_subprogram_die): Re-use DIEs in local scope.
12585 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
12587 PR tree-optimization/86644
12588 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
12590 2018-07-25 Martin Liska <mliska@suse.cz>
12592 PR middle-end/86645
12593 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
12594 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
12596 2018-07-25 Martin Liska <mliska@suse.cz>
12599 * params.def: Explain ASan abbreviation and provide
12600 a documentation link.
12602 2018-07-24 Martin Sebor <msebor@redhat.com>
12604 PR tree-optimization/86622
12605 PR tree-optimization/86532
12606 * builtins.h (string_length): Declare.
12607 * builtins.c (c_strlen): Correct handling of non-constant offsets.
12608 (check_access): Be prepared for non-constant length ranges.
12609 (string_length): Make extern.
12610 * expr.c (string_constant): Only handle the minor non-constant
12611 array index. Use string_constant to compute the length of
12612 a generic string constant.
12614 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
12616 PR tree-optimization/86618
12617 * tree-vect-stmts.c (vectorizable_call): Don't take the address
12618 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
12620 2018-07-24 David Malcolm <dmalcolm@redhat.com>
12622 PR tree-optimization/86636
12623 * json.cc (json::object::set): Fix comment. Add assertions.
12624 (json::array::append): Move here from json.h. Add comment and an
12626 (json::string::string): Likewise.
12627 * json.h (json::array::append): Move to json.cc.
12628 (json::string::string): Likewise.
12629 * optinfo-emit-json.cc
12630 (optrecord_json_writer::impl_location_to_json): Assert that we
12631 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
12632 wrapper around it. Expand the location once, rather than three
12634 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
12635 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
12637 (optrecord_json_writer::optinfo_to_json): Likewise, in four
12638 places. Fix some overlong lines.
12640 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
12642 * config/aarch64/aarch64-simd.md
12643 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
12644 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
12645 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
12646 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
12647 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
12648 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
12649 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
12650 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
12651 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
12653 2018-07-24 Jakub Jelinek <jakub@redhat.com>
12655 PR middle-end/86627
12656 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
12657 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
12658 and abs_d == d, do the power of two handling if profitable.
12660 2018-07-24 Richard Biener <rguenther@suse.de>
12662 * match.pd: Add BIT_FIELD_REF canonicalizations.
12664 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
12667 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
12669 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
12671 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
12672 terminated STRING_CST object.
12674 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
12676 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
12678 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
12680 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
12681 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
12682 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
12683 the elements into a register.
12684 (rs6000_split_v4si_init_di_reg): Delete.
12685 (rs6000_split_v4si_init): Delete.
12686 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
12687 (vsx_init_v4si): Rewrite as a define_expand.
12689 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
12691 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
12692 zero_extend argument from memory): New.
12694 2018-07-22 Martin Sebor <msebor@redhat.com>
12697 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
12698 diagnosing calls with unknown arguments unless -Walloca-larger-than
12699 is restricted to less than PTRDIFF_MAX bytes.
12701 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
12703 * doc/gcov.texi (Invoking Gcov): Editorial changes.
12705 2018-07-20 David Malcolm <dmalcolm@redhat.com>
12707 * pretty-print.c (text_info::set_location): Remove redundant
12708 "line_table" parameter from call to rich_location::set_range.
12710 2018-07-20 Martin Sebor <msebor@redhat.com>
12712 PR middle-end/82063
12713 * builtins.c (expand_builtin_alloca): Adjust.
12714 * calls.c (alloc_max_size): Simplify.
12715 * cgraphunit.c (cgraph_node::expand): Adjust.
12716 * common.opt (larger_than_size, warn_frame_larger_than): Remove
12718 (frame_larger_than_size): Same.
12719 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
12720 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
12722 * doc/invoke.texi (GCC Command Options): Document option arguments.
12723 Explain byte-size arguments and suffixes.
12724 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
12725 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
12726 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
12727 * doc/options.texi (UInteger): Expand.
12728 (Host_Wide_Int, ByteSize): Document new properties.
12729 * final.c (final_start_function_1): Include sizes in an error message.
12730 * function.c (frame_offset_overflow): Same.
12731 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
12732 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
12733 Diagnose unbounded alloca calls only for limits of less than
12735 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
12736 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
12738 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
12739 only for limits of less than PTRDIFF_MAX.
12740 * langhooks-def.h (lhd_handle_option): Change function argument
12742 * langhooks.c (lhd_handle_option): Same.
12743 * langhooks.h (handle_option): Same.
12744 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
12746 (var_type, var_type_struct): Same.
12747 (var_set): Handle ByteSize flag.
12748 * optc-gen.awk: Add comments to output to ease debugging. Make
12749 use of HOST_WIDE_INT where appropriate.
12750 * opts-gen-save.awk: Use %lx to format unsigned long.
12751 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
12752 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
12753 arguments. Parse bytes-size suffixes.
12754 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
12755 (enum_value_to_arg): Same.
12756 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
12757 (handle_option): Adjust.
12758 (generate_option): Change function argument to HOST_WIDE_INT.
12759 (cmdline_handle_error): Adjust.
12760 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
12761 (set_option): Change function argument to HOST_WIDE_INT.
12762 (option_enabled): Handle cl_host_wide_int.
12763 (get_option_state): Handle CLVC_SIZE.
12764 (control_warning_option): Same.
12765 * opts.c (common_handle_option): Change function argument to
12766 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
12767 OPT_Wvla_larger_than_.
12768 * opts.h (enum cl_var_type): Add an enumerator.
12769 * stor-layout.c (layout_decl): Print a more meaningful warning.
12770 * toplev.c (output_stack_usage): Adjust.
12772 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
12774 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
12775 call to inline_expand_builtin_string_cmp.
12776 (expand_builtin_strcmp): Likewise.
12777 (expand_builtin_strncmp): Likewise.
12778 (inline_string_cmp): Delete the last parameter, change char_type_node
12779 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
12781 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
12782 the inlining expansion on target where the type of the call has same or
12783 narrower precision than unsigned char.
12785 2018-07-20 David Malcolm <dmalcolm@redhat.com>
12787 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
12788 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
12789 * common.opt (fsave-optimization-record): New option.
12790 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
12791 * doc/invoke.texi (-fsave-optimization-record): New option.
12792 * dumpfile.c: Include "optinfo-emit-json.h".
12793 (struct kv_pair): Move to coretypes.h.
12794 (optgroup_options): Make non-static.
12795 (dump_context::end_scope): Call
12796 optimization_records_maybe_pop_dump_scope.
12797 * dumpfile.h (optgroup_options): New decl.
12798 * json.cc: New file.
12799 * json.h: New file.
12800 * optinfo-emit-json.cc: New file.
12801 * optinfo-emit-json.h: New file.
12802 * optinfo.cc: Include "optinfo-emit-json.h".
12803 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
12804 (optinfo_enabled_p): Check optimization_records_enabled_p.
12805 (optinfo_wants_inlining_info_p): Likewise.
12806 * optinfo.h: Update comment.
12807 * profile-count.c (profile_quality_as_string): New function.
12808 * profile-count.h (profile_quality_as_string): New decl.
12809 (profile_count::quality): New accessor.
12810 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
12811 and optinfo_emit_json_cc_tests.
12812 * selftest.h (selftest::json_cc_tests): New decl.
12813 (selftest::optinfo_emit_json_cc_tests): New decl.
12814 * toplev.c: Include "optinfo-emit-json.h".
12815 (compile_file): Call optimization_records_finish.
12816 (do_compile): Call optimization_records_start.
12817 * tree-ssa-live.c: Include optinfo.h.
12818 (remove_unused_scope_block_p): Retain inlining information if
12819 optinfo_wants_inlining_info_p returns true.
12821 2018-07-20 Richard Biener <rguenther@suse.de>
12824 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
12825 to cover -flto-partition=none.
12827 2018-07-20 Martin Liska <mliska@suse.cz>
12829 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
12830 (get_decl_source_range): Remove unused function.
12832 2018-07-20 Richard Biener <rguenther@suse.de>
12834 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
12835 (struct vn_phi_s): Likewise.
12836 (struct vn_reference_s): Likewise.
12837 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
12838 for searching the slot of an entry known to be in the hash itself.
12839 (vn_phi_hasher::equal): Likewise.
12840 (vn_reference_hasher::equal): Likewise.
12841 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
12843 (optimistic_info, current_info): Remove, keeping only valid_info.
12844 (vn_reference_lookup_1): Remove fallback lookup.
12845 (vn_reference_lookup_2): Likewise.
12846 (vn_nary_op_lookup_1): Likewise.
12847 (vn_phi_lookup): Likewise.
12848 (vn_nary_build_or_lookup_1): Make sure to not chain the built
12850 (vn_reference_insert): Adjust, chain the inserted hash element
12851 at last_inserted_ref.
12852 (vn_reference_insert_pieces): Likewise.
12853 (visit_reference_op_call): Likewise.
12854 (vn_nary_op_insert_into): Chain the inserted hash element at
12855 last_inserted_nary.
12856 (vn_nary_op_insert_pieces): Adjust.
12857 (vn_nary_op_insert): Likewise.
12858 (vn_nary_op_insert_stmt): Likewise.
12859 (vn_phi_insert): Adjust, chain the inserted hash element at
12861 (process_scc): Remove clearing and copying the optimistic
12862 table. Instead remove elements inserted during an optimistic
12863 iteration from the single table we maintain.
12864 (init_scc_vn): Adjust.
12865 (free_scc_vn): Likewise.
12866 (sccvn_dom_walker::record_cond): Likewise.
12867 (sccvn_dom_walker::after_dom_children): Likewise.
12869 2018-07-19 Martin Sebor <msebor@redhat.com>
12871 PR tree-optimization/84047
12872 PR tree-optimization/83776
12873 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
12874 (check_array_bounds): Call it.
12876 2018-07-19 Martin Sebor <msebor@redhat.com>
12878 * align.h (align_flags): Use member initialization.
12880 2018-07-19 David Malcolm <dmalcolm@redhat.com>
12882 * Makefile.in (OBJS): Add optinfo.o.
12883 * coretypes.h (class symtab_node): New forward decl.
12884 (struct cgraph_node): New forward decl.
12885 (class varpool_node): New forward decl.
12886 * dump-context.h: New file.
12887 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
12889 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
12890 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
12891 (set_alt_dump_file): Likewise.
12892 (dump_context::~dump_context): New dtor.
12893 (dump_gimple_stmt): Move implementation to...
12894 (dump_context::dump_gimple_stmt): ...this new member function.
12895 Add the stmt to any pending optinfo, creating one if need be.
12896 (dump_gimple_stmt_loc): Move implementation to...
12897 (dump_context::dump_gimple_stmt_loc): ...this new member function.
12898 Start a new optinfo and add the stmt to it.
12899 (dump_gimple_expr): Move implementation to...
12900 (dump_context::dump_gimple_expr): ...this new member function.
12901 Add the stmt to any pending optinfo, creating one if need be.
12902 (dump_gimple_expr_loc): Move implementation to...
12903 (dump_context::dump_gimple_expr_loc): ...this new member function.
12904 Start a new optinfo and add the stmt to it.
12905 (dump_generic_expr): Move implementation to...
12906 (dump_context::dump_generic_expr): ...this new member function.
12907 Add the tree to any pending optinfo, creating one if need be.
12908 (dump_generic_expr_loc): Move implementation to...
12909 (dump_context::dump_generic_expr_loc): ...this new member
12910 function. Add the tree to any pending optinfo, creating one if
12912 (dump_printf): Move implementation to...
12913 (dump_context::dump_printf_va): ...this new member function. Add
12914 the text to any pending optinfo, creating one if need be.
12915 (dump_printf_loc): Move implementation to...
12916 (dump_context::dump_printf_loc_va): ...this new member function.
12917 Start a new optinfo and add the stmt to it.
12918 (dump_dec): Move implementation to...
12919 (dump_context::dump_dec): ...this new member function. Add the
12920 value to any pending optinfo, creating one if need be.
12921 (dump_context::dump_symtab_node): New member function.
12922 (dump_context::get_scope_depth): New member function.
12923 (dump_context::begin_scope): New member function.
12924 (dump_context::end_scope): New member function.
12925 (dump_context::ensure_pending_optinfo): New member function.
12926 (dump_context::begin_next_optinfo): New member function.
12927 (dump_context::end_any_optinfo): New member function.
12928 (dump_context::s_current): New global.
12929 (dump_context::s_default): New global.
12930 (dump_scope_depth): Delete global.
12931 (dumpfile_ensure_any_optinfo_are_flushed): New function.
12932 (dump_symtab_node): New function.
12933 (get_dump_scope_depth): Reimplement in terms of dump_context.
12934 (dump_begin_scope): Likewise.
12935 (dump_end_scope): Likewise.
12936 (selftest::temp_dump_context::temp_dump_context): New ctor.
12937 (selftest::temp_dump_context::~temp_dump_context): New dtor.
12938 (selftest::verify_item): New function.
12939 (ASSERT_IS_TEXT): New macro.
12940 (ASSERT_IS_TREE): New macro.
12941 (ASSERT_IS_GIMPLE): New macro.
12942 (selftest::test_capture_of_dump_calls): New test.
12943 (selftest::dumpfile_c_tests): Call it.
12944 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
12945 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
12946 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
12947 descriptive comment.
12948 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
12949 (dump_node, dump_bb): Move these unrelated decls.
12950 (class dump_manager): Add leading comment.
12951 * optinfo.cc: New file.
12952 * optinfo.h: New file.
12954 2018-07-19 Michael Collison <michael.collison@arm.com>
12955 Richard Henderson <rth@redhat.com>
12957 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
12958 (subti): Handle op1 zero.
12959 (subvti4, usub4ti4): New.
12960 (*sub<GPI>3_compare1_imm): New.
12961 (sub<GPI>3_carryinCV): New.
12962 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
12963 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
12965 2018-07-19 Michael Collison <michael.collison@arm.com>
12966 Richard Henderson <rth@redhat.com>
12968 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
12969 (addti3): Create simpler code if low part is already known to be 0.
12970 (addvti4, uaddvti4): New.
12971 (*add<GPI>3_compareC_cconly_imm): New.
12972 (*add<GPI>3_compareC_cconly): New.
12973 (*add<GPI>3_compareC_imm): New.
12974 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
12975 handle constants within this pattern..
12976 (*add<GPI>3_compareV_cconly_imm): New.
12977 (*add<GPI>3_compareV_cconly): New.
12978 (*add<GPI>3_compareV_imm): New.
12979 (add<GPI>3_compareV): New.
12980 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
12981 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
12982 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
12983 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
12984 with 'comparison' operator.
12985 (*add<GPI>3_compareV_cconly_imm): Ditto.
12986 (*add<GPI>3_compareV_cconly): Ditto.
12987 (*add<GPI>3_compareV_imm): Ditto.
12988 (add<GPI>3_compareV): Ditto.
12989 (add<mode>3_carryinC): Ditto.
12990 (*add<mode>3_carryinC_zero): Ditto.
12991 (*add<mode>3_carryinC): Ditto.
12992 (add<mode>3_carryinV): Ditto.
12993 (*add<mode>3_carryinV_zero): Ditto.
12994 (*add<mode>3_carryinV): Ditto.
12996 2018-07-19 Michael Collison <michael.collison@arm.com>
12997 Richard Henderson <rth@redhat.com>
12999 * config/aarch64/aarch64-modes.def (CC_V): New.
13000 * config/aarch64/aarch64-protos.h
13001 (aarch64_addti_scratch_regs): Declare
13002 (aarch64_subvti_scratch_regs): Declare.
13003 (aarch64_expand_subvti): Declare.
13004 (aarch64_gen_unlikely_cbranch): Declare
13005 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
13006 for signed overflow using CC_Vmode.
13007 (aarch64_get_condition_code_1): Handle CC_Vmode.
13008 (aarch64_gen_unlikely_cbranch): New function.
13009 (aarch64_addti_scratch_regs): New function.
13010 (aarch64_subvti_scratch_regs): New function.
13011 (aarch64_expand_subvti): New function.
13013 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
13015 * config/aarch64/aarch64-option-extensions.def: New entry for profile
13017 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
13018 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
13021 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
13024 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
13025 address check not strict.
13027 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
13029 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
13031 (store_pair_lanes<mode>): Likewise.
13032 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
13033 enum value 'ADDR_QUERY_LDP_STP_N'.
13034 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
13035 (aarch64_print_address_internal): Add declaration.
13036 (aarch64_print_ldpstp_address): Remove.
13037 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
13038 (aarch64_print_operand): Change printing of 'y'.
13039 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
13040 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
13041 'true' rather than '1'.
13042 * config/aarch64/constraints.md (Uml): Likewise.
13043 (Uml): Rename to Umn.
13046 2018-07-19 Richard Biener <rguenther@suse.de>
13048 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
13050 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
13051 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
13052 (vn_reference_hasher): Likewise.
13053 (struct vn_tables_s): Remove obstack and alloc-pool members.
13054 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
13055 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
13056 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
13057 (vn_reference_insert_pieces): Likewise.
13058 (alloc_vn_nary_op_noinit): Adjust.
13059 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
13060 (vn_phi_eq): Adjust.
13061 (shared_lookup_phiargs): Remove.
13062 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
13063 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
13064 (visit_reference_op_call): Likewise.
13065 (copy_nary, copy_phi, copy_reference): Remove.
13066 (process_scc): Rewind the obstack when iterating. Do not
13067 copy the elements to valid_info but just move them from one
13068 hashtable to the other.
13069 (allocate_vn_table): Adjust.
13070 (free_vn_table): Likewise.
13071 (init_scc_vn): Likewise.
13072 (free_scc_vn): Likewise.
13074 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
13077 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
13078 indirect_return as function type attribute.
13079 (ix86_attribute_table): Change indirect_return to function
13081 * doc/extend.texi: Update indirect_return attribute.
13083 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
13085 * wide-int.h (widest2_int): New.
13086 * gimple-fold.c (arith_overflowed_p): Use it.
13087 * tree.h (widest2_int_cst): New.
13088 * tree-vrp.c (wide_int_binop_overflow): Rename from
13089 vrp_int_const_binop.
13090 Rewrite to work on trees.
13091 (extract_range_from_multiplicative_op_1): Abstract code to...
13092 (wide_int_range_min_max): ...here.
13093 (wide_int_range_cross_product): ...and here.
13094 (extract_range_from_binary_expr_1): Abstract overflow code to...
13095 (wide_int_range_mult_wrapping): ...here.
13096 * tree-vrp.h (wide_int_range_cross_product): New.
13097 (wide_int_range_mult_wrapping): New.
13099 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
13100 Julia Koval <julia.koval@intel.com>
13102 * config/i386/x86-tune-costs.h (skylake_memcpy,
13103 skylake_memset): Replace rep_prefix with unrolling for size 512.
13105 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
13107 PR middle-end/86544
13108 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
13109 comparision with EQ_EXPR in last stmt.
13111 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
13113 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
13114 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
13115 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
13116 previously known as "PowerPC AltiVec Built-in Functions". Move
13117 some material to new subsubsections "PowerPC AltiVec Built-in
13118 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
13120 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
13121 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
13122 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
13123 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
13125 2018-07-18 Richard Biener <rguenther@suse.de>
13127 PR tree-optimization/86557
13128 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
13131 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
13133 * config/s390/s390.c (s390_function_profiler): Generate CFI.
13135 2018-07-17 Jeff Law <law@redhat.com>
13137 * config/arm/arm.c (get_label_padding): Update for recent
13138 changes to label_to_alignment.
13140 PR tree-optimization/86010
13141 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
13143 * config/mips/mips.c (vr4130_align_insns): Update for recent
13144 changes to label_to_alignment.
13146 * config/frv/frv.c (frv_label_align): Update for recent changes
13147 to label_to_alignment.
13149 * config/nios2/nios2.c (nios2_label_align): Update for recent
13150 changes which dropped ALIGN_LABELS_LOG.
13152 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
13154 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
13155 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
13157 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
13159 * config/arc/arc.c (arc_label_align): Use align_labels instead of
13160 deprecated align_labels_log.
13162 2018-07-17 Richard Biener <rguenther@suse.de>
13165 * dwarf2out.c (init_sections_and_labels): Always generate
13166 a debug_line_str_section for early LTO debug.
13167 (dwarf2out_finish): Reset debug_line_str_hash output early.
13168 Bump counter for extra dwarf5 .debug_loc labels to not conflict
13170 (dwarf2out_early_finish): Output debug_line_str.
13172 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
13174 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
13175 index register on z196 or later.
13177 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
13179 * config/s390/s390.c (s390_default_align): Set default function
13181 (s390_override_options_after_change): Call s390_default align.
13182 (s390_option_override_internal): Call s390_default_align.
13183 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
13185 2018-07-17 Jakub Jelinek <jakub@redhat.com>
13187 PR middle-end/86542
13188 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
13189 to _looptemp_ clauses, other than the first two.
13191 2018-07-17 Martin Liska <mliska@suse.cz>
13193 * opts.c: Do not enable OPT_falign_* for -Os.
13195 2018-07-17 Martin Liska <mliska@suse.cz>
13197 * align.h (MAX_CODE_ALIGN): New.
13198 (MAX_CODE_ALIGN_VALUE): New.
13199 * common/config/i386/i386-common.c (ix86_handle_option):
13200 (MAX_CODE_ALIGN): Moved to align.h.
13201 * final.c (MAX_CODE_ALIGN): Likewise.
13202 * opts.c (parse_and_check_align_values):
13203 (MAX_CODE_ALIGN): Likewise.
13204 (MAX_CODE_ALIGN_VALUE): Likewise.
13206 2018-07-17 Martin Liska <mliska@suse.cz>
13208 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
13209 in order to fulfil coding style.
13210 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
13211 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
13212 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
13213 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
13214 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
13215 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
13216 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
13217 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
13218 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
13220 2018-07-17 Martin Liska <mliska@suse.cz>
13222 * align.h: New file.
13223 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
13225 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
13226 align_flags of label_to_alignment.
13227 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
13229 * config/m68k/m68k.c: Do not use removed align_labels_value and
13231 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
13232 (LOOP_ALIGN): Likewise.
13233 (LABEL_ALIGN): Likewise.
13234 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
13235 Remove not used macro.
13236 (rs6000_loop_align): Change return type to align_flags.
13237 (rs6000_loop_align_max_skip): Remove.
13238 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
13239 Change return type to align_flags.
13240 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
13241 Remove not used macro.
13242 (rs6000_loop_align): Change return type to align_flags.
13243 (rs6000_loop_align_max_skip): Remove.
13244 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
13245 * config/rx/rx-protos.h (rx_align_for_label): Make it
13247 * config/rx/rx.c (rx_align_for_label): Change return type
13249 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
13251 into align_flags class.
13252 (LABEL_ALIGN): Likewise.
13253 (LOOP_ALIGN): Likewise.
13254 * config/s390/s390.c (s390_label_align): Use align_flags
13256 (s390_asm_output_function_label): Likewise.
13257 * config/sh/sh.c (sh_override_options_after_change):
13258 Use align_flags class directly without macros.
13259 (find_barrier): Likewise.
13260 (barrier_align): Likewise.
13261 (sh_loop_align): Likewise.
13262 * config/spu/spu.c (spu_option_override):
13263 Use align_flags_tuple::get_value instead of removed macros.
13264 (spu_sched_init): Likewise.
13265 * config/spu/spu.h (GTY): Likewise.
13266 * config/visium/visium.c (visium_option_override):
13267 Set "8" as default secondary alignment.
13268 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
13269 in order to guarantee secondary alignment of 8.
13270 * coretypes.h: Include align.h header file.
13271 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
13272 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
13273 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
13274 * doc/tm.texi.in: Likewise.
13275 * final.c (struct label_alignment): Remove not used structure.
13276 (LABEL_ALIGN): Change type to align_flags.
13277 (LOOP_ALIGN): Likewise.
13278 (JUMP_ALIGN): Likewise.
13279 (default_loop_align_max_skip): Remove.
13280 (default_label_align_max_skip): Likewise.
13281 (default_jump_align_max_skip): Likewise.
13282 (default_label_align_after_barrier_max_skip):
13283 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
13284 (LABEL_TO_MAX_SKIP): Remove.
13285 (label_to_alignment): Return align_flags type instead of integer.
13286 (label_to_max_skip): Remove.
13287 (align_fuzz): Use align_flags type.
13288 (compute_alignments): Use align_flags type and use align_flags::max
13289 to combine multiple alignments.
13290 (grow_label_align): Grow vec instead of C array.
13291 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
13292 (shorten_branches): Use align_flags type and use align_flags::max
13293 to combine multiple alignments.
13294 (final_scan_insn_1): Remove usage of secondary alignment that comes
13295 from label alignment, but instead use proper secondary alignment
13296 which is computed in grow_label_align.
13297 * flags.h (struct align_flags_tuple): Move to align.h.
13298 (struct align_flags): Likewise.
13299 (state_align_loops): Rename to align_loops.
13300 (state_align_jumps): Rename to align_jumps.
13301 (state_align_labels): Rename to align_labels.
13302 (state_align_functions): Rename to align_functions.
13303 (align_loops_log): Remove.
13304 (align_jumps_log): Remove.
13305 (align_labels_log): Remove.
13306 (align_functions_log): Remove.
13307 (align_loops_max_skip): Remove.
13308 (align_jumps_max_skip): Remove.
13309 (align_labels_max_skip): Remove.
13310 (align_functions_max_skip): Remove.
13311 (align_loops_value): Remove.
13312 (align_jumps_value): Remove.
13313 (align_labels_value): Remove.
13314 (align_functions_value): Remove.
13315 * output.h (label_to_alignment): Change return type to align_flags.
13316 (label_to_max_skip): Remove.
13317 * target.def: Remove loop_align_max_skip, label_align_max_skip,
13318 jump_align_max_skip macros.
13319 * targhooks.h (default_loop_align_max_skip): Remove.
13320 (default_label_align_max_skip): Likewise.
13321 (default_jump_align_max_skip): Likewise.
13322 (default_label_align_after_barrier_max_skip): Remove.
13323 * toplev.c (read_log_maxskip): Use ::normalize function.
13324 (parse_N_M): Remove not used argument and also call ::normalize.
13325 (parse_alignment_opts): Do not pass unused arguments.
13326 * varasm.c (assemble_start_function): Use directly align_functions
13327 instead of removed macros.
13328 * system.h: Do not poison removed macros.
13330 2018-07-17 Jakub Jelinek <jakub@redhat.com>
13332 PR middle-end/86539
13333 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
13334 and cond temporaries don't have reference type if iterator has
13335 pointer type. For init use &for_pre_body instead of pre_p if
13336 for_pre_body is non-empty.
13338 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
13340 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
13341 double-double modes to SFmode directly directly.
13342 (trunc<mode>sf2_fprs): Delete.
13344 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
13346 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
13347 for conversions between IFmode and the decimal floating point modes.
13348 (init_float128_ieee): Use the correct names for conversions between
13349 KFmode and the decimal floating point modes.
13351 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
13353 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
13354 for the conversions between TDmode and IFmode.
13355 (init_float128_ieee): Use more correct names for the conversions
13356 between TDmode and KFmode.
13358 2018-07-16 Jakub Jelinek <jakub@redhat.com>
13360 PR tree-optimization/86526
13361 * builtins.c (expand_builtin_memcmp): Formatting fixes.
13362 (inline_expand_builtin_string_cmp): Likewise.
13363 (inline_string_cmp): Likewise. Use c_readstr instead of
13364 builtin_memcpy_read_str. Add unit_mode temporary.
13366 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
13368 PR middle-end/86528
13369 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
13370 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
13372 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
13374 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
13375 Alphabetize prototypes of built-in functions, separating out
13376 built-in functions that are listed in this section but should be
13377 described elsewhere.
13379 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
13382 * expmed.c (emit_store_flag): Do not emit setcc followed by a
13383 conditional move when trapping comparison was split to a
13384 non-trapping one (and vice versa).
13386 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
13388 * config/s390/s390.c (s390_function_profiler): Generate nops
13389 instead of profiler call sequences.
13390 * config/s390/s390.opt: Add the new option.
13392 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
13394 * config/s390/s390.c (s390_function_profiler): Generate
13395 __mcount_loc section.
13396 * config/s390/s390.opt: Add the new option.
13398 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
13400 * common.opt: Add the new warning.
13401 * config/s390/s390.c (s390_function_profiler): Emit "brasl
13402 %r0,__fentry__" when -mfentry is specified.
13403 (s390_option_override_internal): Disallow -mfentry for 31-bit
13405 * config/s390/s390.opt: Add the new option.
13407 2018-07-16 Richard Biener <rguenther@suse.de>
13410 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
13411 for function-local FUNCTION_DECL and RESULT_DECL immediately.
13413 2018-07-16 Martin Liska <mliska@suse.cz>
13416 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
13419 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
13421 * config/arc/arcHS.md: Update ARCHS scheduling rules.
13423 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
13425 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
13427 * config/arc/arc-cpus.def (hs4x): New cpu.
13429 * config/arc/arc-tables.opt: Regenerate.
13430 * config/arc/arc.c (arc_sched_issue_rate): New function.
13431 (TARGET_SCHED_ISSUE_RATE): Define.
13432 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
13433 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
13435 (attr tune): Add ARCHS4x tune values.
13436 (attr tune_dspmpy): Define.
13437 (*tst): Correct instruction type.
13438 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
13439 * config/arc/arcHS4x.md: New file.
13440 * config/arc/fpu.md: Update instruction type attributes.
13441 * config/arc/t-multilib: Regenerate.
13443 2018-07-16 Tom de Vries <tdevries@suse.de>
13446 * var-tracking.c (vt_initialize): Fix pre_dec handling.
13448 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
13450 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
13453 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
13455 PR tree-optimization/86514
13456 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
13457 conversion to a boolean type from a type with greater precision.
13459 2018-07-16 Tom de Vries <tdevries@suse.de>
13461 * var-tracking.c (vt_initialize): Print adjusted insn slim if
13462 dump_flags request TDF_SLIM.
13464 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
13466 * fold-const.c (int_const_binop_1): Abstract...
13467 (wide_int_binop): ...wide int code here.
13468 (poly_int_binop): ...poly int code here.
13469 Abstract the rest of int_const_binop_1 into int_const_binop.
13470 * fold-const.h (wide_int_binop): New.
13471 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
13472 Remove useless PLUS/MINUS_EXPR case.
13473 (zero_nonzero_bits_from_vr): Move wide int code...
13474 (zero_nonzero_bits_from_bounds): ...here.
13475 (extract_range_from_binary_expr_1): Move mask optimization code...
13476 (range_easy_mask_min_max): ...here.
13477 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
13478 (range_easy_mask_min_max): New.
13480 2018-07-15 Jeff Law <law@redhat.com>
13483 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
13486 2018-07-14 Jim Wilson <jimw@sifive.com>
13488 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
13490 2018-07-14 Paul Koning <ni1d@arrl.net>
13492 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
13494 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
13496 * lto-streamer-out.c (copy_function_or_variable): Dump info about
13499 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
13500 Steve Munroe <munroesj52@gmail.com>
13502 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
13503 (_mm_andnot_si128): Likewise.
13504 (_mm_or_si128): Likewise.
13505 (_mm_xor_si128): Likewise.
13507 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
13509 PR middle-end/78809
13510 * builtins.c (expand_builtin_memcmp): Inline the calls first
13511 when result_eq is false.
13512 (expand_builtin_strcmp): Inline the calls first.
13513 (expand_builtin_strncmp): Likewise.
13514 (inline_string_cmp): New routine. Expand a string compare
13515 call by using a sequence of char comparison.
13516 (inline_expand_builtin_string_cmp): New routine. Inline expansion
13517 a call to str(n)cmp/memcmp.
13518 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
13520 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
13522 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
13524 * config/arm/driver-arm.c: Include arm-native.h.
13525 (host_detect_local_cpu): Use auto-generated data tables.
13526 (vendors, arm_cpu_table): Delete. Move part information to ...
13527 * config/arm/arm-cpus.in: ... here.
13528 * config/arm/parsecpu.awk (gen_native): New function.
13529 (vendor, part): New CPU fields.
13530 (END): Add support for building the native CPU detection tables.
13531 * config/arm/t-arm (arm-native.h): Add build rule.
13532 (driver-arm.o): Add dependency on arm-native.h.
13534 2018-07-13 Richard Biener <rguenther@suse.de>
13536 PR middle-end/85974
13537 * match.pd (addr1 - addr2): Allow either of the operand to
13540 2018-07-13 Tom de Vries <tdevries@suse.de>
13542 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
13545 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
13547 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
13548 arrays instead of numbered variables.
13550 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
13552 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
13553 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
13555 2018-07-13 Richard Biener <rguenther@suse.de>
13558 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
13559 instead of get_context_die.
13561 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
13562 Richard Biener <rguenther@suse.de>
13564 PR middle-end/86489
13565 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
13566 that the loop latch destination where phi is defined.
13568 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
13570 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
13571 (riscv_expand_epilogue): Add assertion to check interrupt mode.
13572 (riscv_set_current_function): Extract getting interrupt type to new
13574 (riscv_get_interrupt_type): New function.
13575 (riscv_merge_decl_attributes): New function, checking interrupt type is
13577 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
13579 2018-07-12 Paul Koning <ni1d@arrl.net>
13581 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
13584 2018-07-12 Paul Koning <ni1d@arrl.net>
13586 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
13587 zero reference, add doloop_end instead.
13588 * doc/md.texi (decrement_and_branch_until_zero): Remove.
13589 (Looping patterns): Remove decrement_and_branch_until_zero. Add
13590 detail for doloop_end.
13592 2018-07-12 Martin Sebor <msebor@redhat.com>
13595 * attribs.c (decl_attributes): Reject conflicting attributes before
13596 calling attribute handlers.
13598 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
13600 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
13602 (gcc::dump_manager::get_dump_file_name): likewise.
13603 (dump_begin): Likewise.
13604 * dumpfile.h (dump_begin): Update prototype.
13605 (gcc::dump_manager::get_dump_file_name,
13606 gcc::dump_manager::get_dump_file_name): Update prototype.
13608 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
13610 * internal-fn.h (vectorizable_internal_fn_p): New function.
13611 * tree-vect-slp.c (compatible_calls_p): Likewise.
13612 (vect_build_slp_tree_1): Remove nops argument. Handle calls
13613 to internal functions.
13614 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
13616 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
13618 * fold-const.h (inverse_conditions_p): Declare.
13619 * fold-const.c (inverse_conditions_p): New function.
13620 * match.pd: Use inverse_conditions_p. Add folds of view_converts
13621 that test the inverse condition of a conditional internal function.
13622 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
13623 * internal-fn.c (internal_fn_mask_index): Handle conditional
13624 internal functions.
13625 (vectorized_internal_fn_supported_p): New function.
13626 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
13627 (any_pred_load_store): Replace with...
13628 (need_to_predicate): ...this new variable.
13629 (redundant_ssa_names): New variable.
13630 (ifcvt_can_use_mask_load_store): Move initial checks to...
13631 (ifcvt_can_predicate): ...this new function. Handle tree codes
13632 for which a conditional internal function exists.
13633 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
13634 instead of ifcvt_can_use_mask_load_store. Update after variable
13636 (predicate_load_or_store): New function, split out from
13637 predicate_mem_writes.
13638 (check_redundant_cond_expr): New function.
13639 (value_available_p): Likewise.
13640 (predicate_rhs_code): Likewise.
13641 (predicate_mem_writes): Rename to...
13642 (predicate_statements): ...this. Use predicate_load_or_store
13643 and predicate_rhs_code.
13644 (combine_blocks, tree_if_conversion): Update after above name changes.
13645 (ifcvt_local_dce): Handle redundant_ssa_names.
13646 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
13647 general conditional functions.
13648 * tree-vect-stmts.c (vectorizable_call): Likewise.
13650 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
13651 Alan Hayward <alan.hayward@arm.com>
13652 David Sherwood <david.sherwood@arm.com>
13654 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
13655 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
13656 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
13657 plus and minus and convert them into IFN_COND_FMA-based sequences.
13658 (convert_mult_to_fma): Handle conditional plus and minus.
13660 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
13662 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
13663 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
13664 (cond_fnms_optab): New optabs.
13665 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
13666 internal functions.
13667 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
13668 * internal-fn.h (get_conditional_internal_fn): Declare.
13669 (get_unconditional_internal_fn): Likewise.
13670 * internal-fn.c (cond_ternary_direct): New macro.
13671 (expand_cond_ternary_optab_fn): Likewise.
13672 (direct_cond_ternary_optab_supported_p): Likewise.
13673 (FOR_EACH_COND_FN_PAIR): Likewise.
13674 (get_conditional_internal_fn): New function.
13675 (get_unconditional_internal_fn): Likewise.
13676 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
13677 (gimple_match_op::gimple_match_op): Add a new overload for 5
13679 (gimple_match_op::set_op): Likewise.
13680 (gimple_resimplify5): Declare.
13681 * genmatch.c (decision_tree::gen): Generate simplifications for
13683 * gimple-match-head.c (gimple_simplify): Define an overload for
13684 5 operands. Handle calls with 5 arguments in the top-level overload.
13685 (convert_conditional_op): Handle conversions from unconditional
13686 internal functions to conditional ones.
13687 (gimple_resimplify5): New function.
13688 (build_call_internal): Pass a fifth operand.
13689 (maybe_push_res_to_seq): Likewise.
13690 (try_conditional_simplification): Try converting conditional
13691 internal functions to unconditional internal functions.
13692 Handle 3-operand unconditional forms.
13693 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
13694 Define ternary equivalents of the current rules for binary conditional
13695 internal functions.
13696 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
13697 ternary operations.
13698 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
13699 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
13700 (optab): Handle them.
13701 (SVE_COND_FP_TERNARY): New int iterator.
13702 (sve_fmla_op, sve_fmad_op): New int attributes.
13703 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
13704 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
13705 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
13707 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
13709 * target.def (preferred_else_value): New target hook.
13710 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
13711 * doc/tm.texi: Regenerate.
13712 * targhooks.h (default_preferred_else_value): Declare.
13713 * targhooks.c (default_preferred_else_value): New function.
13714 * internal-fn.h (conditional_internal_fn_code): Declare.
13715 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
13716 (get_conditional_internal_fn): Use it.
13717 (conditional_internal_fn_code): New function.
13718 * gimple-match.h (gimple_match_cond): New struct.
13719 (gimple_match_op): Add a cond member function.
13720 (gimple_match_op::gimple_match_op): Update all forms to take a
13722 * genmatch.c (expr::gen_transform): Use the same condition as res_op
13723 for the suboperation, but don't specify a particular else_value.
13724 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
13725 (visit_nary_op, visit_reference_op_load): Pass
13726 gimple_match_cond::UNCOND to the gimple_match_op constructor.
13727 * gimple-match-head.c: Include tree-eh.h
13728 (convert_conditional_op): New function.
13729 (maybe_resimplify_conditional_op): Likewise.
13730 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
13731 (gimple_resimplify2): Likewise.
13732 (gimple_resimplify3): Likewise.
13733 (gimple_resimplify4): Likewise.
13734 (maybe_push_res_to_seq): Return null for conditional operations.
13735 (try_conditional_simplification): New function.
13736 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
13738 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
13740 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
13742 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
13744 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
13746 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
13748 (hash_tree): Do not hash DECL_FCONTEXT
13749 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
13750 Do not stream DECL_FCONTEXT.
13751 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
13752 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
13754 2018-07-12 Richard Biener <rguenther@suse.de>
13757 * dwarf2out.c (gen_block_die): Only output blocks when they have
13758 at least one !DECL_IGNORED_P variable.
13760 2018-07-12 Richard Biener <rguenther@suse.de>
13763 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
13764 Remove -mieee-fp handling.
13766 2018-07-12 Richard Biener <rguenther@suse.de>
13768 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
13769 left-over from last patch.
13771 2018-07-12 Jakub Jelinek <jakub@redhat.com>
13773 PR tree-optimization/86492
13774 * gimple-ssa-store-merging.c
13775 (imm_store_chain_info::coalesce_immediate_stores): Call
13776 check_no_overlap even for the merge_overlapping case. Formatting fix.
13778 2018-07-12 Richard Biener <rguenther@suse.de>
13780 PR middle-end/86479
13781 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
13782 move possibly trapping operations into the conditional.
13784 2018-07-12 Richard Biener <rguenther@suse.de>
13786 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
13787 (vn_lookup_simplify_result): Remove recursion limit applied
13789 (vn_nary_build_or_lookup_1): Adjust.
13790 (try_to_simplify): Likewise.
13791 * gimple-match-head.c (gimple_resimplify1): Instead apply one
13793 (gimple_resimplify2): Likewise.
13794 (gimple_resimplify3): Likewise.
13795 (gimple_resimplify4): Likewise.
13797 2018-07-11 Jakub Jelinek <jakub@redhat.com>
13799 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
13800 Use __mmask64 type instead of __mmask8 for __M argument.
13801 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
13802 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
13804 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
13805 __mmask16 for __M argument.
13806 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
13807 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
13808 to __mmask16 instead of __mmask8.
13809 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
13810 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
13811 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
13812 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
13813 instead of __mmask16 for __U argument.
13814 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
13815 __mmask16 instead of __mmask8 for __U argument.
13816 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
13818 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
13820 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
13822 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
13824 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
13826 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
13828 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
13830 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
13832 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
13834 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
13836 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
13837 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
13838 return type as well as __M argument type and all casts from __mmask8
13840 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
13841 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
13842 return type as well as __M argument type and all casts from __mmask8
13844 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
13845 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
13846 return type as well as __M argument type and all casts from __mmask8
13848 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
13849 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
13850 return type as well as __M argument type and all casts from __mmask8
13852 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
13853 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
13856 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
13858 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
13859 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
13862 2018-07-11 Paul Koning <ni1d@arrl.net>
13864 * doc/md.texi (define_subst): Document how multiple occurrences of
13865 the same argument in the replacement pattern are handled.
13867 2018-07-11 Paul Koning <ni1d@arrl.net>
13869 * doc/extend.texi (Common Variable Attributes): Move "mode" into
13870 alphabetical order.
13871 (Common Type Attributes): Add "mode" attribute.
13873 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
13875 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
13876 stream DECL_ORIGINAL_TYPE.
13877 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
13878 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
13879 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
13880 Do not walk original type.
13881 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
13883 (write_ts_decl_non_common_tree_pointers): Do not stream
13885 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
13886 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
13888 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
13890 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
13891 thread twice from the same starting edge.
13893 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
13895 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
13896 * gimple.c (gimple_call_nonnull_result_p): ...here...
13897 (gimple_call_nonnull_arg): ...and here.
13898 * gimple.h (gimple_call_nonnull_result_p): New.
13899 (gimple_call_nonnull_arg): New.
13901 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
13903 * config/arm/arm-cpus.in: Move information from fpu field of each
13904 cpu definition to the isa field.
13905 * config/arm/parsecpu.awk (fpu): Delete match rule.
13906 (gen_comm_data): Don't add bits from the CPU's FPU entry.
13908 2018-07-11 Richard Biener <rguenther@suse.de>
13911 * dwarf2out.c (init_sections_and_labels): Use
13912 output_asm_line_debug_info consistently.
13913 (dwarf2out_early_finish): Likewise.
13914 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
13917 2018-07-11 Richard Biener <rguenther@suse.de>
13919 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
13920 Rework father_bb setting in a way to avoid propagating constants
13921 multiple times on a loop body.
13923 2018-07-10 Mark Wielaard <mark@klomp.org>
13926 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
13928 2018-07-10 Richard Biener <rguenther@suse.de>
13930 * hash-map.h (hash_map::iterator::operator*): Return
13931 references to key and value.
13933 2018-07-10 Jakub Jelinek <jakub@redhat.com>
13936 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
13937 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
13938 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
13939 (gimplify_omp_for): For composite loops, move outer
13940 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
13941 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
13942 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
13943 TREE_LIST for both the original class iterator and the "last" helper
13944 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
13945 loop, remember has_decl_expr from outer composite loops for the
13946 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
13948 2018-07-09 Martin Sebor <msebor@redhat.com>
13950 PR middle-end/77357
13951 PR middle-end/86428
13952 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
13953 accessing implicitly initialized array elements.
13954 * expr.c (string_constant): Handle string initializers of
13955 character arrays within aggregates.
13956 * gimple-fold.c (fold_array_ctor_reference): Add argument.
13957 Store element offset. As a special case, handle zero size.
13958 (fold_nonarray_ctor_reference): Same.
13959 (fold_ctor_reference): Add argument. Store subobject offset.
13960 * gimple-fold.h (fold_ctor_reference): Add argument.
13962 2018-07-09 Paul Koning <ni1d@arrl.net>
13964 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
13965 (pdp11_insn_cost): New function.
13966 (pdp11_md_asm_adjust): New function.
13967 (TARGET_INVALID_WITHIN_DOLOOP): Define.
13968 (pdp11_rtx_costs): Update to match machine better.
13969 (output_addr_const_pdp11): Correct format mismatch warnings.
13970 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
13971 * config/pdp11/pdp11.md: General change to add base_cost and/or
13972 length attributes for use by new pdp11_insn_cost function.
13973 (MIN_BRANCH): Correct definition.
13975 (doloop_end): Use standard pattern name for looping pattern.
13976 (doloop_end_nocc): New.
13977 (movsf): Add another constraint alternative.
13978 (zero_extendqihi2): Add constraint alternatives for not in place
13980 (zero_extendhisi2): Remove.
13981 (shift patterns): Add CC handling variants.
13985 (define_peephole2): New peephole to recognize mov that sets CC for
13988 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13990 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
13991 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
13994 2018-07-09 Jakub Jelinek <jakub@redhat.com>
13997 * real.c (real_nextafter): Return true if result is denormal.
13999 2018-07-09 Martin Liska <mliska@suse.cz>
14001 * common.opt: Add back wrongly removed attribute.
14003 2018-07-09 Richard Biener <rguenther@suse.de>
14006 * dwarf2out.c (gen_block_die): For an early generated DIE
14007 always output high/low PC attributes.
14009 2018-07-09 Tom de Vries <tdevries@suse.de>
14011 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
14012 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
14013 onto VAR_DECL with abstract origin.
14015 2018-07-07 Jim Wilson <jimw@sifive.com>
14017 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
14019 2018-07-07 Tom de Vries <tdevries@suse.de>
14021 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
14023 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
14025 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
14027 (combine_bound): Use wide-int overflow calculation instead of
14029 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
14031 * fold-const.c (int_const_binop_2): Same.
14032 (extract_muldiv_1): Same.
14033 (fold_div_compare): Same.
14034 (fold_abs_const): Same.
14036 * poly-int.h (add): Same.
14040 * predict.c (predict_iv_comparison): Same.
14041 * profile-count.c (slow_safe_scale_64bit): Same.
14042 * simplify-rtx.c (simplify_const_binary_operation): Same.
14043 * tree-chrec.c (tree_fold_binomial): Same.
14044 * tree-data-ref.c (split_constant_offset_1): Same.
14045 * tree-if-conv.c (idx_within_array_bound): Same.
14046 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
14047 * tree-ssa-phiopt.c (minmax_replacement): Same.
14048 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
14049 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
14050 * vr-values.c (vr_values::adjust_range_with_scev): Same.
14051 * wide-int.cc (wi::add_large): Same.
14052 (wi::mul_internal): Same.
14053 (wi::sub_large): Same.
14054 (wi::divmod_internal): Same.
14055 * wide-int.h: Change overflow type to overflow_type for neg, add,
14056 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
14057 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
14058 mul_internal, divmod_internal.
14059 (overflow_type): New enum.
14060 (accumulate_overflow): New.
14062 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
14064 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
14065 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
14067 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
14069 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
14070 argument is checked for zero before entering loop, avoid checking again.
14072 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
14074 * gimplify.h (generic_expr_could_trap_p): Set as global function.
14075 * gimplify.h (generic_expr_could_trap_p): Likwise.
14076 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
14078 2018-07-06 Jakub Jelinek <jakub@redhat.com>
14080 PR tree-optimization/86401
14081 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
14082 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
14083 (fold_bit_and_mask): ... here. New helper function for match.pd.
14084 * fold-const.h (fold_bit_and_mask): Declare.
14085 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
14087 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
14090 * target.def (translate_mode_attribute): New hook.
14091 * targhooks.h (default_translate_mode_attribute): Declare.
14092 * targhooks.c (default_translate_mode_attribute): New function.
14093 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
14094 * doc/tm.texi: Regenerate.
14095 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
14096 (rs6000_translate_mode_attribute): New function.
14098 2018-07-06 Paul Koning <ni1d@arrl.net>
14100 * doc/md.texi (define_split): Document DONE and FAIL.
14101 (define_peephole2): Ditto.
14103 2018-07-05 Jeff Law <law@redhat.com>
14105 PR tree-optimization/86010
14106 * tree-ssa-dse.c (compute_trims): More aggressively trim at
14107 both the head and tail of mem* and str* calls.
14109 2018-07-05 Jim Wilson <jimw@sifive.com>
14111 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
14113 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
14115 * config/aarch64/aarch64-simd.md: correct flags text for
14116 MIN_EXPR replacement.
14118 2018-07-05 James Clarke <jrtc27@jrtc27.com>
14120 * configure: Regenerated.
14122 2018-07-05 Carl Love <cel@us.ibm.com>
14124 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
14125 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
14126 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
14127 VSX_BUILTIN_DOUBLEL_V4SF.
14129 2018-07-05 Martin Sebor <msebor@redhat.com>
14132 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
14133 than its domain to compute its the upper bound of a char array.
14135 2018-07-05 Nathan Sidwell <nathan@acm.org>
14137 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
14138 * doc/cpp.texi: Update comment.
14139 * doc/tm.texi: Rebuilt.
14140 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
14141 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
14142 * doc/extend.texi (Backwards Compatibility): Clarify it is system
14143 headers affected by extern "C".
14144 * system.h: Poison NO_IMPLICIT_EXTERN_C.
14145 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
14146 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
14147 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
14148 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
14149 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
14150 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
14151 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
14152 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
14153 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
14154 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
14155 config/sparc/sp64-elf.h, config/spu/spu.h,
14156 config/stormy16/stormy16.h, config/v850/v850.h,
14157 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
14158 define NO_IMPLICIT_EXTERN_C.
14159 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
14161 2018-07-05 Tamar Christina <tamar.christina@arm.com>
14164 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
14165 instead of GET_MODE_SIZE when comparing Units.
14167 2018-07-05 Tamar Christina <tamar.christina@arm.com>
14170 * rtlanal.c (set_noop_p): Constrain on mode change,
14171 include hard-reg-set.h
14173 2018-07-05 Tamar Christina <tamar.christina@arm.com>
14175 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
14177 2018-07-05 Jakub Jelinek <jakub@redhat.com>
14180 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
14183 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
14185 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
14187 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
14190 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
14192 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
14194 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
14196 PR middle-end/86380
14197 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
14199 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
14201 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
14202 neg_*_op* variables.
14204 2018-07-04 Martin Liska <mliska@suse.cz>
14206 * tree-switch-conversion.c: Define
14207 max_ratio_for_speed and max_ratio_for_size constants.
14209 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
14210 Martin Liska <mliska@suse.cz>
14212 PR middle-end/66240
14215 * common.opt: Rename align options with 'str_' prefix.
14216 * common/config/i386/i386-common.c (set_malign_value): New
14218 (ix86_handle_option): Use it to set -falign-* options/
14219 * config/aarch64/aarch64-protos.h (struct tune_params): Change
14220 type from int to string.
14221 * config/aarch64/aarch64.c: Update default values from int
14223 * config/alpha/alpha.c (alpha_override_options_after_change):
14225 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
14226 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
14227 max skip conditionally.
14228 * config/i386/freebsd.h (SUBALIGN_LOG): New.
14229 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
14230 max skip conditionally.
14231 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
14232 max skip conditionally.
14233 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
14234 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
14235 max skip conditionally.
14236 * config/i386/i386.c (struct ptt): Change type from int to
14238 (ix86_default_align): Set default values.
14239 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
14240 max skip conditionally.
14241 * config/i386/iamcu.h (SUBALIGN_LOG): New.
14242 (ASM_OUTPUT_MAX_SKIP_ALIGN):
14243 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
14244 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
14245 max skip conditionally.
14246 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
14247 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
14248 * config/i386/x86-64.h (SUBALIGN_LOG): New.
14249 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
14250 max skip conditionally.
14251 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
14252 * config/ia64/ia64.c (ia64_option_override): Set default values
14253 for alignment options.
14254 * config/m68k/m68k.c: Handle new str_align_* options.
14255 * config/mips/mips.c (mips_set_compression_mode): Change
14257 (mips_option_override): Set default values for options.
14258 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
14260 * config/rs6000/rs6000.c (rs6000_option_override_internal):
14262 * config/rx/rx.c (rx_option_override): Likewise.
14263 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
14264 (LABEL_ALIGN): Use align_labels_log.
14265 (LOOP_ALIGN): Use align_loops_align.
14266 * config/s390/s390.c (s390_asm_output_function_label): Use new
14268 * config/sh/sh.c (sh_override_options_after_change):
14269 Change type of constants.
14270 * config/spu/spu.c (spu_sched_init): Likewise.
14271 * config/sparc/sparc.c (sparc_option_override): Set default
14272 values for options.
14273 * config/visium/visium.c (visium_option_override): Likewise.
14274 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
14275 emit p2align format with last argument if it's not needed.
14276 * doc/invoke.texi: Document extended format of -falign-*.
14277 * final.c: Use align_labels alignment.
14278 * flags.h (struct target_flag_state): Change type to use
14280 (struct align_flags_tuple): New.
14281 (struct align_flags): Likewise.
14282 (align_loops_log): Redefine macro to use new types.
14283 (align_loops_max_skip): Redefine macro to use new types.
14284 (align_jumps_log): Redefine macro to use new types.
14285 (align_jumps_max_skip): Redefine macro to use new types.
14286 (align_labels_log): Redefine macro to use new types.
14287 (align_labels_max_skip): Redefine macro to use new types.
14288 (align_functions_log): Redefine macro to use new types.
14289 (align_loops): Redefine macro to use new types.
14290 (align_jumps): Redefine macro to use new types.
14291 (align_labels): Redefine macro to use new types.
14292 (align_functions): Redefine macro to use new types.
14293 (align_functions_max_skip): Redefine macro to use new types.
14294 (align_loops_value): New macro.
14295 (align_jumps_value): New macro.
14296 (align_labels_value): New macro.
14297 (align_functions_value): New macro.
14298 * function.c (invoke_set_current_function_hook): Propagate
14299 alignment values from flags to global variables default in
14301 * ipa-icf.c (sem_function::equals_wpa): Use
14302 cl_optimization_option_eq instead of memcmp.
14303 * lto-streamer.h (cl_optimization_stream_out): Support streaming
14305 (cl_optimization_stream_in): Likewise.
14306 * optc-save-gen.awk: Support strings in cl_optimization.
14307 * opth-gen.awk: Likewise.
14308 * opts.c (finish_options): Remove error checking of invalid
14310 (MAX_CODE_ALIGN): Remove.
14311 (MAX_CODE_ALIGN_VALUE): Likewise.
14312 (parse_and_check_align_values): New function.
14313 (check_alignment_argument): Likewise.
14314 (common_handle_option): Use check_alignment_argument.
14315 * opts.h (parse_and_check_align_values): Declare.
14316 * toplev.c (init_alignments): Remove.
14317 (read_log_maxskip): New.
14318 (parse_N_M): Likewise.
14319 (parse_alignment_opts): Likewise.
14320 (backend_init_target): Remove usage of init_alignments.
14321 * toplev.h (parse_alignment_opts): Declare.
14322 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
14324 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
14325 * tree.c (cl_option_hasher::equal): New.
14326 * varasm.c: Use new global macros.
14328 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
14330 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
14331 Use a simpler align directive also if MAXSKIP = ALIGN-1.
14332 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
14333 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
14334 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
14335 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
14336 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
14337 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
14338 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
14339 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
14340 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
14341 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
14342 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
14344 2018-07-04 Martin Liska <mliska@suse.cz>
14345 Jonathan Wakely <jwakely@redhat.com>
14347 * coverage.c: Use correct type.
14348 * doc/invoke.texi: Language correction.
14350 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
14353 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
14354 ENDBRANCH for non-tail call which may return via indirect branch.
14355 * doc/extend.texi: Document indirect_return attribute.
14357 2018-07-03 Martin Sebor <msebor@redhat.com>
14359 PR tree-optimization/86274
14360 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
14362 (format_floating): Correct handling of infinities and NaNs.
14364 2018-07-03 Martin Sebor <msebor@redhat.com>
14366 * print-tree.c (print_real_cst): New function.
14367 (print_node_brief): Call it.
14368 (print_node): Ditto.
14370 2018-07-03 Jeff Law <law@redhat.com>
14372 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
14373 into a single pattern.
14375 * config/h8300/h8300.md (ors code_iterator): New.
14376 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
14377 a single pattern and single splitter.
14378 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
14379 (iorqi3_1, xorqi3_1): Likewise.
14380 (iorqi3, xorqi3 expanders): Similarly.
14382 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
14383 (movmd_internal) into a single pattern using the P mode iterator.
14384 (movmd splitters): Similarly.
14385 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
14386 (movsd splitters): Similarly.
14388 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
14389 ADDB, ADDW and ADDL into a single ADD attribute which selects the
14390 right table based on the size of the operand.
14391 * config/h8300/h8300.md (length_table): Corresponding changes. All
14392 references to "addb", "addw" and "addl" changed to "add".
14393 (btst patterns): Merge two variants into a single pattern.
14394 (tstqi, tsthi): Likewise.
14395 (addhi3_incdec, addsi3_incdec): Likewise.
14396 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
14397 (mulhi3, mulsi3): Likewise.
14398 (udivhi3, udivsi3): Likewise.
14399 (divhi3, divsi3): Likewise.
14400 (andorqi3, andorhi3, andorsi3): Likewise.
14402 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
14405 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
14406 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
14408 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
14410 PR tree-optimization/85694
14411 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
14412 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
14414 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
14415 (<u>avg<mode>3_ceil): New patterns.
14417 2018-07-03 David Malcolm <dmalcolm@redhat.com>
14419 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
14420 scan-tree-dump directive.
14421 * gcc.dg/vect/slp-perm-2.c: Likewise.
14422 * gcc.dg/vect/slp-perm-3.c: Likewise.
14423 * gcc.dg/vect/slp-perm-5.c: Likewise.
14424 * gcc.dg/vect/slp-perm-6.c: Likewise.
14425 * gcc.dg/vect/slp-perm-7.c: Likewise.
14426 * gcc.dg/vect/slp-perm-8.c: Likewise.
14428 2018-07-03 Marek Polacek <polacek@redhat.com>
14430 PR middle-end/86202
14431 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
14433 2018-07-03 Richard Biener <rguenther@suse.de>
14436 * tree-ssa-structalias.c (find_func_clobbers): Properly
14437 handle indirect calls.
14439 2018-07-03 Jeff Law <law@redhat.com>
14441 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
14442 (shifts): New code iterator.
14443 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
14444 expander. Fix HImode handling on H8/SX.
14445 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
14446 (subqi3, subhi3, subsi3 expanders): Likewise.
14447 (andqi3, andhi3, andsi3 expanders): Likewise.
14448 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
14449 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
14450 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
14451 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
14452 (zero_extendqihi2, zero_extendqisi2): Likewise.
14453 (extendqihi2, extendqisi2): Likewise.
14454 (rotlqi3, rotlhi3, rotlsi3): Likewise.
14455 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
14456 (rotlqi3_1, rotlhi3_1): Likewise.
14457 (logicalhi3_sn, logicalsi3_sn): Likewise.
14458 (logicalhi3, logicalsi3): Likewise.
14460 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
14462 * tree-vect-patterns.c (vect_recog_rotate_pattern)
14463 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
14464 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
14465 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
14466 type to append_pattern_def_seq instead of creating a stmt_vec_info
14468 (build_mask_conversion): Likewise. Remove vinfo argument.
14469 (vect_add_conversion_to_patterm): Likewise, renaming to...
14470 (vect_add_conversion_to_pattern): ...this.
14471 (vect_recog_mask_conversion_pattern): Update call to
14472 build_mask_conversion. Pass the vector type to
14473 append_pattern_def_seq here too.
14474 (vect_recog_gather_scatter_pattern): Update call to
14475 vect_add_conversion_to_pattern.
14477 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
14479 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
14480 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
14481 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
14482 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
14483 STMT_VINFO_PATTERN_DEF_SEQ to null here.
14484 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
14485 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
14486 append_pattern_def_seq instead of new_pattern_def_seq.
14487 (vect_recog_divmod_pattern): Do both of the above.
14488 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
14491 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
14493 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
14494 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
14495 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
14496 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
14497 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
14498 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
14499 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
14500 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
14501 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
14502 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
14503 parameter with a single stmt_vec_info.
14504 (vect_recog_func_ptr): Likewise.
14505 (vect_recog_gather_scatter_pattern): Likewise, folding in...
14506 (vect_try_gather_scatter_pattern): ...this.
14507 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
14508 the stmt_vec_info of the statement to be matched. Don't clear
14509 STMT_VINFO_RELATED_STMT.
14510 (vect_pattern_recog): Update call accordingly.
14512 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
14514 PR tree-optimization/85694
14515 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
14516 (uavgM3_ceil): Document new optabs.
14517 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
14518 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
14520 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
14521 (savg_ceil_optab): New optabs.
14522 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
14523 (vect_vect_recog_func_ptrs): Add it.
14524 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
14525 constant directly from the associated lhs.
14527 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
14529 * tree-vect-patterns.c (vect_split_statement): New function.
14530 (vect_convert_input): Use it to try to split an existing cast.
14532 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
14534 * poly-int.h (print_hex): New function.
14535 * dumpfile.h (dump_dec, dump_hex): Declare.
14536 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
14537 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
14538 min_input_precision, operation_precision and operation_sign.
14539 * tree-vect-patterns.c (vect_get_range_info): New function.
14540 (vect_same_loop_or_bb_p, vect_single_imm_use)
14541 (vect_operation_fits_smaller_type): Delete.
14542 (vect_look_through_possible_promotion): Add an optional
14543 single_use_p parameter.
14544 (vect_recog_over_widening_pattern): Rewrite to use new
14545 stmt_vec_info infomration. Handle one operation at a time.
14546 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
14547 (vect_truncatable_operation_p, vect_set_operation_type)
14548 (vect_set_min_input_precision): New functions.
14549 (vect_determine_min_output_precision_1): Likewise.
14550 (vect_determine_min_output_precision): Likewise.
14551 (vect_determine_precisions_from_range): Likewise.
14552 (vect_determine_precisions_from_users): Likewise.
14553 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
14554 (vect_vect_recog_func_ptrs): Put over_widening first.
14556 (vect_pattern_recog): Call vect_determine_precisions.
14558 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
14560 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
14561 statements that have been replaced by further pattern statements.
14562 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
14564 2018-07-03 Richard Biener <rguenther@suse.de>
14566 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
14567 always set *dt. Dump vectype in vectype overload.
14568 * dumpfile.h (dump_gimple_expr): New function.
14569 (dump_gimple_expr_loc): Likewise.
14570 * dumpfile.c (dump_gimple_expr): New function.
14571 (dump_gimple_expr_loc): Likewise.
14573 2018-07-02 Jeff Law <law@redhat.com>
14575 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
14576 the H8/300, H8/300H and H8/S variants into a single pattern.
14577 (movhi_h8300, movqi_h8300hs): Similarly.
14578 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
14579 (QHI mode iterator): New.
14581 * config/h8300/h8300.md: Remove trailing whitespace.
14583 2018-07-02 Jim Wilson <jimw@sifive.com>
14585 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
14586 instead of emit_insn for interrupt returns.
14587 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
14588 (riscv_sret, riscv_uret): Likewise.
14590 2018-07-02 David Malcolm <dmalcolm@redhat.com>
14592 * pretty-print.c (selftest::test_pp_format): Move save and restore
14593 of quotes to class auto_fix_quotes, and add an instance.
14594 * selftest.c: Include "intl.h".
14595 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
14596 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
14597 * selftest.h (selftest::auto_fix_quotes): New class.
14599 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
14601 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
14602 (aarch64_sve_prepare_conditional_op): Remove.
14603 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
14604 Allow aarch64_simd_reg_or_zero as select operand; remove
14605 the aarch64_sve_prepare_conditional_op call.
14606 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
14607 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
14608 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
14609 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
14610 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
14611 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
14612 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
14613 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
14614 and a splitters to match all of the *_any patterns.
14615 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
14617 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
14618 (SVE_COND_FP_BINARY_REV): Remove.
14619 (sve_int_op_rev, sve_fp_op_rev): New.
14620 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
14621 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
14622 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
14623 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
14624 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
14625 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
14626 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
14627 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
14628 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
14630 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
14631 Remove match_dup 1 from the inner unspec.
14632 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
14634 * config/aarch64/aarch64.md (movprfx): New attr.
14635 (length): Default movprfx to 8.
14636 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
14637 (*madd<SVE_I>, *msub<SVE_I): Likewise.
14638 (*<su>mul<SVE_I>3_highpart): Likewise.
14639 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
14640 (*v<ASHIFT><SVE_I>3): Likewise.
14641 (*<su><MAXMIN><SVE_I>3): Likewise.
14642 (*<su><MAXMIN><SVE_F>3): Likewise.
14643 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
14644 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
14645 (*div<SVE_F>4): Likewise.
14647 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
14649 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
14652 2018-07-02 Richard Biener <rguenther@suse.de>
14654 PR tree-optimization/86363
14655 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
14656 memset argument refers to a non-variable address.
14658 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
14660 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
14661 {PLUS,MINUS}_EXPR code to...
14662 (adjust_symbolic_bound): ...here,
14663 (combine_bound): ...here,
14664 (set_value_range_with_overflow): ...and here.
14666 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
14668 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
14670 (extract_range_from_abs_expr): ...here.
14672 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
14674 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
14675 -fno-omit-frame-pointer when not optimizing.
14677 2018-07-02 Martin Liska <mliska@suse.cz>
14680 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
14681 (propagate_nothrow): Likewise.
14683 2018-07-02 Martin Liska <mliska@suse.cz>
14686 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
14688 2018-07-02 David Malcolm <dmalcolm@redhat.com>
14690 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
14691 function in r262149, changing "loc" param from source_location to
14692 const dump_location_t &.
14693 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
14694 declaration, as above.
14696 2018-07-01 Paul Koning <ni1d@arrl.net>
14698 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
14699 -munit-asm, -mgnu-asm, -mdec-asm.
14700 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
14701 (pdp11_output_labelref): New.
14702 (pdp11_output_def): New.
14703 (pdp11_output_addr_vec_elt): New.
14704 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
14705 %# and %@ format codes.
14706 (pdp11_option_override): New.
14707 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
14708 (pdp11_output_ident): New.
14709 (pdp11_asm_named_section): New.
14710 (pdp11_asm_init_sections): New.
14711 (pdp11_file_start): New.
14712 (pdp11_file_end): New.
14713 (output_ascii): Use .ascii/.asciz for -mdec-asm.
14714 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
14715 %o, like %c but octal.
14716 (pdp11_option_override): New.
14717 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
14719 (DATA_SECTION_ASM_OP): Ditto.
14720 (READONLY_DATA_SECTION_ASM_OP): New.
14721 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
14722 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
14723 (ASM_OUTPUT_LABELREF): Ditto.
14724 (ASM_OUTPUT_DEF): Ditto.
14725 (ASM_OUTPUT_EXTERNAL): New.
14726 (ASM_OUTPUT_SOURCE_FILENAME): New.
14727 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
14728 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
14729 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
14730 %# and %@ format codes.
14731 * config/pdp11/pdp11.opt (mgnu-asm): New.
14732 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
14733 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
14734 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
14736 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
14738 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
14739 dereferencing path[] beyond its length.
14741 (debug_all_paths): New.
14742 (rewire_first_differing_edge): New.
14743 (adjust_paths_after_duplication): New.
14744 (duplicate_thread_path): Call adjust_paths_after_duplication.
14746 (thread_through_all_blocks): Add new argument to
14747 duplicate_thread_path.
14749 2018-06-30 Jim Wilson <jimw@sifive.com>
14751 * config/riscv/predicates.md (p2m1_shift_operand): New.
14752 (high_mask_shift_operand): New.
14753 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
14754 pattern using p2m1_shift_operand.
14755 (lshsi3_zero_extend_3+2): New combiner pattern using
14756 high_mask_shift_operand.
14758 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
14760 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
14762 (vect_recog_rotate_pattern): ...here.
14763 (vect_convert_input): Try to insert casts of invariants in the
14765 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
14766 preheader to be empty.
14768 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
14770 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
14771 vector type. If given, install it in the new statement's
14772 STMT_VINFO_VECTYPE.
14773 (vect_element_precision): New function.
14774 (vect_unpromoted_value): New struct.
14775 (vect_unpromoted_value::vect_unpromoted_value): New function.
14776 (vect_unpromoted_value::set_op): Likewise.
14777 (vect_look_through_possible_promotion): Likewise.
14778 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
14779 (vect_widened_op_tree, vect_convert_input): Likewise.
14780 (vect_convert_inputs, vect_convert_output): Likewise.
14781 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
14782 to handle the optional cast of the multiplication result and
14783 vect_widened_op_tree to detect the widened multiplication itself.
14784 Do not require the input and output of promotion casts to have
14785 the same sign, but base the signedness of the operation on the
14786 input rather than the result. If the pattern includes two
14787 promotions, check that those promotions have the same sign.
14788 Do not restrict the MULT_EXPR handling to a double-width result;
14789 handle quadruple-width results and wider. Use vect_convert_inputs
14790 to convert the inputs to the common type.
14791 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
14792 to handle the optional cast of the ABS result. Also allow a sign
14793 change or a sign extension between the ABS and MINUS.
14794 Use vect_widened_op_tree to detect the widened subtraction and use
14795 vect_convert_inputs to convert the inputs to the common type.
14796 (vect_handle_widen_op_by_const): Delete.
14797 (vect_recog_widen_op_pattern): New function.
14798 (vect_recog_widen_mult_pattern): Use it.
14799 (vect_recog_widen_shift_pattern): Likewise.
14800 (vect_recog_widen_sum_pattern): Use
14801 vect_look_through_possible_promotion to handle the promoted
14804 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
14806 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
14807 the containing gimple_seq *.
14808 * gimple-iterator.h (gsi_for_stmt): Declare it.
14809 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
14810 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
14811 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
14812 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
14813 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
14815 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
14817 (vect_mark_pattern_stmts): ...here. Handle cases in which the
14818 statement being replaced is part of an existing pattern
14819 definition sequence, inserting the new pattern statements before
14821 (vect_pattern_recog_1): Don't return a bool. If the statement
14822 is already part of a pattern, instead apply pattern matching
14823 to the pattern definition statements. Don't clear the
14824 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
14825 (vect_pattern_recog): Don't break after the first match;
14826 continue processing the pattern definition statements instead.
14827 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
14829 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
14831 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
14832 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
14833 (vect_recog_widen_sum_pattern): Use it.
14835 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
14837 * tree-vect-loop.c (vectorizable_reduction): Assert that the
14838 phi is not a pattern statement and has not been replaced by
14839 a pattern statement.
14840 * tree-vect-patterns.c (type_conversion_p): Don't check
14841 STMT_VINFO_IN_PATTERN_P.
14842 (vect_recog_vector_vector_shift_pattern): Likewise.
14843 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
14844 the pattern statement rather than the original statement; check
14845 directly for a WIDEN_MULT_EXPR here.
14846 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
14847 vect_is_simple_use to return the pattern statement rather
14848 than the original statement; use is_pattern_stmt_p to check
14849 for such a pattern statement.
14850 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
14851 to return the pattern statement rather than the original statement;
14852 don't do the same transformation here.
14853 (vect_is_simple_use): If the defining statement has been replaced
14854 by a pattern statement, return the pattern statement instead.
14855 Remove the corresponding (local) transformation from the vectype
14858 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
14860 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
14861 end and default to null.
14862 * tree-vect-loop.c (vect_create_epilog_for_reduction)
14863 (vectorizable_reduction): Update calls accordingly, dropping the
14864 gimple ** argument if the passed-back statement isn't needed.
14865 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
14866 (vect_recog_rotate_pattern): Likewise.
14867 (vect_recog_mask_conversion_pattern): Likewise.
14868 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
14869 (vect_mask_constant_operand_p): Likewise.
14870 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
14871 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
14872 (get_group_load_store_type, get_load_store_type): Likewise.
14873 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
14874 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
14875 (vectorizable_conversion, vectorizable_assignment): Likewise.
14876 (vectorizable_shift, vectorizable_operation): Likewise.
14877 (vectorizable_store, vect_is_simple_cond): Likewise.
14878 (vectorizable_condition, vectorizable_comparison): Likewise.
14879 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
14880 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
14881 and move it to the end. Cope with null def_stmt_outs.
14883 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
14885 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
14887 2018-06-29 Jeff Law <law@redhat.com>
14889 * config/v850/v850.c (v850_legitimate_address_p): Handle large
14890 displacements for TARGET_V850E2V3 and newer.
14891 (TARGET_LRA_P): Remove. Defaults to LRA now.
14892 * config/v850/v850.md (sign23byte_load): Remove.
14893 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
14894 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
14896 2018-06-29 Martin Liska <mliska@suse.cz>
14899 * coverage.c (coverage_init): Mangle full path name.
14900 * doc/invoke.texi: Document the change.
14901 * gcov-io.c (mangle_path): New.
14902 * gcov-io.h (mangle_path): Likewise.
14903 * gcov.c (mangle_name): Use mangle_path for path mangling.
14905 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14907 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
14908 if starting source register is not even.
14910 2018-06-29 Martin Liska <mliska@suse.cz>
14912 PR tree-optimization/86263
14913 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
14914 Make edge redirection.
14916 2018-06-29 David Malcolm <dmalcolm@redhat.com>
14918 * dumpfile.c (dump_loc): Add indentation based on scope depth.
14919 (dump_scope_depth): New variable.
14920 (get_dump_scope_depth): New function.
14921 (dump_begin_scope): New function.
14922 (dump_end_scope): New function.
14923 * dumpfile.h (get_dump_scope_depth): New declaration.
14924 (dump_begin_scope): New declaration.
14925 (dump_end_scope): New declaration.
14926 (class auto_dump_scope): New class.
14927 (AUTO_DUMP_SCOPE): New macro.
14928 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
14931 2018-06-29 Richard Biener <rguenther@suse.de>
14933 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
14934 compute_all_dependences succeeds.
14935 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
14936 exceed --param loop-max-datarefs-for-datadeps.
14938 2018-06-29 Jakub Jelinek <jakub@redhat.com>
14940 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
14942 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
14945 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
14946 alternative 0 in preferred_for_speed attribute.
14948 2018-06-28 Paul Koning <ni1d@arrl.net>
14950 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
14951 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
14952 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
14953 * config/pdp11/pdp11.md: Correct "length" attribute calculation
14954 for shift insn patterns.
14956 2018-06-28 David Malcolm <dmalcolm@redhat.com>
14958 * cgraph.c (cgraph_node::get_body): Replace assignments to
14959 "dump_file" with calls to set_dump_file.
14960 * dumpfile.c (alt_dump_file): Make static, and group with...
14961 (alt_flags): ...this definition.
14962 (dumps_are_enabled): New variable.
14963 (refresh_dumps_are_enabled): New function.
14964 (set_dump_file): New function.
14965 (set_alt_dump_file): New function.
14966 (gcc::dump_manager::dump_start): Replace assignments to
14967 "dump_file" and "alt_dump_file" with calls to set_dump_file and
14969 (gcc::dump_manager::dump_finish): Likewise.
14970 * dumpfile.h (alt_dump_file): Delete decl.
14971 (dumps_are_enabled): New variable decl.
14972 (set_dump_file): New function decl.
14973 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
14975 * tree-nested.c (lower_nested_functions): Replace assignments to
14976 "dump_file" with calls to set_dump_file.
14978 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
14980 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
14981 goto_locus of each outgoing edge of each basic block.
14983 2018-06-28 Richard Biener <rguenther@suse.de>
14985 * dwarf2out.c (decl_scope_table): Remove.
14986 (push_decl_scope): Likewise.
14987 (pop_decl_scope): Likewise.
14988 (gen_type_die_for_member): Do not call push/pop_decl_scope.
14989 (gen_struct_or_union_type_die): Likewise.
14990 (gen_tagged_type_die): Likewise.
14991 (dwarf2out_init): Do not initialize decl_scope_table.
14992 (dwarf2out_c_finalize): Do not free it.
14994 2018-06-28 Richard Biener <rguenther@suse.de>
14996 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
14997 deciding whether to not re-use a DIE.
14999 2018-06-28 Richard Biener <rguenther@suse.de>
15001 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
15002 DW_AT_abstract_origin attribute.
15004 2018-06-28 Martin Liska <mliska@suse.cz>
15006 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
15007 Use newly introduced constants.
15008 * tree-switch-conversion.h (struct jump_table_cluster):
15009 Define max_ratio_for_size and max_ratio_for_speed.
15011 2018-06-28 Martin Liska <mliska@suse.cz>
15013 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
15014 Add new checking assert to catch invalid state.
15015 (jump_table_cluster::can_be_handled): Handle single case
15017 (jump_table_cluster::is_beneficial): Bail out for such case.
15018 (bit_test_cluster::find_bit_tests):
15019 Add new checking assert to catch invalid state.
15020 (bit_test_cluster::can_be_handled): Handle single case
15022 (bit_test_cluster::is_beneficial): Bail out for such case.
15023 (switch_decision_tree::analyze_switch_statement):
15026 2018-06-28 Martin Liska <mliska@suse.cz>
15028 * common.opt: Introduce -completion option.
15029 * gcc.c (driver_handle_option): Handle it.
15030 (driver::main): Print completions if completion
15032 * opt-suggestions.c (option_proposer::get_completions):
15034 (option_proposer::suggest_completion): Likewise.
15035 (option_proposer::find_param_completions): Likewise.
15036 (verify_autocompletions): Likewise.
15037 (test_completion_valid_options): Likewise.
15038 (test_completion_valid_params): Likewise.
15039 (in_completion_p): Likewise.
15040 (empty_completion_p): Likewise.
15041 (test_completion_partial_match): Likewise.
15042 (test_completion_garbage): Likewise.
15043 (opt_proposer_c_tests): Likewise.
15044 * opt-suggestions.h: Declare new functions.
15045 * opts.c (common_handle_option): Handle OPT__completion_.
15046 * selftest-run-tests.c (selftest::run_tests): Add
15047 opt_proposer_c_tests.
15048 * selftest.c (assert_str_startswith): New.
15049 * selftest.h (assert_str_startswith): Likewise.
15050 (opt_proposer_c_tests): New.
15051 (ASSERT_STR_STARTSWITH): Likewise.
15053 2018-06-28 Martin Liska <mliska@suse.cz>
15055 * Makefile.in: Add opt-suggestions.o.
15056 * gcc-main.c: Include opt-suggestions.h.
15057 * gcc.c (driver::driver): Likewise.
15058 (driver::~driver): Remove m_option_suggestions.
15059 (driver::build_option_suggestions): Moved to option_proposer.
15060 (driver::suggest_option): Likewise.
15061 (driver::handle_unrecognized_options): Use option_proposer.
15062 * gcc.h (class driver): Add new memver m_option_proposer.
15063 * opt-suggestions.c: New file.
15064 * opt-suggestions.h: New file.
15066 2018-06-28 Martin Liska <mliska@suse.cz>
15068 * vec.h (class auto_string_vec): New (moved from auto_argvec).
15069 (auto_string_vec::~auto_string_vec): Likewise.
15071 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
15073 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
15074 prevent_decl_creation_for_types fields up and add reset_location field.
15075 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
15076 statement if id->reset_location is true.
15077 (copy_edges_for_bb): Do not set goto_locus on the new edges if
15078 id->reset_location is true.
15079 (copy_phis_for_bb): Force input_location on the arguments if
15080 id->reset_location is true.
15081 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
15082 is set on the function to be inlined.
15084 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
15086 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
15088 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
15090 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
15091 registers for Pmode.
15092 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
15093 hard registers for the clobbered pseudo.
15095 2018-06-27 Paul Koning <ni1d@arrl.net>
15097 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
15098 mutually exclusive options.
15099 * config/pdp11/constraints.md (h): New constraint.
15100 (O): Update definition to match shift code generation.
15101 (D): New constraint.
15102 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
15104 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
15106 (output_jump): Change arguments.
15107 (pdp11_fixed_cc_regs): New function.
15108 (pdp11_cc_mode): Ditto.
15109 (pdp11_expand_shift): Ditto.
15110 (pdp11_assemble_shift): Ditto.
15111 (pdp11_small_shift): Ditto.
15112 (pdp11_branch_cost): Remove.
15113 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
15115 (pdp11_register_move_cost): Update for CC registers.
15116 (pdp11_rtx_costs): Add case for LSHIFTRT.
15117 (pdp11_output_jump): Add CCNZ mode conditional branches.
15118 (notice_update_cc_on_set): Remove.
15119 (pdp11_cc_mode): New function.
15120 (simple_memory_operand): Correct pre/post decrement case.
15121 (no_side_effect_operand): New function.
15122 (pdp11_regno_reg_class): Add CC_REGS class.
15123 (pdp11_fixed_cc_regs): New function.
15124 (pdp11_small_shift): New function.
15125 (pdp11_expand_shift): New function to expand shift insns.
15126 (pdp11_assemble_shift): New function to output shifts.
15127 (pdp11_branch_cost): Remove.
15128 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
15129 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
15130 (WCHAR_TYPE): Ditto.
15131 (PTRDIFF_TYPE): Ditto.
15132 (ADJUST_INSN_LENGTH): New macro.
15133 (FIXED_REGISTERS): Add CC registers.
15134 (CALL_USED_REGISTERS): Ditto.
15135 (reg_class): Ditto.
15136 (REG_CLASS_NAMES): Ditto.
15137 (REG_CLASS_CONTENTS): Ditto.
15138 (SELECT_CC_MODE): Use new function.
15139 (TARGET_FLAGS_REGNUM): New macro.
15140 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
15141 (cc0_reg_rtx): Remove.
15142 (CC_STATUS_MDEP): Remove.
15143 (CC_STATUS_MDEFP_INIT): Remove.
15144 (CC_IN_FPU): Remove.
15145 (NOTICE_UPDATE_CC): Remove.
15146 (REGISTER_NAMES): Add CC registers.
15147 (BRANCH_COST): Change to constant 1.
15148 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
15150 * config/pdp11/pdp11.opt (mbcopy): Remove.
15151 (mbcopy-builtin): Remove.
15152 (mbranch-cheap): Remove.
15153 (mbranch-expensive): Remove.
15154 * config/pdp11/predicates.md (expand_shift_operand): Update to
15155 match shift code generation.
15156 (ccnz_operator): New predicate.
15157 * doc/invoke.texi (PDP-11 Options): Remove deleted options
15158 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
15159 Remove non-existent option -mabshi, -mno-abshi. Document mutually
15161 * doc/md.texi (PDP-11): Document new D and h constraints. Update
15162 description of O constraint.
15164 2018-06-27 Jeff Law <law@redhat.com>
15165 Austin Law <austinklaw@gmail.com>
15167 * config/v850/v850.md (addsi3_set_flags): New pattern.
15168 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
15169 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
15170 (zero_extendhisi2_v850_set_flags): Likewise.
15171 (zero_extendqisi2_v850_set_flags): Likewise.
15172 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
15173 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
15174 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
15176 * config/v850/v850-protos.h (notice_update_cc): Remove.
15177 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
15178 (v850_print_operand): Handle 'D' and "d".
15179 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
15180 Add handling of arithmetic/logical operations compared against zero.
15181 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
15182 Do not look at v850_compare_op, instead get mode from last argument.
15183 (v850_gen_compare): Remove
15184 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
15185 after reload for prologue insns.
15186 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
15188 (construct_save_jarl): Likewise.
15189 (TARGET_FLAGS_REGNUM): Define.
15190 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
15191 (NOTICE_UPDATE_CC): Remove.
15192 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
15193 than cc0. Conditionalize on reload_completed.
15194 (cmpsi_insn, setfcc_insn): Likewise.
15195 (tst1 splitter): Turn into define_and_split which sets the flags
15197 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
15198 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
15199 (cstoresf4, cstoredf4): Clobber the flags.
15200 (cmpsi, cmpsf, cmpdf): Remove expanders.
15201 (setf_insn): Remove pattern.
15202 (addsi3): Turn into define_and_split which clobbers the flags after
15203 reload and a suitable pattern (addsi3_clobber_flags) for use after
15205 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
15206 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
15207 (ashrsi3, ashrsi3_v850e2): Likewise.
15208 (bins): Clobber the flags.
15209 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
15210 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
15211 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
15212 (call_value_internal_short, call_value_internal_long): Likewise.
15213 (callt_save_interrupt, callt_return_interrupt): Likewise.
15214 (save_interrupt, return_interrupt): Likewise.
15215 (callt_save_all_interrupt, save_all_interrupt): Likewise.
15216 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
15217 (restore_all_interrupt, _restore_all_interrupt): Likewise.
15218 (All FP comparisons): Only allow after reload has completed.
15220 (divh, divhu): Tweak output template.
15221 (branch_z_normal, branch_z_invert): Remove
15222 (branch_nz_normal, branch_nz_invert): Likewise.
15223 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
15225 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
15226 * config/v850/v850.c (notice_update_cc): Remove.
15227 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
15228 (CC_NO_CARRY): Likewise.
15229 (NOTICE_UPDATE_CC): Define to nothing.
15230 * config/v850/v850.md: Remove block comment on cc0 handling
15231 Remove "cc" attribute from all patterns. Remove cc_status handling
15232 from all patterns. Minor formatting fixes.
15234 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15236 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
15237 (cortex-a76.cortex-a55): Likewise.
15238 * config/aarch64/aarch64-tune.md: Regenerate.
15239 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
15240 cortex-a76.cortex-a55.
15242 2018-06-27 Jeff Law <law@redhat.com>
15244 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
15245 (MULTILIB_DIRNAMES): Similarly.
15247 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
15249 * gimple.h (gimple_return_retbnd): Delete.
15250 (gimple_return_set_retbnd): Likewise.
15251 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
15252 gimple_return_set_retbnd.
15253 * gimple-pretty-print.c (dump_gimple_return): Remove call to
15254 gimple_return_retbnd and adjust.
15255 * tree-inline.h (struct copy_body_data): Remove retbnd field.
15256 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
15257 Explicitly return NULL in a couple more cases. Move assertion
15258 on debug statements and remove unreachable code.
15259 (reset_debug_binding): Do not test id->retbnd.
15260 (expand_call_inline): Do not set it.
15262 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
15264 * configure.ac: Add --disable-gcov option.
15265 * configure: Regenerate.
15266 * Makefile.in: Honour @enable_gcov@.
15267 * doc/install.texi: Document --disable-gcov.
15269 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15271 * config/arm/arm-cpus.in (cortex-a76): New entry.
15272 (cortex-a76.cortex-a55): Likewise.
15273 * config/arm/arm-tables.opt: Regenerate.
15274 * config/arm/arm-tune.md: Likewise.
15275 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
15276 * doc/invoke.texi (ARM Options): Document cortex-a76 and
15277 cortex-a76.cortex-a55.
15279 2018-06-27 Tamar Christina <tamar.christina@arm.com>
15282 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
15284 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
15286 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
15288 (EPILOGUE_USES): Likewise.
15290 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
15292 * tree-inline.c (remap_location): New function extracted from...
15293 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
15294 (copy_phis_for_bb): ...here. Call remap_location.
15295 (copy_cfg_body): Adjust call to copy_edges_for_bb.
15297 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
15299 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
15300 unaligned vsx for 16B memset.
15302 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
15305 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
15306 ieee128_float_type_node to long_double_type_node unless
15307 TARGET_LONG_DOUBLE_128 is set.
15309 2018-06-26 David Malcolm <dmalcolm@redhat.com>
15311 * cfgloop.c (get_loop_location): Convert return type from
15312 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
15313 by implicit construction from rtx_insn *, and using
15314 dump_user_location_t::from_function_decl for the fallback case.
15315 * cfgloop.h (get_loop_location): Convert return type from
15316 location_t to dump_user_location_t.
15317 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
15318 dump_printf_loc to pass in a dump_location_t rather than a
15319 location_t, via the gimple stmt.
15320 * coverage.c (get_coverage_counts): Update calls to
15321 dump_printf_loc to pass in dump_location_t rather than a
15323 * doc/optinfo.texi (Dump types): Convert example of
15324 dump_printf_loc from taking "locus" to taking "insn". Update
15325 description of the "_loc" calls to cover dump_location_t.
15326 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
15328 (dump_user_location_t::dump_user_location_t): New constructors,
15329 from gimple *stmt and rtx_insn *.
15330 (dump_user_location_t::from_function_decl): New function.
15331 (dump_loc): Make static.
15332 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
15333 const dump_location_t &.
15334 (dump_generic_expr_loc): Delete.
15335 (dump_printf_loc): Convert param "loc" from location_t to
15336 const dump_location_t &.
15337 (selftest::test_impl_location): New function.
15338 (selftest::dumpfile_c_tests): New function.
15339 * dumpfile.h: Include "profile-count.h".
15340 (class dump_user_location_t): New class.
15341 (struct dump_impl_location_t): New struct.
15342 (class dump_location_t): New class.
15343 (dump_printf_loc): Convert 2nd param from source_location to
15344 const dump_location_t &.
15345 (dump_generic_expr_loc): Delete.
15346 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
15347 const dump_location_t &.
15348 * gimple-fold.c (fold_gimple_assign): Update call to
15349 dump_printf_loc to pass in a dump_location_t rather than a
15350 location_t, via the gimple stmt.
15351 (gimple_fold_call): Likewise.
15352 * gimple-loop-interchange.cc
15353 (loop_cand::analyze_iloop_reduction_var): Update for change to
15354 check_reduction_path.
15355 (tree_loop_interchange::interchange): Update for change to
15356 find_loop_location.
15357 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
15358 change in return-type of find_loop_location.
15359 (graphite_regenerate_ast_isl): Likewise.
15360 * graphite-optimize-isl.c (optimize_isl): Likewise.
15361 * graphite.c (graphite_transform_loops): Likewise.
15362 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
15363 pass in a dump_location_t rather than a location_t, via the
15365 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
15366 * ipa.c (walk_polymorphic_call_targets): Likewise.
15367 * loop-unroll.c (report_unroll): Convert "locus" param from
15368 location_t to dump_location_t.
15369 (decide_unrolling): Update for change to get_loop_location's
15371 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
15372 location_t to dump_user_location_t.
15373 (grid_find_single_omp_among_assignments_1): Updates calls to
15374 dump_printf_loc to pass in a dump_location_t rather than a
15375 location_t, via the gimple stmt.
15376 (grid_parallel_clauses_gridifiable): Convert "tloc" from
15377 location_t to dump_location_t. Updates calls to dump_printf_loc
15378 to pass in a dump_location_t rather than a location_t, via the
15380 (grid_inner_loop_gridifiable_p): Likewise.
15381 (grid_dist_follows_simple_pattern): Likewise.
15382 (grid_gfor_follows_tiling_pattern): Likewise.
15383 (grid_target_follows_gridifiable_pattern): Likewise.
15384 (grid_attempt_target_gridification): Convert initialization
15385 of local "grid" from memset to zero-initialization; FIXME: does
15386 this require C++11? Update call to dump_printf_loc to pass in a
15387 optinfo_location rather than a location_t, via the gimple stmt.
15388 * profile.c (read_profile_edge_counts): Updates call to
15389 dump_printf_loc to pass in a dump_location_t rather than a
15391 (compute_branch_probabilities): Likewise.
15392 * selftest-run-tests.c (selftest::run_tests): Call
15394 * selftest.h (dumpfile_c_tests): New decl.
15395 * tree-loop-distribution.c (pass_loop_distribution::execute):
15396 Update for change in return type of find_loop_location.
15397 * tree-parloops.c (parallelize_loops): Likewise.
15398 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
15399 "locus" from location_t to dump_user_location_t.
15400 (canonicalize_loop_induction_variables): Likewise.
15401 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
15402 for change in return type of find_loop_location.
15403 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
15404 to dump_printf_loc to pass in a dump_location_t rather than a
15405 location_t, via the stmt.
15406 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
15408 * tree-vect-loop-manip.c (find_loop_location): Convert return
15409 type from source_location to dump_user_location_t.
15410 (vect_do_peeling): Update for above change.
15411 (vect_loop_versioning): Update for change in type of
15413 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
15414 from location_t to dump_user_location_t.
15415 (vect_estimate_min_profitable_iters): Update for change in type
15417 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
15418 location_t to dump_location_t.
15419 (vect_slp_bb): Update for change in type of vect_location.
15420 * tree-vectorizer.c (vect_location): Convert from source_location
15421 to dump_user_location_t.
15422 (try_vectorize_loop_1): Update for change in vect_location's type.
15423 (vectorize_loops): Likewise.
15424 (increase_alignment): Likewise.
15425 * tree-vectorizer.h (vect_location): Convert from source_location
15426 to dump_user_location_t.
15427 (find_loop_location): Convert return type from source_location to
15428 dump_user_location_t.
15429 (check_reduction_path): Convert 1st param from location_t to
15430 dump_user_location_t.
15431 * value-prof.c (check_counter): Update call to dump_printf_loc to
15432 pass in a dump_user_location_t rather than a location_t; update
15433 call to error_at for change in type of "locus".
15434 (check_ic_target): Update call to dump_printf_loc to
15435 pass in a dump_user_location_t rather than a location_t, via the
15438 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
15440 * config/s390/s390.h (enum processor_flags): Do not use
15441 default tune parameter when -march was specified.
15443 2018-06-26 Jakub Jelinek <jakub@redhat.com>
15446 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
15447 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
15450 2018-06-26 Richard Biener <rguenther@suse.de>
15452 PR tree-optimization/86287
15454 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
15455 (vect_analyze_loop): Initialize n_stmts.
15457 2018-06-26 Richard Biener <rguenther@suse.de>
15459 PR middle-end/86271
15460 * fold-const.c (fold_convertible_p): Pointer extension
15463 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
15466 * dwarf2out.c (loc_list_has_views): Adjust comments.
15467 (dw_loc_list): Split single cross-partition range with
15470 2018-06-25 Jeff Law <law@redhat.com>
15472 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
15473 on -mbig-switch by default.
15475 * config/v850/predicates.md (const_float_1_operand): Fix match_code
15477 (const_float_0_operand): Remove unused predicate.
15478 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
15479 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
15480 (recipsf2): New expander. Original pattern now called
15482 (recipdf2, recipdf2_insn): Similarly.
15483 (rsqrtsf2, rsqrtsf2_insn): Similarly
15484 (rsqrtdf2, rsqrtdf2_insn): Similarly
15486 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
15488 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
15489 Simplify logic for FreeBSD (twice).
15491 2018-06-25 Martin Sebor <msebor@redhat.com>
15493 PR tree-optimization/86204
15494 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
15495 a strnlen result if it's less than the length of the string.
15497 2018-06-25 Martin Sebor <msebor@redhat.com>
15499 PR tree-optimization/85700
15500 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
15501 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
15502 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
15504 2018-06-25 Martin Sebor <msebor@redhat.com>
15506 * doc/extend.texi (Zero-length arrays): Update and clarify.
15508 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
15510 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
15511 added IEEE/IBM long double multilib support on PowerPC little
15512 endian Linux systems.
15513 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
15514 (MULTILIB_DEFAULTS): Likewise.
15515 * config/rs6000/rs6000.c (rs6000_option_override_internal):
15517 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
15518 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
15519 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
15521 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
15523 PR middle-end/86311
15524 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
15525 (REORDER_45): Likewise.
15527 2018-06-25 Jeff Law <law@redhat.com>
15529 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
15530 dividend to 32 bits. Adjust length.
15531 (udivmodhi4): Cleanup output template. Fix length.
15533 2018-06-25 Carl Love <cel@us.ibm.com>
15535 * config/rs6000/vsx.md: Change word selector to prefered location.
15537 2018-06-25 Richard Biener <rguenther@suse.de>
15539 PR tree-optimization/86304
15540 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
15541 epilogue-if-converted loops as well.
15543 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
15545 * lto-section-out.c (lto_begin_section): Do not print section
15546 name for noaddr and unnumbered dumps.
15548 2018-06-25 Richard Biener <rguenther@suse.de>
15550 * tree-vectorizer.h (struct vec_info_shared): New structure
15551 with parts split out from struct vec_info and loop_nest from
15552 struct _loop_vec_info.
15553 (struct vec_info): Adjust accordingly.
15554 (struct _loop_vec_info): Likewise.
15555 (LOOP_VINFO_LOOP_NEST): Adjust.
15556 (LOOP_VINFO_DATAREFS): Likewise.
15557 (LOOP_VINFO_DDRS): Likewise.
15558 (struct _bb_vec_info): Likewise.
15559 (BB_VINFO_DATAREFS): Likewise.
15560 (BB_VINFO_DDRS): Likewise.
15561 (struct _stmt_vec_info): Add dr_aux member.
15562 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
15563 (DR_MISALIGNMENT_UNINITIALIZED): New.
15564 (set_dr_misalignment): Adjust.
15565 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
15566 (vect_analyze_loop): Adjust prototype.
15567 (vect_analyze_loop_form): Likewise.
15568 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
15569 Compute dependences lazily.
15570 (vect_record_base_alignments): Use shared datarefs/ddrs.
15571 (vect_verify_datarefs_alignment): Likewise.
15572 (vect_analyze_data_refs_alignment): Likewise.
15573 (vect_analyze_data_ref_accesses): Likewise.
15574 (vect_analyze_data_refs): Likewise.
15575 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
15576 constructor parameter for shared part.
15577 (vect_analyze_loop_form): Pass in shared part and adjust.
15578 (vect_analyze_loop_2): Pass in storage for the number of
15579 stmts. Move loop nest finding to the caller. Compute
15581 (vect_analyze_loop): Pass in shared part.
15582 (vect_transform_loop): Verify shared datarefs are unchanged.
15583 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
15584 constructor parameter for shared part.
15585 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
15586 (vect_slp_bb): Verify shared datarefs are unchanged before
15588 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
15590 (new_stmt_vec_info): Initialize DR_AUX misalignment to
15591 DR_MISALIGNMENT_UNINITIALIZED.
15592 * tree-vectorizer.c (vec_info::vec_info): Add constructor
15593 parameter for shared part.
15594 (vec_info::~vec_info): Adjust.
15595 (vec_info_shared::vec_info_shared): New.
15596 (vec_info_shared::~vec_info_shared): Likewise.
15597 (vec_info_shared::save_datarefs): Likewise.
15598 (vec_info_shared::check_datarefs): Likewise.
15599 (try_vectorize_loop_1): Construct shared part live for analyses
15600 of a single loop for multiple vector sizes.
15601 * tree-parloops.c (gather_scalar_reductions): Adjust.
15603 2018-06-25 Richard Biener <rguenther@suse.de>
15605 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
15606 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
15607 (vect_analyze_data_refs): Remove similar code from here and
15608 simplify accordingly.
15610 2018-06-25 Richard Biener <rguenther@suse.de>
15612 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
15613 for reverse storage order accesses rather than asserting
15614 they cannot happen here.
15616 2018-06-25 Tom de Vries <tdevries@suse.de>
15619 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
15620 Use data16 instead of .byte for insn prefix.
15622 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
15625 * parser.c (make_char_string_pack): Pass this literal chars
15626 through cpp_interpret_string.
15627 (cp_parser_userdef_numeric_literal): Check the result of
15628 make_char_string_pack.
15630 2018-06-24 Maya Rashish <coypu@sdf.org>
15632 * ginclude/stddef.h: Simplify conditions around avoiding
15633 re-definition of __size_t.
15635 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
15637 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
15638 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
15640 2018-06-22 Maya Rashish <coypu@sdf.org>
15642 * doc/invoke.texi (mno-fancy-math-387): Update for changes
15643 made to OpenBSD and NetBSD through the years.
15645 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
15647 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
15648 behavior of vec_pack (vector double, vector double) to match
15649 behavior of vec_float2 (vector double, vector double).
15651 2018-06-22 Olivier Hainque <hainque@adacore.com>
15653 * gimplify.c (gimplify_function_tree): Prevent creation
15654 of a trampoline for the address of the current function
15655 passed to entry/exit instrumentation hooks.
15657 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
15660 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
15663 2018-06-22 Martin Liska <mliska@suse.cz>
15665 PR tree-optimization/86263
15666 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
15667 Bail out if is_enabled is false.
15668 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
15670 (jump_table_cluster::is_enabled): New function.
15672 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
15674 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
15675 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
15676 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
15677 (lto_input_ts_binfo_tree_pointers): Likewise.
15678 * tree-streamer-out.c (streamer_write_tree_bitfields,
15679 write_ts_binfo_tree_pointers): Likewise.
15680 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
15682 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
15684 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
15686 2018-06-22 Martin Liska <mliska@suse.cz>
15688 * symbol-summary.h (get): Make it pure and inline move
15689 functionality from ::get function.
15690 (get): Remove and inline into ::get and ::get_create.
15691 (get_create): Move code from ::get function.
15693 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15696 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
15697 -x assembler-with-cpp.
15699 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15701 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
15702 _FILE_OFFSET_BITS=64 for C++.
15704 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
15706 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
15707 conversion insn that shows up when pr85657-3.c is compiled using
15708 IEEE 128-bit long double.
15709 (neg<mode>2_internal): Use the correct mode to check whether the
15710 mode is IBM extended.
15711 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
15712 multiply and divide external functions from being created more
15715 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
15717 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
15719 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
15720 the edge can be forwarded.
15721 (cfg_layout_merge_blocks): Likewise.
15723 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
15725 * except.c (finish_eh_generation): Commit edge insertions only after
15726 the EH edges have been redirected from post-landing to landing pads.
15728 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
15730 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
15731 create_tmp_var_for to create the FRAME decl.
15732 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
15734 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
15736 * tree-inline.c (copy_edges_for_bb): Minor tweak.
15737 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
15738 debug statement when resetting its value.
15739 (expand_call_inline): Copy the locus of the call onto the assignment
15740 of the return value, if any. Use local variable in more cases.
15742 2018-06-21 Martin Liska <mliska@suse.cz>
15744 * ipa-pure-const.c (propagate_nothrow): Use
15745 funct_state_summaries->get.
15746 (dump_malloc_lattice): Likewise.
15747 (propagate_malloc): Likewise.
15749 2018-06-21 Richard Biener <rguenther@suse.de>
15751 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
15752 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
15753 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
15755 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
15756 BLOCK_ABSTRACT_ORIGIN unconditionally.
15758 2018-06-21 David Malcolm <dmalcolm@redhat.com>
15760 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
15762 * ipa-reference.c (ipa_reference_c_finalize): Delete
15763 ipa_ref_opt_sum_summaries and set it to NULL.
15765 2018-06-21 Tom de Vries <tdevries@suse.de>
15767 PR tree-optimization/85859
15768 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
15769 test with comment from bb_no_side_effects_p.
15771 2018-06-21 Richard Biener <rguenther@suse.de>
15773 PR tree-optimization/86232
15774 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
15775 max for constant niter.
15777 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
15779 * config/aarch64/aarch64-simd.md
15780 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
15782 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
15784 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
15785 Make opernads of the unspec commutative.
15787 2018-06-21 Richard Biener <rguenther@suse.de>
15789 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
15790 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
15791 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
15792 (vect_analyze_data_ref_dependence): Re-order checks to deal with
15794 (vect_record_base_alignments): Do not record base alignment
15795 for gathers or scatters.
15796 (vect_compute_data_ref_alignment): Drop return value that is always
15797 true. Bail out early for gathers or scatters.
15798 (vect_enhance_data_refs_alignment): Bail out early for gathers
15800 (vect_find_same_alignment_drs): Likewise.
15801 (vect_analyze_data_refs_alignment): Remove dead code.
15802 (vect_slp_analyze_and_verify_node_alignment): Likewise.
15803 (vect_analyze_data_refs): For possible gathers or scatters do
15804 not create an alternate DR, just check their possible validity
15805 and mark them. Adjust DECL_NONALIASED handling to not rely
15806 on DR_BASE_ADDRESS.
15807 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
15808 update inits of gathers or scatters.
15809 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
15810 Also copy gather/scatter flag to pattern vinfo.
15812 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
15814 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
15815 behavior of vec_packsu (vector unsigned long long, vector unsigned
15816 long long) to match behavior of vec_packs with same signature.
15818 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
15819 Thomas Schwinge <thomas@codesourcery.com>
15820 Cesar Philippidis <cesar@codesourcery.com>
15822 * gimplify.c (gimplify_scan_omp_clauses): Add support for
15823 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
15824 (gimplify_adjust_omp_clauses): Likewise.
15825 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
15826 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
15827 (gimplify_omp_target_update): Update handling of acc update and
15829 * omp-low.c (install_var_field): Remove unused parameter
15830 base_pointers_restrict.
15831 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
15832 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
15834 (omp_target_base_pointers_restrict_p): Delete.
15835 (scan_omp_target): Update call to scan_sharing_clauses.
15836 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
15838 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
15839 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
15840 (convert_local_omp_clauses): Likewise.
15841 * tree-pretty-print.c (dump_omp_clause): Likewise.
15842 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
15844 (omp_clause_code_name): Likewise.
15846 2018-06-20 Jakub Jelinek <jakub@redhat.com>
15849 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
15852 PR tree-optimization/86231
15853 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
15854 anti-range don't overwrite *vr0min before using it to compute *vr0max.
15856 2018-06-20 Tom de Vries <tdevries@suse.de>
15858 PR tree-optimization/86097
15859 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
15860 iv type if signedness of iv type is not the same as that of *nit.
15862 2018-06-20 Jakub Jelinek <jakub@redhat.com>
15864 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
15865 EDGE_EH edges, verify they are all EDGE_EH.
15867 2018-06-20 Maya Rashish <coypu@sdf.org>
15869 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
15871 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15873 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
15874 * config/aarch64/aarch64.c (xgene1_tunings): Add
15875 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
15876 (aarch64_mode_valid_for_sched_fusion_p):
15877 Allow 16-byte modes.
15878 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
15879 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
15881 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
15883 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
15884 * config/aarch64/iterators.md (VQ2): New mode iterator.
15886 2018-06-20 Martin Liska <mliska@suse.cz>
15888 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
15889 Change default ratio from 10 to 8.
15891 2018-06-20 Martin Liska <mliska@suse.cz>
15893 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
15895 (bit_test_cluster::find_bit_tests): Likewise.
15896 (switch_decision_tree::analyze_switch_statement): Find clusters.
15897 * tree-switch-conversion.h (struct jump_table_cluster): Document
15900 2018-06-20 Martin Liska <mliska@suse.cz>
15902 * tree-switch-conversion.c (switch_conversion::collect):
15903 Record m_uniq property.
15904 (switch_conversion::expand): Bail out for special conditions.
15905 (group_cluster::~group_cluster): New.
15906 (group_cluster::group_cluster): Likewise.
15907 (group_cluster::dump): Likewise.
15908 (jump_table_cluster::emit): New.
15909 (switch_decision_tree::fix_phi_operands_for_edges): New.
15910 (struct case_node): Remove struct.
15911 (jump_table_cluster::can_be_handled): New.
15912 (case_values_threshold): Moved to header.
15913 (reset_out_edges_aux): Likewise.
15914 (jump_table_cluster::is_beneficial): New.
15915 (bit_test_cluster::can_be_handled): Likewise.
15916 (add_case_node): Remove.
15917 (bit_test_cluster::is_beneficial): New.
15918 (case_bit_test::cmp): New.
15919 (bit_test_cluster::emit): New.
15920 (expand_switch_as_decision_tree_p): Remove.
15921 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
15922 (fix_phi_operands_for_edge): Likewise.
15923 (switch_decision_tree::analyze_switch_statement): New.
15924 (compute_cases_per_edge): Move ...
15925 (switch_decision_tree::compute_cases_per_edge): ... here.
15926 (try_switch_expansion): Likewise.
15927 (switch_decision_tree::try_switch_expansion): Likewise.
15928 (record_phi_operand_mapping): Likewise.
15929 (switch_decision_tree::record_phi_operand_mapping): Likewise.
15930 (emit_case_decision_tree): Likewise.
15931 (switch_decision_tree::emit): Likewise.
15932 (balance_case_nodes): Likewise.
15933 (switch_decision_tree::balance_case_nodes): Likewise.
15934 (dump_case_nodes): Likewise.
15935 (switch_decision_tree::dump_case_nodes): Likewise.
15936 (emit_jump): Likewise.
15937 (switch_decision_tree::emit_jump): Likewise.
15938 (emit_cmp_and_jump_insns): Likewise.
15939 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
15940 (emit_case_nodes): Likewise.
15941 (switch_decision_tree::emit_case_nodes): Likewise.
15942 (conditional_probability): Remove.
15943 * tree-switch-conversion.h (enum cluster_type): New.
15945 (struct cluster): Likewise.
15946 (cluster::cluster): Likewise.
15947 (struct simple_cluster): Likewise.
15948 (simple_cluster::simple_cluster): Likewise.
15949 (struct group_cluster): Likewise.
15950 (struct jump_table_cluster): Likewise.
15951 (struct bit_test_cluster): Likewise.
15952 (struct min_cluster_item): Likewise.
15953 (struct case_tree_node): Likewise.
15954 (case_tree_node::case_tree_node): Likewise.
15955 (jump_table_cluster::case_values_threshold): Likewise.
15956 (struct case_bit_test): Likewise.
15957 (struct switch_decision_tree): Likewise.
15958 (struct switch_conversion): Likewise.
15959 (switch_decision_tree::reset_out_edges_aux): Likewise.
15961 2018-06-20 Martin Liska <mliska@suse.cz>
15963 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
15964 (hoist_edge_and_branch_if_true): Likewise.
15965 (expand_switch_using_bit_tests_p): Likewise.
15966 (struct case_bit_test): Likewise.
15967 (case_bit_test_cmp): Likewise.
15968 (emit_case_bit_tests): Likewise.
15969 (switch_conversion::switch_conversion): New class.
15970 (struct switch_conv_info): Remove old struct.
15971 (collect_switch_conv_info): More to ...
15972 (switch_conversion::collect): ... this.
15973 (check_range): Likewise.
15974 (switch_conversion::check_range): Likewise.
15975 (check_all_empty_except_final): Likewise.
15976 (switch_conversion::check_all_empty_except_final): Likewise.
15977 (check_final_bb): Likewise.
15978 (switch_conversion::check_final_bb): Likewise.
15979 (create_temp_arrays): Likewise.
15980 (switch_conversion::create_temp_arrays): Likewise.
15981 (free_temp_arrays): Likewise.
15982 (gather_default_values): Likewise.
15983 (switch_conversion::gather_default_values): Likewise.
15984 (build_constructors): Likewise.
15985 (switch_conversion::build_constructors): Likewise.
15986 (constructor_contains_same_values_p): Likewise.
15987 (switch_conversion::contains_same_values_p): Likewise.
15988 (array_value_type): Likewise.
15989 (switch_conversion::array_value_type): Likewise.
15990 (build_one_array): Likewise.
15991 (switch_conversion::build_one_array): Likewise.
15992 (build_arrays): Likewise.
15993 (switch_conversion::build_arrays): Likewise.
15994 (gen_def_assigns): Likewise.
15995 (switch_conversion::gen_def_assigns): Likewise.
15996 (prune_bbs): Likewise.
15997 (switch_conversion::prune_bbs): Likewise.
15998 (fix_phi_nodes): Likewise.
15999 (switch_conversion::fix_phi_nodes): Likewise.
16000 (gen_inbound_check): Likewise.
16001 (switch_conversion::gen_inbound_check): Likewise.
16002 (process_switch): Use the newly created class.
16003 (switch_conversion::expand): New.
16004 (switch_conversion::~switch_conversion): New.
16005 * tree-switch-conversion.h: New file.
16007 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
16009 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
16010 tree-vect-patterns.c.
16011 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
16012 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
16013 (vect_recog_sad_pattern): Likewise.
16014 (vect_recog_widen_sum_pattern): Likewise.
16015 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
16016 (vect_recog_widen_shift_pattern): Remove the type_in argument.
16017 (vect_recog_rotate_pattern): Likewise.
16018 (vect_recog_mult_pattern): Likewise.
16019 (vect_recog_vector_vector_shift_pattern): Likewise.
16020 (vect_recog_divmod_pattern): Likewise.
16021 (vect_recog_mixed_size_cond_pattern): Likewise.
16022 (vect_recog_bool_pattern): Likewise.
16023 (vect_recog_mask_conversion_pattern): Likewise.
16024 (vect_try_gather_scatter_pattern): Likewise.
16025 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
16026 (vect_recog_over_widening_pattern): Likewise.
16027 (vect_recog_gather_scatter_pattern): Likewise.
16028 (vect_recog_func_ptr): Move from tree-vectorizer.h
16029 (vect_vect_recog_func_ptrs): Move further down the file.
16030 (vect_recog_func): Likewise. Remove the third argument.
16031 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
16032 (vect_pattern_recog_1): Expect the pattern function to do any
16033 necessary target tests. Also expect it to provide a vector type.
16034 Remove the type_in handling.
16036 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
16038 * tree-vect-patterns.c (vect_pattern_detected): New function.
16039 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
16040 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
16041 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
16042 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
16043 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
16044 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
16045 (vect_recog_mask_conversion_pattern)
16046 (vect_try_gather_scatter_pattern): Likewise.
16048 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
16050 * tree-vect-patterns.c (vect_get_internal_def): New function.
16051 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
16052 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
16053 (search_type_for_mask_1): Use it.
16055 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
16057 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
16058 redundant WIDEN_SUM_EXPR handling.
16059 (vect_recog_sad_pattern): Likewise.
16061 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
16063 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
16064 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
16065 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
16066 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
16067 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
16069 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
16071 * tree-vect-stmts.c (vectorizable_call): Make sure that we
16072 use the stmt_vec_info of the original bb statement for the
16073 new zero assignment, even if the call is part of a pattern.
16075 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
16077 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
16078 that the sequence is attached to the original statement rather
16079 than the pattern statement.
16080 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
16081 PATTERN_DEF_SEQ from the original statement rather than
16082 the main pattern statement.
16083 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
16084 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
16085 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
16087 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
16089 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
16090 definition statements before the early exit for statements that aren't
16092 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
16094 (vect_transform_loop): ...here. Process pattern definition
16095 statements without first checking whether the main pattern
16096 statement is live or relevant.
16098 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
16100 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
16101 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
16103 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
16105 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
16106 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
16107 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
16108 (expand_block_compare): Change select_block_compare_mode call.
16109 (expand_strncmp_align_check): Use new functions, fix comment.
16110 (emit_final_str_compare_gpr): New function.
16111 (expand_strn_compare): Refactor and clean up code.
16112 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
16114 2018-06-19 Tony Reix <tony.reix@atos.com>
16115 Damien Bergamini <damien.bergamini@atos.com>
16116 David Edelsohn <dje.gcc@gmail.com>
16118 * collect2.c (static_obj): New variable.
16119 (static_libs): New variable.
16120 (is_in_list): Uncomment declaration.
16121 (main): Track AIX libraries linked statically.
16122 (is_in_list): Uncomment definition.
16123 (scan_prog_file): Don't add AIX shared libraries initializer
16124 to constructor list if linking statically.
16126 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
16128 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
16130 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
16132 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
16134 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
16137 2018-06-19 Martin Liska <mliska@suse.cz>
16139 * config/i386/i386.c (ix86_can_inline_p): Do not use
16140 ipa_fn_summaries::get_create.
16141 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
16143 (devirtualization_time_bonus): Likewise.
16144 (ipcp_propagate_stage): Likewise.
16145 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
16146 (edge_set_predicate): Likewise.
16147 (evaluate_conditions_for_known_args): Likewise.
16148 (evaluate_properties_for_edge): Likewise.
16149 (ipa_call_summary::reset): Tranform to ...
16150 (ipa_call_summary::~ipa_call_summary): ... this.
16151 (ipa_fn_summary::reset): Transform to ...
16152 (ipa_fn_summary::~ipa_fn_summary): ... this.
16153 (ipa_fn_summary_t::remove): Rename to ...
16154 (ipa_fn_summary_t::remove_callees): ... this.
16155 (ipa_fn_summary_t::duplicate): Use placement new
16156 instead of memory copy.
16157 (ipa_call_summary_t::duplicate): Likewise.
16158 (ipa_call_summary_t::remove): Remove.
16159 (dump_ipa_call_summary): Change get_create to get.
16160 (ipa_dump_fn_summary): Dump only when summary exists.
16161 (analyze_function_body): Use symbol_summary::get instead
16163 (compute_fn_summary): Likewise.
16164 (estimate_edge_devirt_benefit): Likewise.
16165 (estimate_edge_size_and_time): Likewise.
16166 (inline_update_callee_summaries): Likewise.
16167 (remap_edge_change_prob): Likewise.
16168 (remap_edge_summaries): Likewise.
16169 (ipa_merge_fn_summary_after_inlining): Likewise.
16170 (write_ipa_call_summary): Likewise.
16171 (ipa_fn_summary_write): Likewise.
16172 (ipa_free_fn_summary): Likewise.
16173 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
16174 (struct ipa_call_summary): Likewise.
16175 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
16177 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
16178 (estimate_size_after_inlining): Likewise.
16179 (estimate_growth): Likewise.
16180 (growth_likely_positive): Likewise.
16181 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
16182 (inline_call): Likewise.
16183 * ipa-inline.c (caller_growth_limits): Likewise.
16184 (can_inline_edge_p): Likewise.
16185 (can_inline_edge_by_limits_p): Likewise.
16186 (compute_uninlined_call_time): Likewise.
16187 (compute_inlined_call_time): Likewise.
16188 (want_inline_small_function_p): Likewise.
16189 (edge_badness): Likewise.
16190 (update_caller_keys): Likewise.
16191 (update_callee_keys): Likewise.
16192 (inline_small_functions): Likewise.
16193 (inline_to_all_callers_1): Likewise.
16194 (dump_overall_stats): Likewise.
16195 (early_inline_small_functions): Likewise.
16196 (early_inliner): Likewise.
16197 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
16198 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
16199 * ipa-pure-const.c (malloc_candidate_p): Likewise.
16200 * ipa-split.c (execute_split_functions): Likewise.
16201 * symbol-summary.h: Likewise.
16202 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
16204 2018-06-19 Richard Biener <rguenther@suse.de>
16206 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
16207 (vectorize_loops): ... here. Fix dbgcnt handling.
16208 (try_vectorize_loop): Wrap try_vectorize_loop_1.
16210 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
16213 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
16214 ieee128 argument takes up only one (vector) register, not two (floating
16217 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
16219 * gimplify.c (gimplify_init_constructor): Really never clear for an
16220 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
16222 2018-06-19 Richard Biener <rguenther@suse.de>
16224 PR tree-optimization/86179
16225 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
16226 after failed recognition.
16228 2018-06-18 Martin Sebor <msebor@redhat.com>
16230 PR middle-end/85602
16231 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
16232 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
16233 Handle integer subtraction.
16234 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
16235 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
16237 2018-06-18 David Malcolm <dmalcolm@redhat.com>
16239 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
16240 param from rtx to rtx_insn *.
16241 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
16243 (frv_ifcvt_modify_insn): Likwise.
16244 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
16245 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
16246 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
16247 as_a <rtx_insn *> cast to local "unprotected_region" once
16248 it's been established that it's not NULL or pc_rtx.
16249 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
16250 param "sethi" from rtx to rtx_insn *.
16251 (nds32_group_float_insns): Likewise for param "insn".
16252 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
16254 (vax_output_int_subtract): Likewise.
16255 * config/vax/vax.c (vax_output_int_add): Likewise for param
16257 (vax_output_int_subtract): Likewise.
16258 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
16259 (emit_pattern_after): Likewise for param "after".
16260 (emit_insn_after): Likewise.
16261 (emit_jump_insn_after): Likewise.
16262 (emit_call_insn_after): Likewise.
16263 (emit_debug_insn_after): Likewise.
16264 (emit_pattern_before): Likewise for param "before".
16265 (emit_insn_before): Likewise.
16266 (emit_jump_insn_before): Likewise.
16267 * final.c (get_insn_template): Likewise for param "insn", removing
16269 * output.h (get_insn_template): Likewise for 2nd param.
16270 * rtl.h (emit_insn_before): Likewise.
16271 (emit_jump_insn_before): Likewise.
16272 (emit_debug_insn_before_noloc): Likewise.
16273 (emit_insn_after): Likewise.
16274 (emit_jump_insn_after): Likewise.
16275 (emit_call_insn_after): Likewise.
16276 (emit_debug_insn_after): Likewise.
16277 (set_insn_deleted): Likewise for param.
16279 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
16282 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
16283 floating point modes, so that IFmode is numerically greater than
16284 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
16285 to declare the ordering. This prevents IFmode from being
16286 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
16287 machine. Include rs6000-modes.h to share the fractional values
16288 between genmodes* and the rest of the compiler.
16289 (IFmode): Likewise.
16290 (KFmode): Likewise.
16291 (TFmode): Likewise.
16292 * config/rs6000/rs6000-modes.h: New file.
16293 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
16294 meaning of rs6000_long_double_size so that 126..128 selects an
16295 appropriate 128-bit floating point type.
16296 (rs6000_option_override_internal): Likewise.
16297 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
16298 (TARGET_LONG_DOUBLE_128): Change the meaning of
16299 rs6000_long_double_size so that 126..128 selects an appropriate
16300 128-bit floating point type.
16301 (LONG_DOUBLE_TYPE_SIZE): Update comment.
16302 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
16303 source and destination to match the standard usage.
16304 (truncifkf2): Likewise.
16305 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
16306 ISA 2.07 to use an explicit clobber, instead of passing in a
16308 (copysign<mode>3_soft): Likewise.
16310 2018-06-18 David Malcolm <dmalcolm@redhat.com>
16312 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
16313 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
16314 (vect_slp_analyze_instance_dependence): Likewise.
16315 (vect_enhance_data_refs_alignment): Likewise.
16316 (vect_analyze_data_refs_alignment): Likewise.
16317 (vect_slp_analyze_and_verify_instance_alignment
16318 (vect_analyze_data_ref_accesses): Likewise.
16319 (vect_prune_runtime_alias_test_list): Likewise.
16320 (vect_analyze_data_refs): Likewise.
16321 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
16322 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
16323 (vect_analyze_scalar_cycles_1): Likewise.
16324 (vect_get_loop_niters): Likewise.
16325 (vect_analyze_loop_form_1): Likewise.
16326 (vect_update_vf_for_slp): Likewise.
16327 (vect_analyze_loop_operations): Likewise.
16328 (vect_analyze_loop): Likewise.
16329 (vectorizable_induction): Likewise.
16330 (vect_transform_loop): Likewise.
16331 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
16332 * tree-vect-slp.c (vect_analyze_slp): Likewise.
16333 (vect_make_slp_decision): Likewise.
16334 (vect_detect_hybrid_slp): Likewise.
16335 (vect_slp_analyze_operations): Likewise.
16336 (vect_slp_bb): Likewise.
16337 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
16338 (vectorizable_bswap): Likewise.
16339 (vectorizable_call): Likewise.
16340 (vectorizable_simd_clone_call): Likewise.
16341 (vectorizable_conversion): Likewise.
16342 (vectorizable_assignment): Likewise.
16343 (vectorizable_shift): Likewise.
16344 (vectorizable_operation): Likewise.
16345 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
16347 2018-06-18 Martin Sebor <msebor@redhat.com>
16349 PR tree-optimization/81384
16350 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
16351 * builtins.c (expand_builtin_strnlen): New function.
16352 (expand_builtin): Call it.
16353 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
16354 * builtins.def (BUILT_IN_STRNLEN): New.
16355 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
16356 Warn for bounds in excess of maximum object size.
16357 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
16358 single-value ranges. Handle strnlen.
16359 (handle_builtin_strlen): Handle strnlen.
16360 (strlen_check_and_optimize_stmt): Same.
16361 * doc/extend.texi (Other Builtins): Document strnlen.
16363 2018-06-18 Maya Rashish <coypu@sdf.org>
16365 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
16366 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
16367 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
16369 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
16371 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
16373 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
16375 * tree.c (escaped_string::escape): Replace cast to char * by
16376 const_cast<char *> (unescaped).
16378 2018-06-18 Nick Clifton <nickc@redhat.com>
16381 * tree.c (escaped_string): New class. Converts an unescaped
16382 string into its escaped equivalent.
16383 (warn_deprecated_use): Use the new class to convert the
16384 deprecation message, if present.
16385 (test_escaped_strings): New self test.
16386 (test_c_tests): Add test_escaped_strings.
16387 * doc/extend.texi (deprecated): Add a note that the
16388 deprecation message is affected by the -fmessage-length
16389 option, and that control characters will be escaped.
16390 (#pragma GCC error): Document this pragma.
16391 (#pragma GCC warning): Likewise.
16392 * doc/invoke.texi (-fmessage-length): Document this option's
16393 effect on the #warning and #error preprocessor directives and
16394 the deprecated attribute.
16396 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
16398 * tree.c (decl_value_expr_lookup): Revert latest change.
16399 (decl_value_expr_insert): Likewise.
16401 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
16403 * gimplify.c (nonlocal_vlas): Delete.
16404 (nonlocal_vla_vars): Likewise.
16405 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
16407 (gimplify_body): Do not create and destroy nonlocal_vlas.
16408 * tree-nested.c: Include diagnostic.h.
16409 (use_pointer_in_frame): Tweak.
16410 (lookup_field_for_decl): Add assertion and declare the transformation.
16411 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
16412 internal error when the reference is in a wrong context. Do not
16413 create a debug decl by default.
16414 (note_nonlocal_block_vlas): Delete.
16415 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
16416 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
16417 create a debug decl by default.
16418 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
16419 call is in a wrong context.
16420 (fixup_vla_decls): New function.
16421 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
16422 debug variables were created.
16423 * tree.c (decl_value_expr_lookup): Add checking assertion.
16424 (decl_value_expr_insert): Likewise.
16426 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
16428 PR middle-end/82479
16429 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
16430 * tree-scalar-evolution.c (interpret_expr): Likewise.
16431 (expression_expensive_p): Likewise.
16432 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
16433 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
16434 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
16435 (ssa_defined_by_minus_one_stmt_p): New.
16437 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
16439 PR middle-end/64946
16440 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
16441 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
16442 * dojump.c (do_jump): Likewise.
16443 * expr.c (expand_expr_real_2): Check operand type's sign.
16444 * fold-const.c (const_unop): Handle ABSU_EXPR.
16445 (fold_abs_const): Likewise.
16446 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
16447 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
16448 (strip_sign_op_1): Likesise.
16449 * match.pd: Add new pattern to generate ABSU_EXPR.
16450 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
16451 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
16452 * tree-eh.c (operation_could_trap_helper_p): Likewise.
16453 * tree-inline.c (estimate_operator_cost): Likewise.
16454 * tree-pretty-print.c (dump_generic_node): Likewise.
16455 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
16456 * tree.def (ABSU_EXPR): New.
16458 2018-06-16 Jakub Jelinek <jakub@redhat.com>
16460 PR middle-end/86095
16461 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
16462 documented as preserved for backward compatibility only.
16463 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
16465 PR rtl-optimization/86108
16466 * bb-reorder.c (create_forwarder_block): Renamed to ...
16467 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
16468 jump from new landing pad to the second part.
16469 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
16472 2018-06-15 Jakub Jelinek <jakub@redhat.com>
16474 PR middle-end/85878
16475 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
16476 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
16477 Only call store_expr for halves if the mode is the same.
16479 PR middle-end/86123
16480 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
16481 Fix up comment formatting.
16483 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
16485 * typed-splay-tree.h (typed_splay_tree::remove): New function.
16486 (typed_splay_tree::closure,
16487 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
16488 (typed_splay_tree::typed_splay_tree,
16489 typed_splay_tree::operator =): Declared private.
16490 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
16491 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
16492 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
16493 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
16494 typed_splay_tree::splay_tree_splay,
16495 typed_splay_tree::splay_tree_foreach_helper,
16496 typed_splay_tree::splay_tree_insert,
16497 typed_splay_tree::splay_tree_remove,
16498 typed_splay_tree::splay_tree_lookup,
16499 typed_splay_tree::splay_tree_predecessor,
16500 typed_splay_tree::splay_tree_successor,
16501 typed_splay_tree::splay_tree_min,
16502 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
16503 (typed_splay_tree::root, typed_splay_tree::comp,
16504 typed_splay_tree::delete_key,
16505 typed_splay_tree::delete_value): New data members.
16506 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
16507 typed_splay_tree::remove.
16509 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
16511 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
16512 -mginv and -mno-ginv to the assembler.
16513 * config/mips/mips.opt (-mcrc): New option.
16514 (-mginv): Likewise.
16515 * doc/invoke.text (-mcrc): Document.
16516 (-mginv): Likewise.
16518 2018-06-15 Nick Clifton <nickc@redhat.com>
16521 * tree.c (escaped_string): New class. Converts an unescaped
16522 string into its escaped equivalent.
16523 (warn_deprecated_use): Use the new class to convert the
16524 deprecation message, if present.
16525 (test_escaped_strings): New self test.
16526 (test_c_tests): Add test_escaped_strings.
16527 * doc/extend.texi (deprecated): Add a note that the
16528 deprecation message is affected by the -fmessage-length
16529 option, and that control characters will be escaped.
16530 (#pragma GCC error): Document this pragma.
16531 (#pragma GCC warning): Likewise.
16532 * doc/invoke.texi (-fmessage-length): Document this option's
16533 effect on the #warning and #error preprocessor directives and
16534 the deprecated attribute.
16536 2018-06-15 Richard Biener <rguenther@suse.de>
16538 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
16539 here, also noting vector size used.
16540 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
16541 size used in MSG_OPTIMIZED_LOCATIONS dump.
16542 (pass_slp_vectorize::execute): Adjust.
16544 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
16547 * config/arc/arc.c (arc_return_address_register): Fix
16550 2018-06-15 Richard Biener <rguenther@suse.de>
16552 PR middle-end/86159
16553 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
16554 leave useless conversion stripping to force_gimple_operand_gsi.
16555 (gimplify_build2): Likewise.
16556 (gimplify_build1): Likewise.
16558 2018-06-15 Richard Biener <rguenther@suse.de>
16560 PR middle-end/86076
16561 * tree-cfg.c (move_stmt_op): unshare invariant addresses
16562 before adjusting their block.
16564 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
16566 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
16567 multilibs for *-*-rtems*.
16568 * config/riscv/t-rtems: New file.
16570 2018-06-14 Jakub Jelinek <jakub@redhat.com>
16572 PR middle-end/86122
16573 * match.pd ((A +- CST1) +- CST2): Punt if last resort
16574 unsigned_type_for returns NULL.
16577 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
16578 subregs of multi-word pseudos unless the float mode has word size.
16580 2018-06-14 Richard Biener <rguenther@suse.de>
16582 PR middle-end/86139
16583 * tree-vect-generic.c (build_word_mode_vector_type): Remove
16584 duplicate and harmful type_hash_canon.
16585 * tree.c (type_hash_canon): Assert we didn't find ourselves.
16587 2018-06-14 Richard Biener <rguenther@suse.de>
16590 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
16593 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
16595 * config/rtems.h (STDINT_LONG32): Define.
16597 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
16598 Prachi Godbole <prachi.godbole@imgtec.com>
16600 * config/mips/mips-cpus.def: Define P6600.
16601 * config/mips/mips-tables.opt: Regenerate.
16602 * config/mips/mips.c (mips_ucbranch_type): New enum.
16603 (mips_rtx_cost_data): Add support for P6600.
16604 (mips_issue_rate): Likewise.
16605 (mips_multipass_dfa_lookahead): Likewise.
16606 (mips_avoid_hazard): Likewise.
16607 (mips_reorg_process_insns): Likewise.
16608 (mips_classify_branch_p6600): New function.
16609 * config/mips/mips.h (TUNE_P6600): New define.
16610 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
16611 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
16612 * config/mips/mips.md: Include p6600.md.
16613 (processor): Add p6600.
16614 * config/mips/p6600.md: New file.
16615 * doc/invoke.texi: Add p6600 to supported architectures.
16617 2018-06-13 Martin Sebor <msebor@redhat.com>
16619 PR tree-optimization/86114
16620 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
16622 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
16624 2018-06-13 Richard Biener <rguenther@suse.de>
16626 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
16627 Properly set vector type of the intermediate stmt.
16628 * tree-vect-stmts.c (vectorizable_operation): The destination
16629 var always has vectype_out type.
16631 2018-06-13 Jeff Law <law@redhat.com>
16633 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
16634 integer 0 for argument to print_rtl_with_bb.
16635 (rl78_reorg): Likewise.
16637 2018-06-13 David Malcolm <dmalcolm@redhat.com>
16639 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
16640 from rtx to rtx_insn *.
16641 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
16643 (add_sched_insns_for_speculation): Likewise for local "target",
16644 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
16645 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
16646 from rtx_insn ** to rtx_code_label **.
16647 (reorg_emit_nops): Likewise.
16648 (c6x_reorg): Likewise for local "call_labels".
16649 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
16651 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
16652 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
16653 the loops over LABEL_REFS.
16654 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
16656 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
16657 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
16658 (split_branches): Strengthen local "olabel" from rtx to
16659 rtx_insn *, adding a safe_as_a cast.
16660 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
16662 (add_insn_after): Likewise for first two params.
16663 (add_insn_before): Likewise.
16664 (remove_insn): Likewise for param.
16665 (emit_pattern_before_noloc): Likewise for second and third params.
16666 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
16667 (emit_call_insn_before_noloc): Likewise.
16668 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
16670 (emit_barrier_before): Likewise.
16671 (emit_label_before): Strengthen "label" param from "rtx" to
16672 "rtx_code_label *". Strengthen "before" param from "rtx" to
16674 (emit_insn_after_1): Strengthen "after" param from "rtx" to
16676 (emit_pattern_after_noloc): Likewise.
16677 (emit_insn_after_noloc): Likewise.
16678 (emit_jump_insn_after_noloc): Likewise.
16679 (emit_call_insn_after_noloc): Likewise.
16680 (emit_debug_insn_after_noloc): Likewise.
16681 (emit_barrier_after): Likewise.
16682 (emit_label_after): Likewise for both params.
16683 (emit_pattern_after_setloc): Likewise for "after" param. Convert
16684 "loc" param from "int" to "location_t".
16685 (emit_insn_after_setloc): Likewise.
16686 (emit_jump_insn_after_setloc): Likewise.
16687 (emit_call_insn_after_setloc): Likewise.
16688 (emit_debug_insn_after_setloc): Likewise.
16689 (emit_pattern_before_setloc): Likewise for "before" param. Convert
16690 "loc" param from "int" to "location_t".
16691 (emit_pattern_before): Convert NULL_RTX to NULL.
16692 (emit_insn_before_setloc): Convert "loc" param from "int" to
16694 (emit_jump_insn_before_setloc): Likewise.
16695 (emit_call_insn_before_setloc): Likewise.
16696 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
16697 rtx_insn *. Convert "loc" param from "int" to "location_t".
16698 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
16699 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
16700 Convert 3rd param from "int" to "location_t".
16701 (emit_barrier_before, emit_barrier_after, next_real_insn):
16702 Strengthen param from rtx to rtx_insn *.
16703 (emit_label_before): Strengthen 1st param from "rtx" to
16704 "rtx_code_label *". Strengthen 2nd param from "rtx" to
16706 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
16707 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
16708 Strengthen 2nd param from "rtx" to "rtx_insn *".
16709 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
16710 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
16711 Likewise. Convert 3rd param from "int" to "location_t".
16712 (emit_label_after): Strengthen 1st param from "rtx" to
16713 "rtx_code_label *".
16714 (next_real_insn, remove_insn): Strengthen param from "rtx" to
16716 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
16717 from "rtx" to "rtx_insn *".
16719 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
16721 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
16722 bodies streamed in with -Q.
16723 * dumpfile.c (dump_files): Add lto-stream-out dump file.
16724 * dumpfile.h (tree_dump_index): Add lto_stream_out.
16725 * gimple-streamer-out.c: Include gimple-pretty-print.h
16726 (output_bb): Dump stmts streamed.
16727 * lto-section-out.c: Include print-tree.h
16728 (lto_begin_section): Dump sections created.
16729 (lto_output_decl_index): Dump decl encoded.
16730 * lto-streamer-out.c: Include print-tree.h
16731 (create_output_block): Dump output block created.
16732 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
16733 (output_function): Dump function output.
16734 (output_constructor): Dump constructor streamed.
16735 (write_global_stream): Output indexes encoded.
16736 (produce_asm_for_decls): Dump streams encoded.
16737 * lto-streamer.c (streamer_dump_file): New global var.
16738 * lto-streamer.h (streamer_dump_file): Declare.
16739 * passes.c (ipa_write_summaries): Initialize streamer dump.
16740 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
16743 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
16746 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
16747 offsets for register save directives. Emit a second batch of save
16748 directives, if need be, when the function accesses prior frames.
16750 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
16752 * config/arc/fpu.md (fmasf4): Force operand to register.
16753 (fnmasf4): Likewise.
16755 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
16757 * config/arc/arc-protos.h (arc_pad_return): Remove.
16758 * config/arc/arc.c (machine_function): Remove force_short_suffix
16760 (arc_print_operand): Adjust printing of '&'.
16761 (arc_verify_short): Remove conditional printing of short suffix.
16762 (arc_final_prescan_insn): Remove reference to size_reason.
16763 (pad_return): New function.
16764 (arc_reorg): Call pad_return.
16765 (arc_pad_return): Remove.
16766 (arc_init_machine_status): Remove reference to force_short_suffix.
16767 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
16768 (attr length): When attribute iscompact is true force to 2
16769 regardless; in the case of maybe check if we want to force the
16770 instruction to have 4 bytes length.
16771 (nopv): Change it to generate 4 byte long nop as well.
16772 (blockage): New pattern.
16773 (simple_return): Remove call to arc_pad_return.
16774 (p_return_i): Likewise.
16776 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
16778 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
16780 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
16782 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
16785 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
16787 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
16788 for ARC700 and ARCv2.
16790 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
16793 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
16794 operands[2] instead of operands[1].
16797 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
16799 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
16800 case, check whether the outer register overlaps an unallocatable
16801 register, not just whether it fits the required class.
16803 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
16805 * poly-int.h (can_div_trunc_p): Add new overload in which all values
16807 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
16808 (memrefs_conflict_p): Likewise.
16809 (init_alias_analysis): Likewise.
16810 * cfgexpand.c (expand_debug_expr): Likewise.
16811 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
16812 * cse.c (fold_rtx): Likewise.
16813 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
16814 * expr.c (emit_block_move_hints): Likewise.
16815 (clear_storage_hints, push_block, emit_push_insn): Likewise.
16816 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
16817 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
16818 (emit_group_store): Likewise.
16819 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
16820 to read the PRE/POST_MODIFY increment.
16821 * calls.c (store_one_arg): Use strip_offset.
16822 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
16824 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
16826 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
16827 (simplify_binary_operation_1): Extend CONST_INT handling to
16829 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
16830 than a HOST_WIDE_INT.
16831 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
16833 (adjust_mems, add_stores): Update accodingly.
16834 (vt_canonicalize_addr): Track polynomial offsets.
16835 (emit_note_insn_var_location): Likewise.
16836 (vt_add_function_parameter): Likewise.
16837 (vt_initialize): Likewise.
16839 2018-06-12 Jeff Law <law@redhat.com>
16841 * config.gcc (alpha*-*-freebsd*): Remove.
16842 * config/alpha/freebsd.h: Remove.
16844 2018-06-12 David Malcolm <dmalcolm@redhat.com>
16847 * spellcheck-tree.c (levenshtein_distance): Rename to...
16848 (get_edit_distance): ...this, and update for underlying renaming.
16849 * spellcheck-tree.h (levenshtein_distance): Rename to...
16850 (get_edit_distance): ...this.
16851 * spellcheck.c (levenshtein_distance): Rename to...
16852 (get_edit_distance): ...this. Convert from Levenshtein distance
16853 to Damerau-Levenshtein distance by supporting transpositions of
16854 adjacent characters. Rename "v1" to "v_next" and "v0" to
16856 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
16857 (selftest::test_edit_distance_unit_test_oneway): ...this, and
16858 update for underlying renaming.
16859 (selftest::levenshtein_distance_unit_test): Rename to...
16860 (selftest::test_get_edit_distance_unit): ...this, and update for
16861 underlying renaming.
16862 (selftest::test_find_closest_string): Add example from PR 69968
16863 where transposition helps
16864 (selftest::test_metric_conditions): Update for renaming.
16865 (selftest::test_metric_conditions): Likewise.
16866 (selftest::spellcheck_c_tests): Likewise.
16867 * spellcheck.h (levenshtein_distance): Rename both overloads to...
16868 (get_edit_distance): ...this.
16869 (best_match::consider): Update for renaming.
16871 2018-06-12 Martin Sebor <msebor@redhat.com>
16873 PR tree-optimization/85259
16874 * builtins.c (compute_objsize): Handle constant offsets.
16875 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
16876 true iff a warning has been issued.
16877 * gimple.h (gimple_nonartificial_location): New function.
16878 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
16879 gimple_nonartificial_location and handle -Wno-system-headers.
16880 (handle_builtin_stxncpy): Same.
16882 2018-06-12 Martin Sebor <msebor@redhat.com>
16885 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
16887 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
16889 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
16890 BUILTIN_VEC_XST entries for pointer to double and long long.
16892 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
16895 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
16897 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
16900 2018-06-12 Martin Liska <mliska@suse.cz>
16902 * doc/options.texi: Document IntegerRange.
16904 2018-06-12 Martin Liska <mliska@suse.cz>
16906 * config/i386/i386.opt: Make MPX-related options as Deprecated.
16907 * opt-functions.awk: Handle Deprecated flag.
16908 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
16910 (read_cmdline_option): Report warning for a deprecated option.
16911 * opts.h (struct cl_option): Add new field cl_deprecated.
16912 (CL_ERR_DEPRECATED): New.
16914 2018-06-12 Martin Liska <mliska@suse.cz>
16916 * doc/options.texi: Document Deprecated option flag.
16918 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
16920 * config/arc/arc-arch.h (arc_extras): New enum.
16921 (arc_cpu_t):Add field extra.
16922 (arc_cpu_types): Consider the extras.
16923 * config/arc/arc-cpus.def: Add extras info.
16924 * config/arc/arc-opts.h (processor_type): Consider extra field.
16925 * config/arc/arc.c (arc_override_options): Handle extra field.
16927 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
16929 * config/arc/arc-arch.h: Update ARC_OPTX macro.
16930 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
16932 * config/arc/arc.c (arc_init): Update pic warning.
16933 (irq_range): Update irq range parsing warnings.
16934 (arc_override_options): Update various warning messages.
16935 (arc_handle_aux_attribute): Likewise.
16937 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
16939 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
16941 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
16943 * doc/sourcebuild.texi: Document usage of line number 0 in verify
16944 compiler messages directives.
16946 2018-06-12 Matthew Fortune <mfortune@gmail.com>
16948 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
16949 * config/mips/mips-tables.opt: Regenerate.
16950 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
16952 * doc/invoke.texi: Document -march=i6500.
16954 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
16956 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
16957 (i6400_gpmul): Add cpu_unit.
16958 (i6400_gpdiv): Likewise.
16959 (i6400_msa_add_d): Update reservations.
16960 (i6400_msa_int_add) Likewise.
16961 (i6400_msa_short_logic3) Likewise.
16962 (i6400_msa_short_logic2) Likewise.
16963 (i6400_msa_short_logic) Likewise.
16964 (i6400_msa_move) Likewise.
16965 (i6400_msa_cmp) Likewise.
16966 (i6400_msa_short_float2) Likewise.
16967 (i6400_msa_div_d) Likewise.
16968 (i6400_msa_long_logic1) Likewise.
16969 (i6400_msa_long_logic2) Likewise.
16970 (i6400_msa_mult) Likewise.
16971 (i6400_msa_long_float2) Likewise.
16972 (i6400_msa_long_float4) Likewise.
16973 (i6400_msa_long_float5) Likewise.
16974 (i6400_msa_long_float8) Likewise.
16975 (i6400_fpu_fadd): Include frint type.
16976 (i6400_fpu_store): New define_insn_reservation.
16977 (i6400_fpu_load): Likewise.
16978 (i6400_fpu_move): Likewise.
16979 (i6400_fpu_fcmp): Likewise.
16980 (i6400_fpu_fmadd): Likewise.
16981 (i6400_int_mult): Include imul3nc type and update reservation.
16982 (i6400_int_div): Include idiv3 type and update reservation.
16983 (i6400_int_load): Update to check type not move_type.
16984 (i6400_int_store): Likewise.
16985 (i6400_int_prefetch): Set zero latency.
16987 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
16989 * gcc.c: Document new %@{...} sequence.
16990 (LINK_COMMAND_SPEC): Use it for the -L switches.
16991 (cpp_unique_options): Use it for the -I switches.
16992 (at_file_argbuf): New global variable.
16993 (in_at_file): Likewise.
16994 (alloc_args): Create at_file_argbuf.
16995 (clear_args): Truncate at_file_argbuf.
16996 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
16997 (open_at_file): New function.
16998 (close_at_file): Likewise.
16999 (create_at_file): Delete.
17000 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
17003 (validate_switches_from_spec): Deal with %@{...} sequence.
17004 (validate_switches): Likewise.
17005 (driver::finalize): Call clear_args.
17007 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
17009 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
17011 2018-06-11 Martin Sebor <msebor@redhat.com>
17013 * doc/invoke.texi (-Wall): List -Wc++17-compat.
17014 (Wno-class-memaccess): Add @opindex.
17015 (Wno-templates, Wno-multiple-inheritance): Same.
17016 (Wno-virtual-inheritance, Wno-namespaces): Same.
17017 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
17018 (Wno-format-overflow, Wno-format-truncation): Same.
17019 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
17020 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
17021 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
17022 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
17023 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
17024 (Wno-misspelled-isr): Same.
17026 2018-06-11 Martin Sebor <msebor@redhat.com>
17028 * PR tree-optimization/86083
17029 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
17031 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
17033 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
17035 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
17038 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
17039 on the correct operand.
17040 (*movdi_internal64): Ditto.
17042 2018-06-11 Martin Liska <mliska@suse.cz>
17044 PR tree-optimization/86089
17045 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
17047 2018-06-11 Julia Koval <julia.koval@intel.com>
17049 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
17050 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
17051 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
17053 2018-06-11 Olivier Hainque <hainque@adacore.com>
17055 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
17056 for Ada with strict dwarf2.
17058 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
17061 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
17064 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
17066 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
17068 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
17070 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
17073 2018-06-08 Martin Liska <mliska@suse.cz>
17075 * tree-cfg.h (debug_function): Fix argument type to match
17078 2018-06-08 Martin Liska <mliska@suse.cz>
17080 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
17081 Remove usage of MPX-related (and removed) fields.
17082 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
17084 2018-06-08 David Malcolm <dmalcolm@redhat.com>
17086 * cfg.c (debug): Use TDF_NONE rather than 0.
17087 * cfghooks.c (debug): Likewise.
17088 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
17089 (struct dump_option_value_info): Convert to...
17090 (struct kv_pair): ...this template type.
17091 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
17093 (optinfo_verbosity_options): Likewise.
17094 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
17096 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
17097 than int for "optgroup_flags" param.
17098 (dump_generic_expr_loc): Use dump_flags_t rather than int for
17100 (dump_dec): Likewise.
17101 (dump_finish): Use TDF_NONE rather than 0.
17102 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
17103 rather than int for "optgroup_flags" param. Use TDF_NONE rather
17104 than 0. Update for change to option_ptr.
17105 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
17106 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
17107 0. Update for changes to optinfo_verbosity_options and
17109 (opt_info_switch_p): Convert optgroup_flags from int to
17111 (dump_basic_block): Use dump_flags_t rather than int
17112 for "dump_kind" param.
17113 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
17114 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
17115 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
17116 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
17117 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
17118 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
17119 TDF_NONE): Convert from macros to...
17120 (enum dump_flag): ...this new enum.
17121 (dump_flags_t): Update to use enum.
17122 (operator|, operator&, operator~, operator|=, operator&=):
17123 Implement for dump_flags_t.
17124 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
17125 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
17126 Convert from macros to...
17127 (enum optgroup_flag): ...this new enum.
17128 (optgroup_flags_t): New typedef.
17129 (operator|, operator|=): Implement for optgroup_flags_t.
17130 (struct dump_file_info): Convert field "alt_flags" to
17131 dump_flags_t. Convert field "optgroup_flags" to
17133 (dump_basic_block): Use dump_flags_t rather than int for param.
17134 (dump_generic_expr_loc): Likewise.
17135 (dump_dec): Likewise.
17136 (dump_register): Convert param "optgroup_flags" to
17138 (opt_info_enable_passes): Likewise.
17139 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
17141 * gimple-pretty-print.c (debug): Likewise.
17142 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
17143 (merged_store_group::apply_stores): Likewise.
17144 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
17145 * gimple.c (verify_gimple_pp): Likewise.
17146 * graphite-poly.c (print_pbb_body): Likewise.
17147 * passes.c (pass_manager::register_one_dump_file): Convert
17148 local "optgroup_flags" to optgroup_flags_t.
17149 * print-tree.c (print_node): Use TDF_NONE rather than 0.
17151 (debug_body): Likewise.
17152 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
17153 to optgroup_flags_t.
17154 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
17156 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
17157 (convert_mult_to_fma): Likewise.
17158 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
17159 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
17160 * tree-vect-data-refs.c (dump_lower_bound): Convert param
17161 "dump_kind" to dump_flags_t.
17163 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
17165 * config/rs6000/rs6000.c (min, max): Delete.
17167 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
17169 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
17170 -mabi=spe and -mabi=no-spe.
17172 2018-06-08 Martin Liska <mliska@suse.cz>
17174 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
17175 where we expect an existing summary.
17177 2018-06-08 Martin Liska <mliska@suse.cz>
17179 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
17180 * ipa-inline.h (estimate_edge_growth): Likewise.
17182 2018-06-08 Martin Liska <mliska@suse.cz>
17184 * cgraph.c (function_version_hasher::hash): Use
17185 cgraph_node::get_uid ().
17186 (function_version_hasher::equal):
17187 * cgraph.h (cgraph_node::get_uid): New method.
17188 * ipa-inline.c (update_caller_keys): Use
17189 cgraph_node::get_uid ().
17190 (update_callee_keys): Likewise.
17191 * ipa-utils.c (searchc): Likewise.
17192 (ipa_reduced_postorder): Likewise.
17193 * lto-cgraph.c (input_node): Likewise.
17194 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
17195 * symbol-summary.h (symtab_insertion): Likewise.
17196 (symtab_removal): Likewise.
17197 (symtab_duplication): Likewise.
17198 * tree-pretty-print.c (dump_function_header): Likewise.
17199 * tree-sra.c (convert_callers_for_node): Likewise.
17201 2018-06-08 Martin Liska <mliska@suse.cz>
17203 * cgraph.c (symbol_table::create_edge): Always assign a new
17205 (symbol_table::free_edge): Do not recycle numbers.
17206 * cgraph.h (cgraph_edge::get): New method.
17207 * symbol-summary.h (symtab_removal): Use it.
17208 (symtab_duplication): Likewise.
17209 (call_summary::hashable_uid): Remove.
17211 2018-06-08 Martin Liska <mliska@suse.cz>
17213 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
17214 (initialize_growth_caches): Remove.
17215 (free_growth_caches): Likewise.
17216 (do_estimate_edge_time): Use edge_growth_cache.
17217 (do_estimate_edge_size): Likewise.
17218 (do_estimate_edge_hints): Likewise.
17219 * ipa-inline.c (reset_edge_caches): Likewise.
17220 (recursive_inlining): Likewise.
17221 (inline_small_functions): Likewise.
17222 * ipa-inline.h (initialize_growth_caches): Remove.
17223 (estimate_edge_size): Likewise.
17224 (estimate_edge_time): Likewise.
17225 (estimate_edge_hints): Likewise.
17226 (reset_edge_growth_cache): Likewise.
17227 * symbol-summary.h (call_summary::remove): New method.
17229 2018-06-08 Martin Liska <mliska@suse.cz>
17231 * ipa-cp.c (class edge_clone_summary): New summary.
17232 (grow_edge_clone_vectors): Remove.
17233 (ipcp_edge_duplication_hook): Remove.
17234 (class edge_clone_summary_t): New call_summary class.
17235 (ipcp_edge_removal_hook): Remove.
17236 (edge_clone_summary_t::duplicate): New function.
17237 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
17238 (create_specialized_node): Likewise.
17239 (ipcp_driver): Initialize edge_clone_summaries and do not
17242 2018-06-08 Martin Liska <mliska@suse.cz>
17244 * symbol-summary.h (get): New function.
17245 (call_summary::m_initialize_when_cloning): New class member.
17247 2018-06-08 Martin Liska <mliska@suse.cz>
17249 * cgraph.c (cgraph_node::remove): Do not recycle uid.
17250 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
17251 (symbol_table::allocate_cgraph_symbol): Do not set uid.
17252 * passes.c (uid_hash_t): Record removed_nodes by their uids.
17253 (remove_cgraph_node_from_order): Use the removed_nodes set.
17254 (do_per_function_toporder): Likwise.
17255 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
17256 instead of summary_uid.
17257 (symtab_removal): Likewise.
17258 (symtab_duplication): Likewise.
17260 2018-06-08 Martin Liska <mliska@suse.cz>
17262 * ipa-cp.c (ipcp_store_bits_results): Use
17263 ipcp_transformation_sum.
17264 (ipcp_store_vr_results): Likewise.
17265 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
17267 (ipcp_transformation_initialize): ... this.
17268 (ipa_set_node_agg_value_chain):
17269 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
17270 (write_ipcp_transformation_info): Likewise.
17271 (read_ipcp_transformation_info): Likewise.
17272 (ipcp_update_bits): Likewise.
17273 (ipcp_update_vr): Likewise.
17274 (ipcp_transform_function): Likewise.
17275 * ipa-prop.h: Rename ipcp_transformation_summary to
17276 ipcp_transformation.
17277 (class ipcp_transformation_t): New function summary.
17278 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
17279 (ipa_get_agg_replacements_for_node): Likewise.
17281 2018-06-08 Martin Liska <mliska@suse.cz>
17283 * ipa-pure-const.c (struct funct_state_d): Do it class instead
17285 (class funct_state_summary_t): New function_summary class.
17286 (has_function_state): Remove.
17287 (get_function_state): Likewise.
17288 (set_function_state): Likewise.
17289 (add_new_function): Likewise.
17290 (funct_state_summary_t::insert): New function.
17291 (duplicate_node_data): Remove.
17292 (remove_node_data): Remove.
17293 (funct_state_summary_t::duplicate): New function.
17294 (register_hooks): Create new funct_state_summaries.
17295 (pure_const_generate_summary): Use it.
17296 (pure_const_write_summary): Likewise.
17297 (pure_const_read_summary): Likewise.
17298 (propagate_pure_const): Likewise.
17299 (propagate_nothrow): Likewise.
17300 (dump_malloc_lattice): Likewise.
17301 (propagate_malloc): Likewise.
17302 (execute): Do not register hooks, just remove summary
17304 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
17307 2018-06-08 Martin Liska <mliska@suse.cz>
17309 * ipa-reference.c (remove_node_data): Remove.
17310 (duplicate_node_data): Likewise.
17311 (class ipa_ref_var_info_summary_t): New class.
17312 (class ipa_ref_opt_summary_t): Likewise.
17313 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
17314 (get_reference_optimization_summary): Use
17315 ipa_ref_opt_sum_summaries.
17316 (set_reference_vars_info): Remove.
17317 (set_reference_optimization_summary): Likewise.
17318 (ipa_init): Create summaries.
17319 (init_function_info): Use function summary.
17320 (ipa_ref_opt_summary_t::duplicate): New function.
17321 (ipa_ref_opt_summary_t::remove): New function.
17322 (get_read_write_all_from_node): Fix GNU coding style.
17323 (propagate): Use function summary.
17324 (write_node_summary_p): Fix GNU coding style.
17325 (stream_out_bitmap): Likewise.
17326 (ipa_reference_read_optimization_summary): Use function summary.
17327 (ipa_reference_c_finalize): Do not release hooks.
17329 2018-06-08 Martin Liska <mliska@suse.cz>
17331 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
17332 (analyze_function_body): Extract multiple calls of get_create.
17333 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
17334 * ipa-inline.c (recursive_inlining): Use ::get method.
17335 * ipa-inline.h (estimate_edge_growth): Likewise.
17337 2018-06-08 Martin Liska <mliska@suse.cz>
17339 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
17341 (hsa_function_summary::hsa_function_summary): Use the new enum
17343 (hsa_gpu_implementation_p): Use hsa_summaries::get.
17344 * hsa-gen.c (hsa_get_host_function): Likewise.
17345 (get_brig_function_name): Likewise.
17346 * ipa-hsa.c (process_hsa_functions): Likewise.
17347 (ipa_hsa_write_summary): Likewise.
17348 * symbol-summary.h (symtab_duplication): Use ::get function/
17349 (get): New function.
17351 2018-06-08 Martin Liska <mliska@suse.cz>
17353 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
17355 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
17356 (hsa_register_kernel): Likewise.
17357 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
17358 * hsa-gen.c (hsa_get_host_function): Likewise.
17359 (get_brig_function_name): Likewise.
17360 (generate_hsa): Likewise.
17361 (pass_gen_hsail::execute): Likewise.
17362 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
17363 (devirtualization_time_bonus): Likewise.
17364 (ipcp_propagate_stage): Likewise.
17365 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
17366 (edge_set_predicate): Likewise.
17367 (evaluate_conditions_for_known_args): Likewise.
17368 (evaluate_properties_for_edge): Likewise.
17369 (ipa_fn_summary::reset): Likewise.
17370 (ipa_fn_summary_t::duplicate): Likewise.
17371 (dump_ipa_call_summary): Likewise.
17372 (ipa_dump_fn_summary): Likewise.
17373 (analyze_function_body): Likewise.
17374 (compute_fn_summary): Likewise.
17375 (estimate_edge_devirt_benefit): Likewise.
17376 (estimate_edge_size_and_time): Likewise.
17377 (estimate_calls_size_and_time): Likewise.
17378 (estimate_node_size_and_time): Likewise.
17379 (inline_update_callee_summaries): Likewise.
17380 (remap_edge_change_prob): Likewise.
17381 (remap_edge_summaries): Likewise.
17382 (ipa_merge_fn_summary_after_inlining): Likewise.
17383 (ipa_update_overall_fn_summary): Likewise.
17384 (read_ipa_call_summary): Likewise.
17385 (inline_read_section): Likewise.
17386 (write_ipa_call_summary): Likewise.
17387 (ipa_fn_summary_write): Likewise.
17388 (ipa_free_fn_summary): Likewise.
17389 * ipa-hsa.c (process_hsa_functions): Likewise.
17390 (ipa_hsa_write_summary): Likewise.
17391 (ipa_hsa_read_section): Likewise.
17392 * ipa-icf.c (sem_function::merge): Likewise.
17393 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
17394 (do_estimate_edge_time): Likewise.
17395 (estimate_size_after_inlining): Likewise.
17396 (estimate_growth): Likewise.
17397 (growth_likely_positive): Likewise.
17398 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
17399 (inline_call): Likewise.
17400 * ipa-inline.c (caller_growth_limits): Likewise.
17401 (can_inline_edge_p): Likewise.
17402 (can_inline_edge_by_limits_p): Likewise.
17403 (compute_uninlined_call_time): Likewise.
17404 (compute_inlined_call_time): Likewise.
17405 (want_inline_small_function_p): Likewise.
17406 (edge_badness): Likewise.
17407 (update_caller_keys): Likewise.
17408 (update_callee_keys): Likewise.
17409 (recursive_inlining): Likewise.
17410 (inline_small_functions): Likewise.
17411 (inline_to_all_callers_1): Likewise.
17412 (dump_overall_stats): Likewise.
17413 (early_inline_small_functions): Likewise.
17414 (early_inliner): Likewise.
17415 * ipa-inline.h (estimate_edge_growth): Likewise.
17416 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
17417 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
17418 * ipa-prop.h (IPA_NODE_REF): Likewise.
17419 (IPA_EDGE_REF): Likewise.
17420 * ipa-pure-const.c (malloc_candidate_p): Likewise.
17421 (propagate_malloc): Likewise.
17422 * ipa-split.c (execute_split_functions): Likewise.
17423 * symbol-summary.h: Rename get to get_create.
17425 (get_create): Likewise.
17426 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
17428 2018-06-08 Martin Liska <mliska@suse.cz>
17430 * symbol-summary.h (release): Move definition out of class
17432 (symtab_removal): Likewise.
17433 (symtab_duplication): Likewise.
17435 2018-06-08 Martin Liska <mliska@suse.cz>
17437 * symbol-summary.h (function_summary): Move constructor
17438 implementation out of class declaration.
17439 (release): Likewise.
17440 (symtab_insertion): Likewise.
17441 (symtab_removal): Likewise.
17442 (symtab_duplication): Likewise.
17445 2018-06-08 Martin Liska <mliska@suse.cz>
17447 * Makefile.in: Remove support for MPX (macros, related functions,
17448 fields in cgraph_node, ...).
17449 * builtin-types.def (BT_BND): Likewise.
17450 (BT_FN_BND_CONST_PTR): Likewise.
17451 (BT_FN_CONST_PTR_BND): Likewise.
17452 (BT_FN_VOID_PTR_BND): Likewise.
17453 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
17454 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
17455 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
17456 (expand_builtin_mempcpy_with_bounds): Likewise.
17457 (expand_builtin_memset_with_bounds): Likewise.
17458 (expand_builtin_memset_args): Likewise.
17459 (std_expand_builtin_va_start): Likewise.
17460 (expand_builtin): Likewise.
17461 (expand_builtin_with_bounds): Likewise.
17462 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
17463 (DEF_LIB_BUILTIN_CHKP): Likewise.
17464 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
17465 (DEF_CHKP_BUILTIN): Likewise.
17466 (BUILT_IN_MEMCPY): Likewise.
17467 (BUILT_IN_MEMMOVE): Likewise.
17468 (BUILT_IN_MEMPCPY): Likewise.
17469 (BUILT_IN_MEMSET): Likewise.
17470 (BUILT_IN_STPCPY): Likewise.
17471 (BUILT_IN_STRCAT): Likewise.
17472 (BUILT_IN_STRCHR): Likewise.
17473 (BUILT_IN_STRCPY): Likewise.
17474 (BUILT_IN_STRLEN): Likewise.
17475 (BUILT_IN_MEMCPY_CHK): Likewise.
17476 (BUILT_IN_MEMMOVE_CHK): Likewise.
17477 (BUILT_IN_MEMPCPY_CHK): Likewise.
17478 (BUILT_IN_MEMSET_CHK): Likewise.
17479 (BUILT_IN_STPCPY_CHK): Likewise.
17480 (BUILT_IN_STRCAT_CHK): Likewise.
17481 (BUILT_IN_STRCPY_CHK): Likewise.
17482 * calls.c (store_bounds): Likewise.
17483 (emit_call_1): Likewise.
17484 (special_function_p): Likewise.
17485 (maybe_warn_nonstring_arg): Likewise.
17486 (initialize_argument_information): Likewise.
17487 (finalize_must_preallocate): Likewise.
17488 (compute_argument_addresses): Likewise.
17489 (expand_call): Likewise.
17490 * cfgexpand.c (expand_call_stmt): Likewise.
17491 (expand_return): Likewise.
17492 (expand_gimple_stmt_1): Likewise.
17493 (pass_expand::execute): Likewise.
17494 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
17495 (cgraph_node::remove): Likewise.
17496 (cgraph_node::dump): Likewise.
17497 (cgraph_node::verify_node): Likewise.
17498 * cgraph.h (chkp_function_instrumented_p): Likewise.
17499 (symtab_node::get_alias_target): Likewise.
17500 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
17501 (cgraph_local_p): Likewise.
17502 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
17503 (cgraph_edge::rebuild_references): Likewise.
17504 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
17505 (walk_polymorphic_call_targets): Likewise.
17506 (cgraph_node::expand_thunk): Likewise.
17507 (symbol_table::output_weakrefs): Likewise.
17508 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
17509 (ix86_handle_option): Likewise.
17510 * config/i386/constraints.md: Likewise.
17511 * config/i386/i386-builtin-types.def (BND): Likewise.
17515 * config/i386/i386-builtin.def (BDESC_END): Likewise.
17516 (BDESC_FIRST): Likewise.
17518 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
17519 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
17520 * config/i386/i386.c (enum reg_class): Likewise.
17521 (ix86_target_string): Likewise.
17522 (ix86_option_override_internal): Likewise.
17523 (ix86_conditional_register_usage): Likewise.
17524 (ix86_valid_target_attribute_inner_p): Likewise.
17525 (ix86_set_indirect_branch_type): Likewise.
17526 (ix86_set_current_function): Likewise.
17527 (ix86_function_arg_regno_p): Likewise.
17528 (init_cumulative_args): Likewise.
17529 (ix86_function_arg_advance): Likewise.
17530 (ix86_function_arg): Likewise.
17531 (ix86_pass_by_reference): Likewise.
17532 (ix86_function_value_regno_p): Likewise.
17533 (ix86_function_value_1): Likewise.
17534 (ix86_function_value_bounds): Likewise.
17535 (ix86_return_in_memory): Likewise.
17536 (ix86_setup_incoming_vararg_bounds): Likewise.
17537 (ix86_va_start): Likewise.
17538 (indirect_thunk_need_prefix): Likewise.
17539 (print_reg): Likewise.
17540 (ix86_print_operand): Likewise.
17541 (ix86_expand_call): Likewise.
17542 (ix86_output_function_return): Likewise.
17543 (reg_encoded_number): Likewise.
17544 (BDESC_VERIFYS): Likewise.
17545 (ix86_init_mpx_builtins): Likewise.
17546 (ix86_init_builtins): Likewise.
17547 (ix86_emit_cmove): Likewise.
17548 (ix86_emit_move_max): Likewise.
17549 (ix86_expand_builtin): Likewise.
17550 (ix86_builtin_mpx_function): Likewise.
17551 (ix86_get_arg_address_for_bt): Likewise.
17552 (ix86_load_bounds): Likewise.
17553 (ix86_store_bounds): Likewise.
17554 (ix86_load_returned_bounds): Likewise.
17555 (ix86_store_returned_bounds): Likewise.
17556 (ix86_class_likely_spilled_p): Likewise.
17557 (ix86_hard_regno_mode_ok): Likewise.
17558 (x86_order_regs_for_local_alloc): Likewise.
17559 (ix86_mitigate_rop): Likewise.
17560 (ix86_bnd_prefixed_insn_p): Likewise.
17561 (ix86_mpx_bound_mode): Likewise.
17562 (ix86_make_bounds_constant): Likewise.
17563 (ix86_initialize_bounds): Likewise.
17564 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
17565 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
17566 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
17567 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
17568 (TARGET_CHKP_BOUND_MODE): Likewise.
17569 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
17570 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
17571 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
17572 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
17573 * config/i386/i386.h (TARGET_MPX): Likewise.
17574 (TARGET_MPX_P): Likewise.
17575 (VALID_BND_REG_MODE): Likewise.
17576 (FIRST_BND_REG): Likewise.
17577 (LAST_BND_REG): Likewise.
17578 (enum reg_class): Likewise.
17579 (BND_REG_P): Likewise.
17580 (BND_REGNO_P): Likewise.
17581 (BNDmode): Likewise.
17582 (ADJUST_INSN_LENGTH): Likewise.
17583 * config/i386/i386.md: Likewise.
17584 * config/i386/i386.opt: Likewise.
17585 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
17586 (defined): Likewise.
17587 (LINK_MPX): Likewise.
17588 (MPX_SPEC): Likewise.
17589 (LIBMPX_SPEC): Likewise.
17590 (LIBMPXWRAPPERS_SPEC): Likewise.
17591 (CHKP_SPEC): Likewise.
17592 * config/i386/predicates.md: Likewise.
17593 * dbxout.c (dbxout_type): Likewise.
17594 * doc/extend.texi: Likewise.
17595 * doc/invoke.texi: Likewise.
17596 * doc/md.texi: Likewise.
17597 * doc/tm.texi: Likewise.
17598 * doc/tm.texi.in: Likewise.
17599 * dwarf2out.c (is_base_type): Likewise.
17600 (gen_formal_types_die): Likewise.
17601 (gen_subprogram_die): Likewise.
17602 (gen_type_die_with_usage): Likewise.
17603 (gen_decl_die): Likewise.
17604 (dwarf2out_late_global_decl): Likewise.
17605 * expr.c (expand_assignment): Likewise.
17606 (emit_storent_insn): Likewise.
17607 (store_expr_with_bounds): Likewise.
17608 (store_expr): Likewise.
17609 (expand_expr_real_1): Likewise.
17610 * expr.h (store_expr_with_bounds): Likewise.
17611 * function.c (use_register_for_decl): Likewise.
17612 (struct bounds_parm_data): Likewise.
17613 (assign_parms_augmented_arg_list): Likewise.
17614 (assign_parm_find_entry_rtl): Likewise.
17615 (assign_parm_is_stack_parm): Likewise.
17616 (assign_parm_load_bounds): Likewise.
17617 (assign_bounds): Likewise.
17618 (assign_parms): Likewise.
17619 (expand_function_start): Likewise.
17620 * gcc.c (CHKP_SPEC): Likewise.
17621 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
17622 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
17623 (wrestrict_dom_walker::check_call): Likewise.
17624 * gimple.c (gimple_build_call_from_tree): Likewise.
17625 * gimple.h (enum gf_mask): Likewise.
17626 (gimple_call_with_bounds_p): Likewise.
17627 (gimple_call_set_with_bounds): Likewise.
17628 * gimplify.c (gimplify_init_constructor): Likewise.
17629 * ipa-cp.c (initialize_node_lattices): Likewise.
17630 (propagate_constants_across_call): Likewise.
17631 (find_more_scalar_values_for_callers_subset): Likewise.
17632 * ipa-hsa.c (process_hsa_functions): Likewise.
17633 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
17634 * ipa-icf.c (sem_function::merge): Likewise.
17635 * ipa-inline.c (early_inliner): Likewise.
17636 * ipa-pure-const.c (warn_function_noreturn): Likewise.
17637 (warn_function_cold): Likewise.
17638 (propagate_pure_const): Likewise.
17639 * ipa-ref.h (enum GTY): Likewise.
17640 * ipa-split.c (find_retbnd): Likewise.
17641 (consider_split): Likewise.
17642 (split_function): Likewise.
17643 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
17644 * ipa.c (walk_polymorphic_call_targets): Likewise.
17645 (symbol_table::remove_unreachable_nodes): Likewise.
17646 (process_references): Likewise.
17647 (cgraph_build_static_cdtor_1): Likewise.
17648 * lto-cgraph.c (lto_output_node): Likewise.
17649 (output_refs): Likewise.
17650 (compute_ltrans_boundary): Likewise.
17651 (input_overwrite_node): Likewise.
17652 (input_node): Likewise.
17653 (input_cgraph_1): Likewise.
17654 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
17655 * passes.c (pass_manager::execute_early_local_passes): Likewise.
17656 (class pass_chkp_instrumentation_passes): Likewise.
17657 (make_pass_chkp_instrumentation_passes): Likewise.
17658 * passes.def: Likewise.
17659 * rtl.h (struct GTY): Likewise.
17660 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
17661 * stor-layout.c (layout_type): Likewise.
17662 * symtab.c: Likewise.
17663 * target.def: Likewise.
17664 * targhooks.c (default_chkp_bound_type): Likewise.
17665 (default_chkp_bound_mode): Likewise.
17666 (default_builtin_chkp_function): Likewise.
17667 (default_chkp_function_value_bounds): Likewise.
17668 (default_chkp_make_bounds_constant): Likewise.
17669 (default_chkp_initialize_bounds): Likewise.
17670 * targhooks.h (default_chkp_bound_type): Likewise.
17671 (default_chkp_bound_mode): Likewise.
17672 (default_builtin_chkp_function): Likewise.
17673 (default_chkp_function_value_bounds): Likewise.
17674 (default_chkp_make_bounds_constant): Likewise.
17675 (default_chkp_initialize_bounds): Likewise.
17676 * toplev.c (compile_file): Likewise.
17677 (process_options): Likewise.
17678 * tree-core.h (DEF_BUILTIN): Likewise.
17679 (DEF_BUILTIN_CHKP): Likewise.
17680 * tree-inline.c (declare_return_variable): Likewise.
17681 (remap_gimple_stmt): Likewise.
17682 (copy_bb): Likewise.
17683 (initialize_inlined_parameters): Likewise.
17684 (expand_call_inline): Likewise.
17685 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
17686 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
17687 (make_pass_ipa_chkp_produce_thunks): Likewise.
17688 (make_pass_chkp): Likewise.
17689 (make_pass_chkp_opt): Likewise.
17690 (make_pass_chkp_instrumentation_passes): Likewise.
17691 * tree-pretty-print.c (dump_generic_node): Likewise.
17692 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
17693 * tree-ssa-dce.c (propagate_necessity): Likewise.
17694 (eliminate_unnecessary_stmts): Likewise.
17695 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
17696 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
17697 * tree-ssa-sccvn.h: Likewise.
17698 * tree-ssa-strlen.c (get_string_length): Likewise.
17699 (valid_builtin_call): Likewise.
17700 (adjust_last_stmt): Likewise.
17701 (handle_builtin_strchr): Likewise.
17702 (handle_builtin_strcpy): Likewise.
17703 (handle_builtin_stxncpy): Likewise.
17704 (handle_builtin_memcpy): Likewise.
17705 (handle_builtin_strcat): Likewise.
17706 (strlen_check_and_optimize_stmt): Likewise.
17707 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
17708 * tree-streamer-in.c: Likewise.
17709 * tree-streamer.c (record_common_node): Likewise.
17710 * tree.c (tree_code_size): Likewise.
17711 (wide_int_to_tree_1): Likewise.
17712 (type_contains_placeholder_1): Likewise.
17713 (build_common_tree_nodes): Likewise.
17714 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
17715 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
17716 (POINTER_BOUNDS_P): Likewise.
17717 (BOUNDED_TYPE_P): Likewise.
17718 (BOUNDED_P): Likewise.
17719 (CALL_WITH_BOUNDS_P): Likewise.
17720 (pointer_bounds_type_node): Likewise.
17721 * value-prof.c (gimple_ic): Likewise.
17722 * var-tracking.c (vt_add_function_parameters): Likewise.
17723 * varasm.c (make_decl_rtl): Likewise.
17724 (assemble_start_function): Likewise.
17725 (output_constant): Likewise.
17726 (maybe_assemble_visibility): Likewise.
17727 * varpool.c (ctor_for_folding): Likewise.
17728 * chkp-builtins.def: Remove.
17729 * ipa-chkp.c: Remove.
17730 * ipa-chkp.h: Remove.
17731 * rtl-chkp.c: Remove.
17732 * rtl-chkp.h: Remove.
17733 * tree-chkp-opt.c: Remove.
17734 * tree-chkp.c: Remove.
17735 * tree-chkp.h: Remove.
17737 2018-06-07 Carl Love <cel@us.ibm.com>
17739 * config/rs6000/vsx.md (vextract_fp_from_shorth,
17740 vextract_fp_from_shortl): Add BE support.
17742 2018-06-07 Paul Koning <ni1d@arrl.net>
17744 * compare-elim.c (try_merge_compare): Don't merge compare if
17745 address contains a side effect.
17746 (try_eliminate_compare): Likewise.
17748 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
17750 * config.gcc: Support "tremont".
17751 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
17752 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
17754 * config/i386/i386.c (m_TREMONT): Define.
17755 (processor_target_table): Add "tremont".
17756 (PTA_TREMONT): Define.
17757 (ix86_lea_outperforms): Add TARGET_TREMONT.
17758 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
17759 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
17760 and M_INTEL_GOLDMONT_PLUS.
17761 (fold_builtin_cpu): Add "tremont".
17762 (ix86_add_stmt_cost): Add TARGET_TREMONT.
17763 (ix86_option_override_internal): Add "tremont".
17764 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
17765 (processor_type): Add PROCESSOR_TREMONT.
17766 * config/i386/x86-tune.def: Add m_TREMONT.
17767 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
17769 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
17771 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
17772 symbol defined for msp430i* devices to be lower case.
17774 2018-06-07 Richard Biener <rguenther@suse.de>
17776 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
17777 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
17778 Properly wrap signed arithmetic if overflow wraps.
17780 2018-06-07 Jakub Jelinek <jakub@redhat.com>
17782 PR tree-optimization/69615
17783 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
17784 of a cast from a same precision integral SSA_NAME in a bb dominated
17785 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
17786 cast to utype if rhs2 has already a compatible type.
17788 2018-06-07 Richard Biener <rguenther@suse.de>
17790 PR tree-optimization/85935
17791 * graphite-scop-detection.c (find_params_in_bb): Analyze
17792 condition operands with respect to the correct loop. Assert
17793 the analysis doesn't fail.
17795 2018-06-04 Carl Love <cel@us.ibm.com>
17797 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
17798 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
17799 as it is slightly cheaper.
17800 (first_match_or_eos_index_<mode>):
17801 Calculate index using natural element order.
17802 (first_match_index_<mode>):
17803 Calculate index using natural element order.
17804 (first_match_or_eos_index_<mode>):
17805 Calculate index using natural order.
17806 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
17807 for BE and LE modes.
17808 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
17809 P9V_BUILTIN_VCLZLSBB_V16QI.
17810 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
17813 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
17815 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
17816 indentation and line wrap for many prototypes. Add missing
17817 @smallexample directives around block of prototypes for vec_xl and
17820 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
17822 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
17823 track if we pass or return IEEE 128-bit floating point.
17824 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
17825 C++ mangling that is compatible with GCC 8.1.
17826 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
17827 (init_cumulative_args): Note if we pass or return IEEE 128-bit
17828 floating point types.
17829 (rs6000_function_arg_advance_1): Likewise.
17830 (rs6000_mangle_type): Optionally generate mangled names that match
17831 what GCC 8.1 generated for IEEE 128-bit floating point types.
17832 (rs6000_globalize_decl_name): If we have an external function that
17833 passes or returns IEEE 128-bit types, generate a weak reference
17834 from the mangled name used in GCC 8.1 to the current mangled
17836 (rs6000_init_builtins): Make __ibm128 use the long double type if
17837 long double is IBM extended double. Make __float128 use the long
17838 double type if long double is IEEE 128-bit.
17841 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
17842 macro for __ibm128 built-in functions.
17843 (PACK_IF): Add __ibm128 pack/unpack functions.
17844 (UNPACK_IF): Likewise.
17845 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
17846 enable long double built-in functions if long double is IEEE
17847 128-bit floating point.
17848 (rs6000_invalid_builtin): Update long double built-in function
17850 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
17851 functions, adjust the built-in function to use the long double
17852 built-in function if __ibm128 and long double are the same type.
17853 * doc/extend.texi (PowerPC builtins): Update documention for
17854 __builtin_{,un}pack_longdouble. Add documentation for
17855 __builtin_{,un}pack_ibm128.
17857 2018-06-06 Jim Wilson <jimw@sifive.com>
17859 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
17860 (struct machine_function): New field interrupt_mode.
17861 (riscv_handle_type_attribute): New function. Add forward declaration.
17862 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
17863 (riscv_expand_epilogue): Check interrupt_mode field.
17864 (riscv_set_current_function): Check interrupt attribute args and
17865 set interrupt_mode field.
17866 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
17867 (riscv_sret, riscv_uret): New.
17868 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
17869 new arguments to interrupt attribute.
17871 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
17874 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
17875 Don't handle -mcpu=power8 if -mpower9-vector is also used.
17877 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
17879 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
17880 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
17881 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
17882 several redundant entries.
17884 2018-06-06 David Malcolm <dmalcolm@redhat.com>
17886 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
17887 type from "rtx" to "rtx_insn *".
17888 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
17889 for local "call_insn", removing cast.
17890 (ix86_expand_call): Likewise, introducing a "call_insn" local.
17892 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
17894 PR tree-optimization/86066
17895 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
17896 for BIT_INSERT_EXPR stores.
17898 2018-06-06 Richard Biener <rguenther@suse.de>
17900 PR tree-optimization/86062
17901 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
17902 component refs ontop
17903 of to be offsetted base.
17905 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
17907 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
17908 to be static and remove check on interrupt attribute name.
17910 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
17912 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
17913 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
17915 2018-06-05 Steve Ellcey <sellcey@cavium.com>
17918 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
17920 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
17921 Remove second argument, change how error is called.
17922 (aarch64_layout_arg): Remove second argument from
17923 aarch64_err_no_fpadvsimd call.
17924 (aarch64_init_cumulative_args): Ditto.
17925 (aarch64_gimplify_va_arg_expr): Ditto.
17926 * config/aarch64/aarch64.md (mov<mode>): Ditto.
17928 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
17930 * config/i386/i386.md (simple_return_indirect_internal): New expander.
17931 (*simple_return_indirect_internal<mode>): Rename from
17932 simple_return_indirect_internal. Use W mode iterator.
17933 (rstorssp): New expander.
17934 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
17935 (clrssbsy): New expander.
17936 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
17938 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
17940 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
17942 (cmse_check_pointed_object): Likewise.
17944 2018-06-05 Martin Liska <mliska@suse.cz>
17946 PR gcov-profile/47618
17947 * doc/invoke.texi: Document how -fprofile-dir format
17950 2018-06-05 Richard Biener <rguenther@suse.de>
17952 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
17953 removal pretend DOM info isn't available so we do not update
17954 it and only remove edges, not dominated blocks. Actually free
17955 DOM info in case we removed something. Remove unreachable blocks.
17956 (mfb_keep_latches): Work with either DOM info or marked backedges.
17957 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
17958 first. Mark backedges if DOM info isn't available.
17959 (Re-)compute DOM info after cleanup_control_flow_pre.
17961 2018-06-05 Richard Biener <rguenther@suse.de>
17963 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
17964 (locus_discrim_hasher::hash): Adjust.
17965 (locus_discrim_hasher::equal): Likewise.
17966 (next_discriminator_for_locus): Work on line directly.
17967 (same_line_p): Pass in expanded locus1 as well.
17968 (assign_discriminators): Avoid redundant location expansions.
17970 2018-06-05 Richard Biener <rguenther@suse.de>
17972 PR tree-optimization/86046
17973 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
17974 if required after clearing TREE_ADDRESSABLE.
17976 2018-06-05 Richard Biener <rguenther@suse.de>
17978 PR tree-optimization/86047
17979 * tree-ssa-loop.c (for_each_index): Glob handling of all
17980 decls and constants and really handle all of them.
17982 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17985 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
17986 qualifier_void_pointer and qualifier_const_void_pointer.
17987 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
17988 (arm_init_builtins): Handle the above.
17989 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
17990 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
17991 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
17994 2018-06-05 Martin Liska <mliska@suse.cz>
17996 * auto-profile.c (read_autofdo_file): Do not use
17997 gcov_ctr_summary struct.
17998 (afdo_callsite_hot_enough_for_early_inline): Likewise.
17999 * coverage.c (struct counts_entry): Likewise.
18000 (read_counts_file): Read just single summary entry.
18001 (get_coverage_counts): Use gcov_summary struct.
18002 * coverage.h (get_coverage_counts): Likewise.
18003 * gcov-dump.c (dump_working_sets): Likewise.
18004 (tag_summary): Dump just single summary.
18005 * gcov-io.c (gcov_write_summary): Write just histogram
18007 (gcov_read_summary): Read just single summary.
18008 (compute_working_sets): Use gcov_summary struct.
18009 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
18010 of GCOV_COUNTERS_SUMMABLE.
18011 (GCOV_COUNTERS_SUMMABLE): Remove.
18012 (GCOV_FIRST_VALUE_COUNTER): Replace with
18013 GCOV_COUNTER_V_INTERVAL.
18014 (struct gcov_ctr_summary): Remove.
18015 (struct gcov_summary): Directly use fields of former
18017 (compute_working_sets): Use gcov_summary struct.
18018 * gcov.c (read_count_file): Do not use ctrs fields.
18019 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
18021 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
18023 * profile.c: Likewise.
18024 * profile.h: Likewise.
18026 2018-06-05 Martin Liska <mliska@suse.cz>
18028 PR gcov-profile/84846
18029 * gcov.c (output_lines): Print working directory only
18030 in intermediate format.
18032 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
18034 * config/s390/s390-builtin-types.def: Add void function type.
18035 * config/s390/s390-builtins.def: Use the function type for the
18038 2018-06-04 Jim Wilson <jimw@sifive.com>
18040 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
18042 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
18043 and maybe_eh_return. Change regno to unsigned int. Use new args to
18044 handle EH_RETURN_DATA_REGNO registers properly.
18045 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
18046 (riscv_expand_epilogue): Update comment. Change argument name and
18047 type. Update code to use new name and type. Pass new args to
18048 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
18050 * config/riscv/riscv.md (NORMAL_RETURN): New.
18051 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
18052 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
18053 (eh_return): Call gen_eh_return_internal and emit barrier.
18054 (eh_return_internal): Call riscv_expand_epilogue.
18056 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
18058 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
18059 bit_insertion field and declare can_be_merged_into method.
18060 (merged_store_group::can_be_merged_into): New method.
18061 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
18062 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
18063 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
18065 2018-06-04 Richard Biener <rguenther@suse.de>
18067 PR tree-optimization/85955
18068 * builtins.c (fold_builtin_sincos): Convert pointers to
18069 destination to appropriate type before dereferencing.
18071 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
18073 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
18075 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
18077 * expr.c (expand_expr_real_1): Force the operand into memory if
18078 its TYPE_MODE is BLKmode and if there is no integer mode for
18079 the number of bits being extracted.
18081 2018-06-04 Jakub Jelinek <jakub@redhat.com>
18085 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
18086 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
18088 2018-06-04 Richard Biener <rguenther@suse.de>
18090 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
18091 (cleanup_tree_cfg_noloop): ... single caller. Do
18092 start_recording_case_labels later.
18094 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
18096 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
18097 to _IMMINTRIN_H_INCLUDED.
18098 * config/i386/pconfigintrin.h: Ditto.
18099 * config/i386/waitpkgintrin.h: Ditto.
18100 * config/i386/immintrin.h: Add includes for sgxintrin.h,
18101 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
18102 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
18103 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
18104 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
18105 waitpkgintrin.h and cldemoteintrin.h.
18107 2018-06-04 Richard Biener <rguenther@suse.de>
18109 PR tree-optimization/86038
18110 * tracer.c (find_best_successor): Check probability for
18111 being initialized, bail out if not.
18113 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
18116 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
18117 of bits to ignore when comparing architectures.
18119 2018-06-04 Jakub Jelinek <jakub@redhat.com>
18121 PR tree-optimization/69615
18122 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
18123 maximum or minimum of the type, try to merge it also as if
18124 range1 is + [-, x - 1] or + [x + 1, -].
18127 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
18129 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
18131 PR tree-optimization/86034
18132 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
18133 the unsigned bitfield type in a bit insertion sequence if it does not
18134 have a larger precision than the bitfield size.
18135 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
18137 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
18139 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
18141 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
18143 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
18144 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
18145 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
18146 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
18148 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
18150 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
18151 Disable -fdelete-null-pointer-checks for ELF toolchain.
18153 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
18154 Kito Cheng <kito.cheng@gmail.com>
18156 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
18157 (nds32le-*-*, nds32be-*-*): Integrate checking process.
18158 (nds32*-*-*): Add glibc and uclibc conditions.
18159 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
18160 (TARGET_EXCEPT_UNWIND_INFO): Define.
18161 * config/nds32/elf.h: New file.
18162 * config/nds32/linux.h: New file.
18163 * config/nds32/nds32-elf.opt: New file.
18164 * config/nds32/nds32-linux.opt: New file.
18165 * config/nds32/nds32-fp-as-gp.c
18166 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
18167 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
18169 (nds32_asm_file_end): Ditto.
18170 (nds32_print_operand): Ditto.
18171 (nds32_insert_attributes): Ditto.
18172 (nds32_init_libfuncs): New function.
18173 (TARGET_HAVE_TLS): Define.
18174 (TARGET_INIT_LIBFUNCS): Define.
18175 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
18177 (TARGET_ELF): Apply different mcmodel setting.
18178 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
18179 been migrated into elf.h and linux.h files.
18180 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
18181 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
18182 (mcmodel): The content has been migrated into nds32-elf.opt and
18183 nds32-linux.opt files.
18184 * config/nds32/t-elf: New file.
18185 * config/nds32/t-linux: New file.
18187 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
18188 Shiva Chen <shiva0217@gmail.com>
18190 * config/nds32/constants.md (unspec_volatile_element): Add
18191 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
18192 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
18194 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
18195 (make_pass_nds32_fp_as_gp): Declare.
18196 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
18198 (nds32_asm_function_end_prologue): Remove unused asm output.
18199 (nds32_asm_function_begin_epilogue): Remove unused asm output.
18200 (nds32_asm_file_start): Output necessary fp_as_gp information.
18201 (nds32_option_override): Adjust register usage.
18202 (nds32_expand_prologue): Consider fp_as_gp situation.
18203 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
18204 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
18207 (simple_return): Ditto.
18208 (omit_fp_begin): Output special directive for fp_as_gp.
18209 (omit_fp_end): Output special directive for fp_as_gp.
18210 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
18211 mforbid-fp-as-gp): New options.
18213 2018-06-01 Mark Wielaard <mark@klomp.org>
18215 * dwarf2out.c (dwarf2out_finish): Remove generation of
18216 DW_AT_loclists_base.
18218 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
18220 * gimple-ssa-store-merging.c: Include gimple-fold.h.
18221 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
18222 (struct merged_store_group): Add bit_insertion field.
18223 (dump_char_array): Use standard hexadecimal format.
18224 (merged_store_group::merged_store_group): Set bit_insertion to false.
18225 (merged_store_group::apply_stores): Use optimal buffer size. Deal
18226 with BIT_INSERT_EXPR stores. Move up code updating the mask and
18227 also print the mask in the dump file.
18228 (pass_store_merging::gate): Minor tweak.
18229 (imm_store_chain_info::coalesce_immediate): Fix wrong association
18230 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
18231 stores with INTEGER_CST stores.
18232 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
18233 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
18234 and use it throughout. Generate bit insertion sequences if need be.
18235 (pass_store_merging::process_store): Remove redundant condition.
18236 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
18238 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
18240 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
18241 the 128-bit floating point types. Fix function comment.
18243 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18245 * config/aarch64/aarch64-simd.md
18246 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
18248 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
18251 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
18253 PR tree-optimization/85989
18254 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
18256 (backprop::intersect_uses): Check it when deciding whether this
18257 is a backedge reference.
18258 (backprop::process_block): Add each phi to m_visited_phis
18259 after visiting it, then clear it at the end.
18261 2018-06-01 Richard Biener <rguenther@suse.de>
18263 * tree-vectorizer.h (vect_dr_stmt): New function.
18264 (vect_get_load_cost): Adjust.
18265 (vect_get_store_cost): Likewise.
18266 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
18267 Use vect_dr_stmt instead of DR_SMTT.
18268 (vect_record_base_alignments): Likewise.
18269 (vect_calculate_target_alignment): Likewise.
18270 (vect_compute_data_ref_alignment): Likewise and make static.
18271 (vect_update_misalignment_for_peel): Likewise.
18272 (vect_verify_datarefs_alignment): Likewise.
18273 (vector_alignment_reachable_p): Likewise.
18274 (vect_get_data_access_cost): Likewise. Pass down
18275 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
18276 (vect_get_peeling_costs_all_drs): Likewise.
18277 (vect_peeling_hash_get_lowest_cost): Likewise.
18278 (vect_enhance_data_refs_alignment): Likewise.
18279 (vect_find_same_alignment_drs): Likewise.
18280 (vect_analyze_data_refs_alignment): Likewise.
18281 (vect_analyze_group_access_1): Likewise.
18282 (vect_analyze_group_access): Likewise.
18283 (vect_analyze_data_ref_access): Likewise.
18284 (vect_analyze_data_ref_accesses): Likewise.
18285 (vect_vfa_segment_size): Likewise.
18286 (vect_small_gap_p): Likewise.
18287 (vectorizable_with_step_bound_p): Likewise.
18288 (vect_prune_runtime_alias_test_list): Likewise.
18289 (vect_analyze_data_refs): Likewise.
18290 (vect_supportable_dr_alignment): Likewise.
18291 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
18292 (vect_gen_prolog_loop_niters): Likewise.
18293 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
18294 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
18296 (vect_recog_mask_conversion_pattern): Likewise.
18297 (vect_try_gather_scatter_pattern): Likewise.
18298 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
18299 to vect_get_store_cost.
18300 (vect_get_store_cost): Get stmt_info instead of DR.
18301 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
18302 (vect_get_load_cost): Get stmt_info instead of DR.
18304 2018-06-01 Richard Biener <rguenther@suse.de>
18306 PR middle-end/86017
18307 * gimple-fold.c (var_decl_component_p): Also allow offsetted
18308 vars wrapped in MEM_REFs.
18310 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
18312 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
18313 Fix subreg tests so that we only return a choice between
18314 GENERAL_REGS and FP_REGS if the original classes included both.
18316 2018-06-01 Richard Biener <rguenther@suse.de>
18319 * tree-ssa-structalias.c (get_function_part_constraint):
18320 Handle NULL fi->decl.
18321 (find_func_aliases_for_call): Properly handle indirect
18322 fi from direct call.
18323 (find_func_clobbers): Likewise.
18324 (ipa_pta_execute): Likewise.
18325 (create_variable_info_for): For functions that are ifunc_resolver
18326 resolve to a varinfo that contains the result of the resolver call.
18327 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
18330 2018-05-31 Michael Collison <michael.collison@arm.com>
18332 * config/aarch64/aarch64.md:
18333 (*fix_to_zero_extenddfdi2): New pattern.
18334 * gcc.target/aarch64/fix_extend1.c: New testcase.
18336 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
18338 PR middle-end/78809
18339 PR middle-end/83026
18340 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
18341 and BUILT_IN_STRNCMP_EQ.
18342 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
18343 BUILT_IN_STRNCMP_EQ.
18344 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
18345 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
18346 (gimple_fold_builtin): Likewise.
18347 * tree-ssa-strlen.c (compute_string_length): New function.
18348 (determine_min_obsize): New function.
18349 (handle_builtin_string_cmp): New function to handle calls to
18350 string compare functions.
18351 (strlen_optimize_stmt): Add handling to builtin string compare
18353 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
18354 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
18355 * tree.c (build_common_builtin_nodes): Add new defines of
18356 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
18358 2018-05-31 Jakub Jelinek <jakub@redhat.com>
18361 * bb-reorder.c (pass_partition_blocks::gate): Return false for
18362 functions with naked attribute.
18364 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
18366 * config/i386/sse.md (avx_vec_concat<mode>):
18367 Substitute concat_tg_mode mode attribute with xtg_mode.
18368 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
18369 (concat_tg_mode): Remove mode attribute.
18371 2018-05-31 Martin Sebor <msebor@redhat.com>
18374 * calls.c (alloc_max_size): Correct a logic error/typo.
18375 Treat excessive arguments as infinite. Warn for invalid arguments.
18376 * doc/invoke.texi (-Walloc-size-larger-than): Update.
18378 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
18381 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
18382 and movx for Haswell.
18384 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
18385 Cesar Philippidis <cesar@codesourcery.com>
18387 PR middle-end/85879
18388 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
18389 when emitting error on private/firstprivate reductions.
18390 * omp-low.c (lower_omp_target): Avoid reference-type processing
18391 on pointers for firstprivate clause.
18393 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
18395 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
18398 * config/aarch64/aarch64-simd.md
18399 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
18400 (aarch64_ld1_x3_<mode>): Likewise
18401 (aarch64_st1x2<VALLDIF:mode>): Likewise
18402 (aarch64_st1_x2_<mode>): Likewise
18403 (aarch64_st1x3<VALLDIF:mode>): Likewise
18404 (aarch64_st1_x3_<mode>): Likewise
18405 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
18406 (vld1_s8_x3): Likewise.
18407 (vld1_u16_x3): Likewise.
18408 (vld1_s16_x3): Likewise.
18409 (vld1_u32_x3): Likewise.
18410 (vld1_s32_x3): Likewise.
18411 (vld1_u64_x3): Likewise.
18412 (vld1_s64_x3): Likewise.
18413 (vld1_f16_x3): Likewise.
18414 (vld1_f32_x3): Likewise.
18415 (vld1_f64_x3): Likewise.
18416 (vld1_p8_x3): Likewise.
18417 (vld1_p16_x3): Likewise.
18418 (vld1_p64_x3): Likewise.
18419 (vld1q_u8_x3): Likewise.
18420 (vld1q_s8_x3): Likewise.
18421 (vld1q_u16_x3): Likewise.
18422 (vld1q_s16_x3): Likewise.
18423 (vld1q_u32_x3): Likewise.
18424 (vld1q_s32_x3): Likewise.
18425 (vld1q_u64_x3): Likewise.
18426 (vld1q_s64_x3): Likewise.
18427 (vld1q_f16_x3): Likewise.
18428 (vld1q_f32_x3): Likewise.
18429 (vld1q_f64_x3): Likewise.
18430 (vld1q_p8_x3): Likewise.
18431 (vld1q_p16_x3): Likewise.
18432 (vld1q_p64_x3): Likewise.
18433 (vst1_s64_x2): Likewise.
18434 (vst1_u64_x2): Likewise.
18435 (vst1_f64_x2): Likewise.
18436 (vst1_s8_x2): Likewise.
18437 (vst1_p8_x2): Likewise.
18438 (vst1_s16_x2): Likewise.
18439 (vst1_p16_x2): Likewise.
18440 (vst1_s32_x2): Likewise.
18441 (vst1_u8_x2): Likewise.
18442 (vst1_u16_x2): Likewise.
18443 (vst1_u32_x2): Likewise.
18444 (vst1_f16_x2): Likewise.
18445 (vst1_f32_x2): Likewise.
18446 (vst1_p64_x2): Likewise.
18447 (vst1q_s8_x2): Likewise.
18448 (vst1q_p8_x2): Likewise.
18449 (vst1q_s16_x2): Likewise.
18450 (vst1q_p16_x2): Likewise.
18451 (vst1q_s32_x2): Likewise.
18452 (vst1q_s64_x2): Likewise.
18453 (vst1q_u8_x2): Likewise.
18454 (vst1q_u16_x2): Likewise.
18455 (vst1q_u32_x2): Likewise.
18456 (vst1q_u64_x2): Likewise.
18457 (vst1q_f16_x2): Likewise.
18458 (vst1q_f32_x2): Likewise.
18459 (vst1q_f64_x2): Likewise.
18460 (vst1q_p64_x2): Likewise.
18461 (vst1_s64_x3): Likewise.
18462 (vst1_u64_x3): Likewise.
18463 (vst1_f64_x3): Likewise.
18464 (vst1_s8_x3): Likewise.
18465 (vst1_p8_x3): Likewise.
18466 (vst1_s16_x3): Likewise.
18467 (vst1_p16_x3): Likewise.
18468 (vst1_s32_x3): Likewise.
18469 (vst1_u8_x3): Likewise.
18470 (vst1_u16_x3): Likewise.
18471 (vst1_u32_x3): Likewise.
18472 (vst1_f16_x3): Likewise.
18473 (vst1_f32_x3): Likewise.
18474 (vst1_p64_x3): Likewise.
18475 (vst1q_s8_x3): Likewise.
18476 (vst1q_p8_x3): Likewise.
18477 (vst1q_s16_x3): Likewise.
18478 (vst1q_p16_x3): Likewise.
18479 (vst1q_s32_x3): Likewise.
18480 (vst1q_s64_x3): Likewise.
18481 (vst1q_u8_x3): Likewise.
18482 (vst1q_u16_x3): Likewise.
18483 (vst1q_u32_x3): Likewise.
18484 (vst1q_u64_x3): Likewise.
18485 (vst1q_f16_x3): Likewise.
18486 (vst1q_f32_x3): Likewise.
18487 (vst1q_f64_x3): Likewise.
18488 (vst1q_p64_x3): Likewise.
18490 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
18492 * config/msp430/msp430.c (msp430_output_labelref): Prepend
18493 user_label_prefix to name.
18495 * tree-core.h: Update comment about the format of NAME string
18496 passed to handler in attribute_spec.
18498 * config/msp430/msp430.md: Remove erroneous subreg expression from
18499 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
18500 zero_extend{q,h}isi2.
18502 2018-05-30 Borislav Petkov <bp@suse.de>
18504 * doc/extend.texi: Document some architecture specific
18505 constraints and sort entries.
18507 2018-05-30 Martin Sebor <msebor@redhat.com>
18509 PR middle-end/85369
18510 * builtins.c (expand_builtin_stpcpy_1): New function.
18511 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
18512 only if the former succeeds.
18514 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
18516 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
18519 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
18521 * doc/invoke.texi (-flinker-output): Document
18523 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
18525 * passes.c (ipa_write_summaries): Only modify statements if body
18527 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
18528 incrementally linking.
18529 (ipa_passes): Likewise.
18530 * lto-cgraph.c (lto_output_node): When incrementally linking do not
18531 pass down resolution info.
18532 * common.opt (flag_incremental_link): Update info.
18533 * gcc.c (plugin specs): Turn flinker-output=* to
18534 -plugin-opt=-linker-output-known
18535 * toplev.c (compile_file): Also cut compilation when doing incremental
18537 * flag-types. (enum lto_partition_model): Add
18538 LTO_LINKER_OUTPUT_NOLTOREL.
18539 (invoke.texi): Add -flinker-output docs.
18540 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
18541 link same way as WPA; do not stream in dead initializers.
18543 * dwarf2out.c (dwarf2out_die_ref_for_decl,
18544 darf2out_register_external_decl): Support incremental link.
18546 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
18548 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
18550 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
18552 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
18553 it down to simple_object_copy_lto_debug_sections.
18554 (run_gcc): Determine incremental LTO link time and configure
18555 lto1 into non-wpa mode, disable renaming of debug sections.
18557 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
18559 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
18560 descriptions of various incorrectly documented functions.
18562 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
18565 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
18566 address check not strict.
18568 2018-05-30 Richard Biener <rguenther@suse.de>
18570 PR tree-optimization/85964
18571 * tracer.c (better_p): Drop initialized count check, we only
18572 call the function with initialized counts now.
18573 (find_best_successor): Do find a best edge if one
18574 has uninitialized count.
18575 (find_best_predecessor): Likewise. Do BB frequency check only
18576 if count is initialized.
18578 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
18580 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
18581 (aarch64_ldrstr_offset_compare): New.
18582 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
18583 load/store orderings.
18584 (aarch64_gen_adjusted_ldpstp): Likewise.
18586 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
18588 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
18589 Check for subset of GENERAL_REGS and FP_REGS.
18590 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
18593 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
18595 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
18596 and wi::to_poly_offset. Add the current offset and then check
18597 whether the sum fits, rather than using an unchecked addition of
18598 a checked term. Check for a shwi rather than a uhwi.
18599 * expr.c (get_bit_range): Use tree_to_poly_uint64.
18600 (store_constructor): Use poly_int_tree_p.
18601 (expand_expr_real_1): Likewise.
18602 * function.c (assign_temp): Likewise.
18603 * fold-const.c (const_binop): Use poly_int_tree_p and
18604 wi::to_poly_offset.
18605 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
18607 * ipa-icf-gimple.c (func_checker::compare_operand): Use
18608 to_poly_offset for MEM offsets.
18609 * ipa-icf.c (sem_variable::equals): Likewise.
18610 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
18611 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
18612 wi::to_poly_offset for BIT_FIELD_REF offsets.
18613 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
18614 wi::to_poly_offset.
18615 * var-tracking.c (emit_note_insn_var_location): Use
18616 tree_to_poly_uint64.
18618 2018-05-29 Jim Wilson <jimw@sifive.com>
18620 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
18622 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
18625 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
18626 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
18628 (sse4_1_round<mode>2): Use nonimmediate_operand
18629 for operand 1 predicate.
18631 2018-05-29 Martin Sebor <msebor@redhat.com>
18632 Richard Biener <rguenther@suse.de>
18635 * calls.c (get_size_range): Call determine_value_range instead
18636 of get_value_range..
18637 * tree-vrp.h (determine_value_range): Declared new function.
18638 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
18640 2018-05-29 Richard Biener <rguenther@suse.de>
18642 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
18643 sure to use non-pattern stmts for get_earlier_stmt arguments.
18644 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
18645 called on pattern stmts.
18646 (get_later_stmt): Likewise.
18648 2018-05-29 Martin Liska <mliska@suse.cz>
18650 PR gcov-profile/85759
18651 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
18654 2018-05-29 Jakub Jelinek <jakub@redhat.com>
18656 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
18658 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
18662 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
18663 VEC_PACK_FLOAT_EXPR): New tree codes.
18664 * tree-pretty-print.c (op_code_prio): Handle
18665 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
18666 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
18667 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
18668 * tree-inline.c (estimate_operator_cost): Likewise.
18669 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
18670 * fold-const.c (const_binop): Likewise.
18671 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
18672 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
18673 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
18674 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
18675 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
18676 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
18677 * expr.c (expand_expr_real_2): Likewise.
18678 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
18679 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
18680 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
18682 * optabs.c (expand_widen_pattern_expr): For
18683 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
18684 sign from result type rather than operand's type.
18685 (expand_binop_directly): For vec_packu_float_optab and
18686 vec_packs_float_optab allow result type to be different from operand's
18688 * optabs-tree.c (optab_for_tree_code): Handle
18689 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
18690 VEC_PACK_FLOAT_EXPR. Formatting fixes.
18691 * tree-vect-generic.c (expand_vector_operations_1): Handle
18692 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
18693 VEC_PACK_FLOAT_EXPR.
18694 * tree-vect-stmts.c (supportable_widening_operation): Handle
18696 (supportable_narrowing_operation): Handle FLOAT_EXPR.
18697 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
18698 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
18699 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
18700 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
18702 (vec_pack<floatprefix>_float_<mode>): New expander.
18703 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
18705 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
18706 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
18707 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
18708 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
18709 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
18711 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
18712 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
18713 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
18714 VEC_PACK_FLOAT_EXPR): Document.
18716 2018-05-29 Richard Biener <rguenther@suse.de>
18718 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
18720 (stmt_vec_info_vec): Make pointer.
18721 (init_stmt_vec_info_vec): Remove.
18722 (free_stmt_vec_info_vec): Likewise.
18723 (set_stmt_vec_info_vec): New function.
18724 (free_stmt_vec_infos): Likewise.
18725 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
18726 (set_vinfo_for_stmt): Likewise.
18727 (get_earlier_stmt): Likewise.
18728 (get_later_stmt): Likewise.
18729 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
18730 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
18731 (vec_info::~vec_info): Free stmt_vec_infos.
18732 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
18733 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
18734 (pass_slp_vectorize::execute): Likewise.
18735 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
18736 (free_stmt_vec_info_vec): Likewise.
18737 (set_stmt_vec_info_vec): New function.
18738 (free_stmt_vec_infos): Likewise.
18739 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
18740 the global stmt_vec_info_vec.
18741 * tree-parloops.c (gather_scalar_reductions): Use
18742 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
18745 2018-05-29 Richard Biener <rguenther@suse.de>
18747 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
18749 2018-05-29 Martin Liska <mliska@suse.cz>
18750 David Malcolm <dmalcolm@redhat.com>
18752 * vec.c (test_reverse): New.
18753 (vec_c_tests): Add new test.
18754 * vec.h (vl_ptr>::reverse): New function.
18756 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
18758 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
18760 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
18763 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
18765 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
18767 2018-05-28 Richard Biener <rguenther@suse.de>
18769 PR tree-optimization/85933
18770 * tree-vect-data-refs.c (vect_record_base_alignments): Only
18771 look at stmts marked as vectorizable.
18773 2018-05-28 Richard Biener <rguenther@suse.de>
18775 PR tree-optimization/85934
18776 * tree-vect-generic.c (expand_vector_operations_1): Hoist
18777 vector boolean check before scalar optimization.
18779 2018-05-28 Jakub Jelinek <jakub@redhat.com>
18781 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
18784 2018-05-28 Mark Wielaard <mark@klomp.org>
18786 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
18787 if it is an expression containing a minus sign.
18789 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
18791 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
18793 2018-05-27 Paul Koning <ni1d@arrl.net>
18795 * config/pdp11/pdp11.md (truncsihi2): Remove.
18797 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
18798 Chung-Ju Wu <jasonwucj@gmail.com>
18800 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
18802 (unaligned_store_dw): Ditto.
18803 * config/nds32/nds32-memory-manipulation.c
18804 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
18805 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
18806 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
18807 (emit_setmem_word_loop): Rename to ...
18808 (emit_setmem_doubleword_loop): ... this.
18809 (nds32_gen_dup_4_byte_to_word_value): New function.
18810 (nds32_gen_dup_8_byte_to_double_word_value): New function.
18811 (nds32_expand_setmem_loop): Refine implementation.
18812 (nds32_expand_setmem_loop_v3m): Ditto.
18813 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
18816 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
18818 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
18820 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
18822 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
18823 (nds32_init_machine_status): Initialize machine->attr_naked_p and
18824 machine->attr_no_prologue_p.
18825 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
18826 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
18827 (nds32_expand_epilogue): Consider attr_naked_p.
18828 (nds32_expand_epilogue_v3pop): Likewise.
18829 (nds32_can_use_return_insn): Likewise.
18830 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
18831 attr_no_prologue_p fields.
18832 * config/nds32/nds32.opt (mret-in-naked-func): New option.
18834 2018-05-27 Jakub Jelinek <jakub@redhat.com>
18837 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
18839 * config/i386/sse.md
18840 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
18842 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
18844 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
18846 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
18848 (*<floatsuffix>floatv2div2sf2): Rename to ...
18849 (*float<floatunssuffix>v2div2sf2): ... this.
18850 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
18851 (float<floatunssuffix>v2div2sf2_mask): ... this.
18852 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
18853 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
18854 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
18856 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
18858 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
18860 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
18862 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
18864 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
18866 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
18867 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
18868 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
18869 gen_ufix_truncv8dfv8si2.
18870 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
18871 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
18872 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
18873 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
18874 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
18875 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
18876 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
18877 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
18879 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
18883 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
18885 2018-05-25 Jim Wilson <jimw@sifive.com>
18887 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
18888 * config/riscv/riscv.c (struct machine_function): Add
18889 interrupt_handler_p and attribute_checked_p fields.
18890 (riscv_attribute_table): Add interrupt.
18891 (riscv_interrupt_type_p): New.
18892 (riscv_save_reg_p): Save extra regs for interrupt handler.
18893 (riscv_use_save_libcall): Return false for interrupt handler.
18894 (riscv_first_stack_step): Add forward declaration.
18895 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
18896 for interrupt handler with large frame. Use it for saved reg list.
18897 (riscv_expand_prologue): Move flag_stack_usage_info support to
18898 eliminate duplication.
18899 (riscv_expand_epilogue): Generate mret for interrupt handler.
18900 (riscv_epilogue_uses): New.
18901 (riscv_can_use_return_insn): Return false for interrupt handler.
18902 (riscv_function_ok_for_sibcall): Likewise.
18903 (riscv_set_current_function): Add interrupt handler support.
18904 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
18905 * config/riscv/riscv.md (UNSPECV_MRET): New.
18907 (riscv_frflags, riscv_fsflags): Use tab after opcode.
18909 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
18911 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
18913 PR tree-optimization/85712
18914 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
18915 this candidate has already been replaced in-situ by a copy.
18917 2018-05-25 Jason Merrill <jason@redhat.com>
18919 PR c++/80485 - inline function non-zero address.
18920 * symtab.c (nonzero_address): Check DECL_COMDAT.
18922 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
18925 * config/alpha/alpha.md (ashlsi3): New insn pattern.
18926 (*ashlsi_se): Rename from *ashldi_se. Define as sign
18927 extension of SImode operation. Use const123_operand predicate.
18928 (*saddsi_1): Remove.
18929 (*saddl_se_1): Ditto.
18930 (*ssubsi_1): Ditto.
18931 (*ssubl_se_1): Ditto.
18932 * config/alpha/predicates.md (const123_operand): New predicate.
18933 * config/alpha/constraints.md (P): Use IN_RANGE.
18935 2018-05-25 Richard Biener <rguenther@suse.de>
18937 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
18939 (ref_maybe_used_by_stmt_p): Likewise.
18940 (stmt_may_clobber_ref_p): Likewise.
18941 (stmt_may_clobber_ref_p_1): Likewise.
18942 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
18944 (ref_maybe_used_by_stmt_p): Likewise.
18945 (stmt_may_clobber_ref_p): Likewise.
18946 (stmt_may_clobber_ref_p_1): Likewise.
18947 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
18948 the alias oracle to disambiguate DRs with stmts DR analysis
18950 (vect_analyze_data_refs): Do not give up on not analyzable
18951 DRs for BB vectorization. Remove code truncating the dataref
18954 2018-05-25 Jakub Jelinek <jakub@redhat.com>
18957 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
18958 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
18959 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
18961 2018-05-25 Richard Biener <rguenther@suse.de>
18963 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
18964 function, combining stmt data ref gathering and fatal analysis
18966 (vect_analyze_data_refs): Remove now redudnant code and simplify.
18967 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
18968 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
18969 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
18970 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
18972 2018-05-25 Bin Cheng <bin.cheng@arm.com>
18974 PR tree-optimization/85720
18975 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
18976 SCC if all partitions are builtins.
18977 (version_loop_by_alias_check): New parameter. Generate cancelable
18978 runtime alias check if all partitions are builtins.
18979 (distribute_loop): Update call to above function.
18981 2018-05-25 Bin Cheng <bin.cheng@arm.com>
18983 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
18984 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
18985 (parm_default_def_partition_arg): Ditto.
18986 (set_parm_default_def_partition): Ditto.
18987 (get_parm_default_def_partitions): Ditto and make it static.
18988 (get_undefined_value_partitions): Ditto and make it static.
18989 (remove_ssa_form): Refactor call to init_var_map here.
18990 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
18991 computation for loop region.
18992 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
18993 (register_default_def): Delete.
18994 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
18995 (parm_default_def_partition_arg): Ditto.
18996 (set_parm_default_def_partition): Ditto.
18997 (get_parm_default_def_partitions): Ditto and make it static.
18998 (get_undefined_value_partitions): Ditto and make it static.
18999 (coalesce_with_default, coalesce_with_default): Update comment.
19000 (create_coalesce_list_for_region): New func factored out from
19001 create_outofssa_var_map.
19002 (populate_coalesce_list_for_outofssa): New func factored out from
19003 create_outofssa_var_map and coalesce_ssa_name.
19004 (create_outofssa_var_map): Delete.
19005 (coalesce_ssa_name): Refactor to support live range computation.
19006 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
19007 (get_parm_default_def_partitions): Delete.
19008 (get_undefined_value_partitions): Ditto.
19009 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
19010 computation for loop region.
19011 (new_tree_live_info, loe_visit_block): Ditto.
19012 (live_worklist, set_var_live_on_entry): Ditto.
19013 (calculate_live_on_exit, verify_live_on_entry): Ditto.
19014 * tree-ssa-live.h (struct _var_map): New fields.
19015 (init_var_map): Change decl.
19016 (region_contains_p): New.
19018 2018-05-25 Bin Cheng <bin.cheng@arm.com>
19020 * tree-ssa-live.h (live_merge_and_clear): Delete.
19022 2018-05-25 Richard Biener <rguenther@suse.de>
19025 * tree-dump.c (dequeue_and_dump): Remove access to removed
19026 operand 2 of a SWITCH_EXPR.
19028 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
19030 * doc/sourcebuild.texi (vect_double_cond_arith): Include
19031 multiplication and division.
19032 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
19033 (cond_udiv@var{m}, cond_umod@var{m}): Document.
19034 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
19035 (cond_udiv_optab, cond_umod_optab): New optabs.
19036 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
19037 (IFN_COND_RDIV): New internal functions.
19038 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
19039 TRUNC_MOD_EXPR and RDIV_EXPR.
19040 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
19041 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
19043 (SVE_INT_BINARY): Include mult.
19044 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
19045 (optab, sve_int_op): Handle mult.
19046 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
19048 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
19049 for SVE_INT_BINARY_SD.
19051 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
19053 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
19054 (optab, sve_int_op): Handle div and udiv.
19055 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
19056 for SVE_INT_BINARY_SD.
19057 (*<optab><mode>3): New insn for the same.
19059 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
19061 * tree-vect-patterns.c: Include predict.h.
19062 (vect_recog_divmod_pattern): Restrict check for division support
19063 to when optimizing for size.
19065 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
19067 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
19068 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
19069 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
19070 (gimple_match_op::set_op): Likewise.
19071 (gimple_resimplify4): Declare.
19072 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
19073 (expr::gen_transform): Likewise.
19074 (decision_tree::gen): Generate a simplification routine for 4 operands.
19075 * gimple-match-head.c (gimple_simplify): Add an overload for
19076 4 operands. In the top-level function, handle up to 4 call
19077 arguments and call gimple_resimplify4.
19078 (gimple_resimplify4): New function.
19079 (build_call_internal): Pass a fourth operand.
19080 (maybe_push_to_seq): Likewise.
19081 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
19082 Fold VEC_COND_EXPRs of an operation and a default value into
19083 an IFN_COND_* function if possible.
19084 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
19086 (SVE_COND_FP_BINARY): Include them.
19087 (optab, sve_fp_op): Handle them.
19088 (SVE_INT_BINARY_REV): New code iterator.
19089 (SVE_COND_FP_BINARY_REV): New int iterator.
19090 (commutative): New int attribute.
19091 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
19093 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
19095 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
19096 (*cond_<optab><mode>): New patterns for reversed operands.
19098 2018-05-25 Richard Biener <rguenther@suse.de>
19100 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
19101 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
19102 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
19103 (STMT_VINFO_GROUPED_ACCESS): Adjust.
19104 * tree-vect-data-refs.c (everywhere): Adjust users.
19105 * tree-vect-loop.c (everywhere): Likewise.
19106 * tree-vect-slp.c (everywhere): Likewise.
19107 * tree-vect-stmts.c (everywhere): Likewise.
19108 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
19110 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
19112 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
19114 (gcc_cv_as_section_exclude): ... this.
19115 Try Solaris as #exclude syntax.
19116 * configure: Regenerate.
19117 * config.in: Regenerate.
19118 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
19120 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
19121 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
19123 * varasm.c (default_elf_asm_named_section): Don't check if
19124 HAVE_GAS_SECTION_EXCLUDE is defined.
19126 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
19128 * doc/md.texi: Update the documentation of the cond_* optabs
19129 to mention the new final operand. Fix GET_MODE_NUNITS call.
19130 Describe the scalar case too.
19131 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
19132 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
19134 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
19135 (get_conditional_internal_fn): Update comment.
19136 * tree-vect-loop.c (vectorizable_reduction): Pass the original
19137 accumulator value as a final argument to conditional functions.
19138 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
19139 a define_expand and add an "else" operand. Assert for now that
19140 the else operand is equal to operand 2. Use SVE_INT_BINARY and
19141 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
19142 (*cond_<optab><mode>): New patterns.
19143 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
19144 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
19145 (UNSPEC_COND_EOR): Delete.
19146 (optab): Remove associated mappings.
19147 (SVE_INT_BINARY): New code iterator.
19148 (sve_int_op): Remove int attribute and add "minus" to the code
19150 (SVE_COND_INT_OP): Delete.
19151 (SVE_COND_FP_OP): Rename to...
19152 (SVE_COND_FP_BINARY): ...this.
19154 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
19156 * optabs.c (can_reuse_operands_p): New function.
19157 (maybe_legitimize_operands): Try to reuse the results for
19160 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
19162 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
19163 Add {q} suffix to insn mnemonic.
19165 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
19167 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
19168 (msp430_warn_func_return): New.
19170 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
19172 * fold-const.c (tree_nonzero_bits): New function.
19173 * fold-const.h (tree_nonzero_bits): Likewise.
19174 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
19175 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
19177 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
19181 * varasm.c (assemble_alias): Check ifunc_resolver only on
19184 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
19187 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
19188 when memory input operand is handled.
19190 2018-05-24 Luis Machado <luis.machado@linaro.org>
19192 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
19194 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
19196 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
19198 * match.pd: Delay FMA folds until after vectorization.
19200 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
19203 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
19204 address check not strict.
19206 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
19208 * gimple-match.h (gimple_match_op): New class.
19209 (mprts_hook): Replace parameters with a gimple_match_op *.
19210 (maybe_build_generic_op): Likewise.
19211 (gimple_simplified_result_is_gimple_val): Replace parameters with
19212 a const gimple_match_op *.
19213 (gimple_simplify): Replace code_helper * and tree * parameters with
19214 a gimple_match_op * parameter.
19215 (gimple_resimplify1): Replace code_helper *, tree and tree *
19216 parameters with a gimple_match_op * parameter.
19217 (gimple_resimplify2): Likewise.
19218 (gimple_resimplify3): Likewise.
19219 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
19220 parameters with a gimple_match_op * parameter.
19221 * gimple-match-head.c (gimple_simplify): Change prototypes of
19222 auto-generated functions to take a gimple_match_op * instead of
19223 separate code_helper * and tree * parameters. Make the same
19224 change in the top-level overload and update calls to the
19225 gimple_resimplify routines. Update calls to the auto-generated
19226 functions and to maybe_push_res_to_seq in the publicly-facing
19227 operation-specific gimple_simplify overloads.
19228 (gimple_match_op::MAX_NUM_OPS): Define.
19229 (gimple_resimplify1): Replace rcode and ops with a single res_op
19230 parameter. Update call to gimple_simplify.
19231 (gimple_resimplify2): Likewise.
19232 (gimple_resimplify3): Likewise.
19233 (mprts_hook): Replace parameters with a gimple_match_op *.
19234 (maybe_build_generic_op): Likewise.
19235 (build_call_internal): Replace type, nargs and ops with
19236 a gimple_match_op *.
19237 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
19238 with a single gimple_match_op *. Update calls to mprts_hook,
19239 build_call_internal and gimple_simplified_result_is_gimple_val.
19240 Factor out code that is common to the tree_code and combined_fn cases.
19241 * genmatch.c (expr::gen_transform): Replace tem_code and
19242 tem_ops with a gimple_match_op called tem_op. Update calls
19243 to the gimple_resimplify functions and maybe_push_res_to_seq.
19244 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
19245 res_ops. Update call to the gimple_resimplify functions.
19246 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
19247 (decision_tree::gen): Make the functions take a gimple_match_op *
19248 called res_op instead of separate res_code and res_ops parameters.
19249 Update call accordingly.
19250 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
19251 and ops with a single res_op parameter. Update calls to
19252 maybe_build_generic_op and maybe_push_res_to_seq.
19253 (fold_stmt_1): Update calls to gimple_simplify and
19254 replace_stmt_with_simplification.
19255 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
19256 and gimple_simplified_result_is_gimple_val.
19257 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
19259 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
19260 with a gimple_match_op *.
19261 (vn_nary_build_or_lookup): Likewise. Update call to
19262 vn_nary_build_or_lookup_1.
19263 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
19264 gimple_match_op *. Update calls to the gimple_resimplify routines
19265 and to gimple_simplified_result_is_gimple_val.
19266 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
19267 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
19268 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
19269 (visit_nary_op): Likewise.
19270 (visit_reference_op_load): Likewise.
19272 2018-05-23 Luis Machado <luis.machado@linaro.org>
19274 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
19275 modifier for printing the step amount.
19277 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
19280 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
19283 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
19285 * doc/sourcebuild.texi (Endianness): New subsubsection.
19287 2018-05-23 Luis Machado <luis.machado@linaro.org>
19289 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
19290 <prefetch_dynamic_strides>: New const bool field.
19291 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
19292 prefetch_dynamic_strides.
19293 (exynosm1_prefetch_tune): Likewise.
19294 (thunderxt88_prefetch_tune): Likewise.
19295 (thunderx_prefetch_tune): Likewise.
19296 (thunderx2t99_prefetch_tune): Likewise.
19297 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
19299 (aarch64_override_options_internal): Update to set
19300 PARAM_PREFETCH_DYNAMIC_STRIDES.
19301 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
19302 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
19303 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
19304 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
19305 prefetch-dynamic-strides setting.
19307 2018-05-23 Luis Machado <luis.machado@linaro.org>
19309 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
19310 <minimum_stride>: New const int field.
19311 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
19312 minimum_stride field defaulting to -1.
19313 (exynosm1_prefetch_tune): Likewise.
19314 (thunderxt88_prefetch_tune): Likewise.
19315 (thunderx_prefetch_tune): Likewise.
19316 (thunderx2t99_prefetch_tune): Likewise.
19317 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
19318 <default_opt_level>: Set to 3.
19319 (aarch64_override_options_internal): Update to set
19320 PARAM_PREFETCH_MINIMUM_STRIDE.
19321 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
19322 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
19323 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
19324 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
19325 stride is constant and is below the minimum stride threshold.
19327 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19329 * config/arm/arm-cpus.in (mode26): Delete.
19330 (armv4): Delete mode26 reference.
19331 * config/arm/arm.c (arm_configure_build_target): Delete use of
19334 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
19336 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
19338 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
19339 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
19341 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
19342 (floatunsdidf2): Ditto.
19344 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
19346 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
19347 (fixuns_trunc<mode>si2_avx512f): Ditto.
19348 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
19349 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
19350 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
19352 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
19354 PR rtl-optimization/79985
19355 * df-scan.c (df_insn_refs_collect): Remove special case for
19356 global registers and asm statements.
19358 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
19360 * extend.texi (Global Register Variables): Rewrite the bullet list.
19361 Note that the register is available for allocation. Note that access
19362 via inline asm must use constraints. Add note about async-signal
19363 handlers. Remove paragraph about automagic register selection.
19365 2018-05-23 Richard Biener <rguenther@suse.de>
19367 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
19368 of fixed offset from memset VN.
19370 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
19372 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
19373 first_interp field.
19374 (alloc_cand_and_find_basis): Initialize first_interp field.
19375 (slsr_process_mul): Modify first_interp field.
19376 (slsr_process_add): Likewise.
19377 (slsr_process_cast): Modify first_interp field for each new
19379 (slsr_process_copy): Likewise.
19380 (dump_candidate): Dump first_interp field.
19381 (replace_mult_candidate): Process all interpretations, not just
19383 (replace_rhs_if_not_dup): Likewise.
19384 (replace_one_candidate): Likewise.
19386 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
19388 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
19390 (aarch64_needs_frame_chain): New function.
19391 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
19393 2018-05-23 Sudakshina Das <sudi.das@arm.com>
19396 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
19397 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
19398 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
19399 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
19400 as true for strict-align.
19401 (aarch64_can_inline_p): Perform checks even when callee has no
19402 attributes to check for strict alignment.
19403 * doc/extend.texi (AArch64 Function Attributes): Document
19405 * doc/invoke.texi: (AArch64 Options): Likewise.
19407 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
19409 PR tree-optimization/85853
19410 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
19411 the handling of the root of the node to...
19412 (vect_slp_analyze_node_operations_1): ...this new function,
19413 and run the whole thing with the child nodes' def types
19414 set according to their SLP node's def type.
19416 2018-05-23 Richard Biener <rguenther@suse.de>
19418 PR middle-end/85874
19419 * tree-data-ref.c (create_runtime_alias_checks): Defer
19420 and ignore overflow warnings.
19422 2018-05-23 Yury Gribov <tetra2005@gmail.com>
19424 PR tree-optimization/85822
19425 * tree-vrp.c (is_masked_range_test): Fix handling of negative
19428 2018-05-23 Richard Biener <rguenther@suse.de>
19430 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
19431 memset constants via native_interpret_expr.
19433 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
19436 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
19438 (cgraph_node::create_alias): Likewise.
19439 (cgraph_node::get_availability): Check ifunc_resolver instead
19440 of looking up ifunc attribute.
19441 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
19442 * varasm.c (do_assemble_alias): Likewise.
19443 (assemble_alias): Likewise.
19444 (default_binds_local_p_3): Likewise.
19445 * cgraph.h (cgraph_node): Add ifunc_resolver.
19446 (cgraph_node::only_called_directly_or_aliased_p): Return false
19447 for IFUNC resolver.
19448 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
19450 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
19451 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
19452 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
19453 instead of looking up ifunc attribute.
19455 2018-05-22 Luis Machado <luis.machado@linaro.org>
19457 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
19459 2018-05-22 Martin Sebor <msebor@redhat.com>
19461 PR middle-end/85359
19462 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
19463 only when expasion succeeds.
19464 (expand_builtin_strcmp): Same.
19465 (expand_builtin_strncmp): Same.
19467 2018-05-22 Martin Sebor <msebor@redhat.com>
19469 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
19471 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
19472 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19474 * config/aarch64/aarch64-ldpstp.md: Replace uses of
19475 aarch64_mem_pair_operand with memory_operand and delete operand swapping
19477 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
19478 Add check for legitimate_address.
19479 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
19480 (aarch64_swap_ldrstr_operands): New.
19481 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
19484 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
19485 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19487 * config/aarch64/aarch64.md: New patterns to generate stp
19489 (store_pair_sw, store_pair_dw): New patterns to generate stp for
19490 single words and double words.
19491 (load_pair_sw, load_pair_dw): Likewise.
19492 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
19494 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
19496 * config/aarch64/aarch64-ldpstp.md: Modify peephole
19497 for different mode ldpstp and add peephole for merged zero stores.
19498 Likewise for loads.
19499 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
19501 (aarch64_gen_store_pair): Rename calls to match new patterns.
19502 (aarch64_gen_load_pair): Rename calls to match new patterns.
19503 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
19504 (load_pair<DREG:mode><DREG2:mode>): ... This.
19505 (store_pair<mode>): Rename to...
19506 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
19507 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
19508 New mode iterators.
19509 (V_INT_EQUIV): Handle SImode.
19510 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
19513 2018-05-22 Martin Sebor <msebor@redhat.com>
19516 * calls.c (maybe_warn_nonstring_arg): Use string length to set
19517 or ajust the presumed bound on an operation to avoid unnecessary
19520 2018-05-22 Martin Sebor <msebor@redhat.com>
19522 PR tree-optimization/85826
19523 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
19524 assuming that a DECL necesarily has a constant size.
19526 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
19528 PR middle-end/85862
19529 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
19531 2018-05-22 Richard Biener <rguenther@suse.de>
19533 PR tree-optimization/85834
19534 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
19535 non-constant and non-zero memset arguments.
19537 2018-05-22 Martin Liska <mliska@suse.cz>
19540 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
19542 2018-05-22 Richard Biener <rguenther@suse.de>
19544 PR tree-optimization/85863
19545 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
19546 comparisons when vectype is specified.
19547 (vectorizable_condition): Do not specify vectype for
19548 vect_is_simple_cond when SLP vectorizing.
19550 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
19553 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
19554 define __ibm128 as long double.
19555 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
19556 as a distinct type when IEEE 128-bit support is enabled.
19557 (init_float128_ieee): Fix up conversions between IFmode and IEEE
19558 128-bit types to use the correct functions.
19559 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
19560 convert between 128-bit floating point types that have different
19561 modes but the same representation, instead of using gen_lowpart to
19563 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
19565 (IFKF_reg): New attributes to give the register constraints for
19567 (extend<mode>tf2_internal): New insns to mark an explicit
19568 conversion between 128-bit floating point types that have a
19569 different mode but share the same representation.
19571 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
19573 PR tree-optimization/85814
19574 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
19575 a null return from get_strinfo when unsharing the next
19576 strinfo in the chain.
19578 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
19581 * varasm.c (weak_finish): Clean up weak_decls.
19583 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19585 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
19586 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
19587 UNSPEC_UADALP values.
19588 * config/aarch64/iterators.md (ABAL): New int iterator.
19591 (sur): Add mappings for the above.
19592 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
19594 (aarch64_<sur>abal<mode>_4): Likewise.
19595 (aarch64_<sur>adalp<mode>_3): Likewise.
19596 (<sur>sadv16qi): New define_expand.
19598 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
19600 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
19601 (*movdf_internal): Ditto.
19602 (*rcpsf2_sse): Ditto.
19603 (*rsqrtsf2_sse): Ditto.
19604 (*sqrt<mode>2_sse): Ditto.
19606 2018-05-21 Tamar Christina <tamar.christina@arm.com>
19608 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
19610 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
19611 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
19612 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
19613 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
19615 * config/aarch64/arm_neon.h: Likewise.
19616 * config/aarch64/iterators.md (VQ_I): New.
19618 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
19620 * config.gcc: Add arc/t-multilib-linux to tmake_file for
19622 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
19625 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
19627 * config/nds32/constraints.md (S): New constraint.
19628 * config/nds32/nds32.md (call_internal): Use constraint S.
19629 (call_value_internal): Likewise.
19630 (sibcall_internal): Likewise.
19631 (sibcall_value_internal): Likewise.
19633 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
19634 Chung-Ju Wu <jasonwucj@gmail.com>
19636 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
19637 into consideration.
19639 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
19640 Chung-Ju Wu <jasonwucj@gmail.com>
19642 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
19643 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
19644 (nds32_rtx_costs_impl): Simplify.
19645 (nds32_address_cost_impl): Simplify.
19646 (nds32_init_rtx_costs): New function.
19647 (nds32_rtx_costs_speed_prefer): Likewise.
19648 (nds32_rtx_costs_size_prefer): Likewise.
19649 (nds32_address_cost_speed_prefer): Likewise.
19650 (nds32_address_cost_speed_fwprop): Likewise.
19651 (nds32_address_cost_size_prefer): Likewise.
19652 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
19653 * config/nds32/nds32.c (nds32_option_override): Use
19654 nds32_init_rtx_costs function.
19656 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
19658 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
19659 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
19660 (TARGET_PIPELINE_N8): Likewise.
19661 (TARGET_PIPELINE_N10): Likewise.
19662 (TARGET_PIPELINE_N13): Likewise.
19663 (TARGET_PIPELINE_GRAYWOLF): Likewise.
19665 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
19667 * config/nds32/nds32-fpu.md: Update copyright year.
19669 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
19671 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
19673 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
19675 * config/nds32/nds32.c
19676 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
19677 * config/nds32/nds32.opt (minline-asm-r15): New option.
19679 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
19681 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
19683 * config/nds32/nds32.md (abssi2): New pattern.
19685 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
19687 * config/i386/i386.md (rex64namesuffix): New mode attribute.
19688 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
19689 Merge insn pattern from sse_cvtsi2ss<round_name> and
19690 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
19691 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
19692 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
19693 using SWI48 mode iterator.
19694 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
19695 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
19696 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
19697 pattern from sse_cvttss2si<round_saeonly_name>
19698 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
19699 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
19700 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
19701 using SWI48 mode iterator.
19702 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
19703 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
19704 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
19705 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
19706 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
19707 using SWI48 mode iterator.
19708 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
19709 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
19710 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
19711 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
19712 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
19713 SWI48 mode iterator.
19714 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
19715 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
19716 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
19717 pattern from sse_cvttsd2si<round_saeonly_name>
19718 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
19720 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
19722 * config/nds32/nds32-md-auxiliary.c
19723 (nds32_valid_smw_lwm_base_p): Refine.
19724 (nds32_output_smw_single_word): Refine.
19725 (nds32_output_smw_double_word): New.
19726 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
19728 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
19730 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
19731 (nds32_output_stack_pop): Refine.
19732 (nds32_expand_unaligned_load): Refine.
19733 (nds32_expand_unaligned_store): Refine.
19735 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
19736 Chung-Ju Wu <jasonwucj@gmail.com>
19738 * config/nds32/constants.md: Add TP_REGNUM constant.
19739 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
19740 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
19742 * config/nds32/nds32-doubleword.md: Consider flag_pic.
19743 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
19744 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
19745 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
19746 and PIC code generation.
19747 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
19749 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
19751 * config/nds32/nds32.md: Support TLS and PIC.
19752 * config/nds32/nds32.c: Support TLS and PIC.
19753 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
19754 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
19757 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
19759 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
19760 mode with E_ prefix.
19762 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
19763 Chung-Ju Wu <jasonwucj@gmail.com>
19765 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
19766 * config/nds32/nds32-md-auxiliary.c
19767 (symbolic_reference_mentioned_p): New.
19768 (nds32_legitimize_ict_address): New.
19769 (nds32_expand_ict_move): New.
19770 (nds32_indirect_call_referenced_p): New.
19771 (nds32_symbol_binds_local_p): Delete.
19772 (nds32_long_call_p): Modify.
19773 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
19774 * config/nds32/nds32-protos.h
19775 (symbolic_reference_mentioned_p): Declare.
19776 (nds32_legitimize_ict_address): Declare.
19777 (nds32_expand_ict_move): Declare.
19778 (nds32_indirect_call_referenced_p): Declare.
19779 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
19780 (nds32_relax_group): Use nds32_ict_const_p as condition.
19781 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
19782 (nds32_asm_file_start): Output ict_model directive in asm code.
19783 (nds32_legitimate_address_p): Consider indirect call.
19784 (nds32_print_operand): Consider indirect call.
19785 (nds32_print_operand_address): Consider indirect call.
19786 (nds32_insert_attributes): Handle "indirect_call" attribute.
19787 (TARGET_LEGITIMATE_ADDRESS_P): Define.
19788 (TARGET_LEGITIMATE_CONSTANT_P): Define.
19789 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
19790 (TARGET_DELEGITIMIZE_ADDRESS): Define.
19791 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
19792 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
19793 (TARGET_ICT_MODEL_SMALL): Define.
19794 (TARGET_ICT_MODEL_LARGE): Define.
19795 * config/nds32/nds32.md (movsi): Consider ict model.
19796 (call, call_value): Consider ict model.
19797 (sibcall, sibcall_value): Consider ict model.
19798 * config/nds32/nds32.opt (mict-model): New option.
19799 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
19802 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
19803 Monk Chiang <sh.chiang04@gmail.com>
19804 Jim Wilson <jimw@sifive.com>
19806 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
19807 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
19808 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
19809 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
19810 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
19811 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
19812 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
19813 compute save_libcall_adjustment properly.
19814 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
19815 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
19816 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
19817 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
19818 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
19819 (ABI_SPEC): Handle mabi=ilp32e.
19820 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
19821 (RVE): Add RVE mask.
19822 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
19823 <-march>: Add rv32e as an example.
19825 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
19828 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
19829 (intra_create_variable_infos): Handle C++ constructors.
19831 2018-05-18 Martin Liska <mliska@suse.cz>
19833 * passes.def: Remove a redundant pass.
19835 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
19838 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
19840 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19842 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
19844 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
19846 (armv2, armv2a, armv3, armv3m): Delete architectures.
19847 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
19848 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
19849 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
19851 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
19852 (*mulsidi3adddi): Likewise.
19853 (mulsidi3): Likewise.
19854 (*mulsidi3_nov6): Likewise.
19855 (umulsidi3): Likewise.
19856 (umulsidi3_nov6): Likewise.
19857 (umaddsidi4): Likewise.
19858 (*umulsidi3adddi): Likewise.
19859 (smulsi3_highpart): Likewise.
19860 (*smulsi3_highpart_nov6): Likewise.
19861 (umulsi3_highpart): Likewise.
19862 (*umulsi3_highpart_nov6): Likewise.
19863 * config/arm/arm.h (arm_arch3m): Delete.
19864 * config/arm/arm.c (arm_arch3m): Delete.
19865 (arm_option_override_internal): Update armv3-related comment.
19866 (arm_configure_build_target): Delete use of isa_bit_mode32.
19867 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
19868 (arm_rtx_costs_internal): Delete check of arm_arch3m.
19869 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
19870 (mulsa3): Likewise.
19871 (mulusa3): Likewise.
19872 * config/arm/arm-protos.h (arm_arch3m): Delete.
19873 * config/arm/arm-tables.opt: Regenerate.
19874 * config/arm/arm-tune.md: Likewise.
19875 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
19876 deleted architectures.
19878 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19880 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
19881 (armv5t, armv5te): New features.
19882 (ARMv5, ARMv5e): Delete fgroups.
19883 (ARMv5t, ARMv5te): Adjust for above changes.
19884 (ARMv6m): Likewise.
19885 (armv5, armv5e): Delete arches.
19886 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
19888 (*call_reg_arm): Likewise.
19889 (*call_value_reg_armv5): Likewise.
19890 (*call_value_reg_arm): Likewise.
19891 (*call_symbol): Likewise.
19892 (*call_value_symbol): Likewise.
19893 (*sibcall_insn): Likewise.
19894 (*sibcall_value_insn): Likewise.
19895 (clzsi2): Likewise.
19896 (prefetch): Likewise.
19897 (define_split and define_peephole2 dependent on arm_arch5):
19899 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
19901 (TARGET_ARM_QBIT): Likewise.
19902 (TARGET_DSP_MULTIPLY): Likewise.
19903 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
19904 (arm_arch5, arm_arch5e): Delete.
19905 (arm_arch5t, arm_arch5te): Declare.
19906 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
19907 (arm_arch5t): Declare.
19908 (arm_option_reconfigure_globals): Update for the above.
19909 (arm_options_perform_arch_sanity_checks): Update comment, replace
19910 use of arm_arch5 with arm_arch5t.
19911 (use_return_insn): Likewise.
19912 (arm_emit_call_insn): Likewise.
19913 (output_return_instruction): Likewise.
19914 (arm_final_prescan_insn): Likewise.
19915 (arm_coproc_builtin_available): Likewise.
19916 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
19917 arm_arch5e with arm_arch5t and arm_arch5te.
19918 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
19919 (arm_arch5t, arm_arch5te): Declare.
19920 * config/arm/arm-tables.opt: Regenerate.
19921 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
19922 * config/arm/t-multilib: Likewise.
19923 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
19924 instead of arm_arch5.
19925 (*call_reg_thumb1): Likewise.
19926 (*call_value_reg_thumb1_v5): Likewise.
19927 (*call_value_reg_thumb1): Likewise.
19928 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
19930 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
19932 2018-05-18 Martin Liska <mliska@suse.cz>
19934 PR gcov-profile/84846
19935 * doc/gcov.texi: Document -t option of gcov tool.
19937 2018-05-18 Martin Liska <mliska@suse.cz>
19939 PR gcov-profile/84846
19940 * gcov.c (print_usage): Add new -t option.
19941 (process_args): Handle the option.
19942 (generate_results): Use stdout as output when requested by
19945 2018-05-18 Martin Liska <mliska@suse.cz>
19947 PR gcov-profile/84846
19948 * coverage.c (coverage_init): Write PWD to .gcno file.
19949 * doc/gcov.texi: Document how working directory is printed.
19950 * gcov-dump.c (dump_gcov_file): Print PWD.
19951 * gcov.c (output_intermediate_file): Likewise.
19952 (read_graph_file): Read PWD string.
19953 (output_lines): Print PWD.
19955 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
19957 PR middle-end/85817
19958 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
19959 for retval and return false if all args to phi are zero.
19961 2018-05-18 Richard Biener <rguenther@suse.de>
19963 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
19965 (evrp_dom_walker::before_dom_children): Call it.
19967 2018-05-18 Richard Biener <rguenther@suse.de>
19969 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
19970 results when processing array refs with variable index.
19972 2018-05-18 Toon Moene <toon@moene.org>
19974 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
19975 directly after that of -floop-interchange. Indicate that both
19976 options are enabled by default when specifying -O3.
19978 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19980 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
19981 iterator. Delete separate integer-mode vec_set<mode> expander.
19982 (aarch64_simd_vec_setv2di): Delete.
19983 (vec_setv2di): Delete.
19984 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
19985 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
19986 the "w, r" alternative.
19988 2018-05-18 Martin Liska <mliska@suse.cz>
19990 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
19991 * tree-pass.h (make_pass_lower_switch_O0): New function.
19992 * tree-switch-conversion.c (node_has_low_bound): Remove.
19993 (node_has_high_bound): Likewise.
19994 (node_is_bounded): Likewise.
19995 (class pass_lower_switch): Make it a template type and create
19997 (pass_lower_switch::execute): Add template argument.
19998 (make_pass_lower_switch): New function.
19999 (make_pass_lower_switch_O0): New function.
20000 (do_jump_if_equal): Remove.
20001 (emit_case_nodes): Simplify to just handle all 3 cases and leave
20002 all the hard work to tree optimization passes.
20004 2018-05-18 Martin Liska <mliska@suse.cz>
20006 * dbgcnt.c (limit_low): Renamed from limit.
20007 (limit_high): New variable.
20008 (dbg_cnt_is_enabled): Check for upper limit.
20009 (dbg_cnt): Adjust dumping.
20010 (dbg_cnt_set_limit_by_index): Add new argument for high
20012 (dbg_cnt_set_limit_by_name): Likewise.
20013 (dbg_cnt_process_single_pair): Parse new format.
20014 (dbg_cnt_process_opt): Use strtok.
20015 (dbg_cnt_list_all_counters): Remove 'value' and add
20017 * doc/invoke.texi: Document changes.
20019 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
20021 * doc/sourcebuild.texi (scalar_all_fma): Document.
20022 * tree.def (FMA_EXPR): Delete.
20023 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
20024 * internal-fn.c (ternary_direct): New macro.
20025 (expand_ternary_optab_fn): Likewise.
20026 (direct_ternary_optab_supported_p): Likewise.
20027 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
20028 * builtins.c (fold_builtin_fma): Delete.
20029 (fold_builtin_3): Don't call it.
20030 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
20031 * expr.c (expand_expr_real_2): Likewise.
20032 * fold-const.c (operand_equal_p): Likewise.
20033 (fold_ternary_loc): Likewise.
20034 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
20035 * gimple.c (DEFTREECODE): Likewise.
20036 * gimplify.c (gimplify_expr): Likewise.
20037 * optabs-tree.c (optab_for_tree_code): Likewise.
20038 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
20039 * tree-eh.c (operation_could_trap_p): Likewise.
20040 (stmt_could_throw_1_p): Likewise.
20041 * tree-inline.c (estimate_operator_cost): Likewise.
20042 * tree-pretty-print.c (dump_generic_node): Likewise.
20043 (op_code_prio): Likewise.
20044 * tree-ssa-loop-im.c (stmt_cost): Likewise.
20045 * tree-ssa-operands.c (get_expr_operands): Likewise.
20046 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
20047 * fold-const-call.h (fold_fma): Delete.
20048 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
20049 CFN_FNMA and CFN_FNMS.
20050 (fold_fma): Delete.
20051 * genmatch.c (combined_fn): New enum.
20052 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
20053 (commutative_op): New function.
20054 (commutate): Use it. Handle more than 2 operands.
20055 (dt_operand::gen_gimple_expr): Use commutative_op.
20056 (parser::parse_expr): Allow :c to be used with non-binary
20057 operators if the commutative operand is known.
20058 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
20059 CFN_FMS, CFN_FNMA and CFN_FNMS.
20060 (backprop::process_assign_use): Remove FMA_EXPR handling.
20061 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
20062 (gen_hsa_fma): New function.
20063 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
20064 IFN_FNMA and IFN_FNMS.
20065 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
20066 * gimple-fold.h (follow_all_ssa_edges): Declare.
20067 * gimple-fold.c (follow_all_ssa_edges): New function.
20068 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
20069 gimple_build interface and use follow_all_ssa_edges to fold the result.
20070 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
20071 instead of checking for optabs directly.
20072 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
20073 rather than FMA_EXPRs.
20074 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
20075 call to IFN_FMA instead of an FMA_EXPR.
20077 2018-05-17 Jim Wilson <jimw@sifive.com>
20079 * expr.c (do_tablejump): When converting index to Pmode, if we have a
20080 sign extended promoted subreg, and the range does not have the sign bit
20081 set, then do a sign extend.
20083 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
20084 test, check for sign extended subreg and/or constant operands, and
20085 do a sign extend in that case.
20087 2018-05-17 Steve Ellcey <sellcey@cavium.com>
20089 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
20090 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
20092 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
20093 Change logics_shift_reg to logics_shift_imm.
20094 (thunderx2t99_fp_loadpair_basic): Delete.
20095 (thunderx2t99_fp_storepair_basic): Delete.
20096 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
20097 (thunderx2t99_asimd_polynomial): Delete.
20098 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
20099 and neon_fp_mul_d_scalar_q.
20100 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
20101 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
20102 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
20103 (thunderx2t99_asimd_lut): Add missing tbl types.
20104 (thunderx2t99_asimd_ext): Delete.
20105 (thunderx2t99_asimd_load1_1_mult): Delete.
20106 (thunderx2t99_asimd_load1_2_mult): Delete.
20107 (thunderx2t99_asimd_load1_ldp): New.
20108 (thunderx2t99_asimd_load1): New.
20109 (thunderx2t99_asimd_load2): Add missing *load2* types.
20110 (thunderx2t99_asimd_load3): New.
20111 (thunderx2t99_asimd_load4): New.
20112 (thunderx2t99_asimd_store1_1_mult): Delete.
20113 (thunderx2t99_asimd_store1_2_mult): Delete.
20114 (thunderx2t99_asimd_store2_mult): Delete.
20115 (thunderx2t99_asimd_store2_onelane): Delete.
20116 (thunderx2t99_asimd_store_stp): New.
20117 (thunderx2t99_asimd_store1): New.
20118 (thunderx2t99_asimd_store2): New.
20119 (thunderx2t99_asimd_store3): New.
20120 (thunderx2t99_asimd_store4): New.
20122 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
20124 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
20125 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
20127 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
20128 Segher Boessenkool <segher@kernel.crashing.org>
20131 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
20134 2018-05-17 Richard Biener <rguenther@suse.de>
20136 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
20137 for pruning loop and prune defs feeding only already visited PHIs.
20139 2018-05-17 Richard Biener <rguenther@suse.de>
20141 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
20143 2018-05-17 Bin Cheng <bin.cheng@arm.com>
20144 Richard Biener <rguenther@suse.de>
20146 PR tree-optimization/85793
20147 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
20148 for VMAT_ELEMENTWISE.
20150 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
20152 * internal-fn.h (lookup_internal_fn): Declare
20153 * internal-fn.c (lookup_internal_fn): New function.
20154 * gimple.c (gimple_build_call_from_tree): Handle calls to
20155 internal functions.
20156 * gimple-pretty-print.c (dump_gimple_call): Print "." before
20157 internal function names.
20158 * tree-pretty-print.c (dump_generic_node): Likewise.
20159 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
20161 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
20163 * gimple-fold.h (gimple_build): Make the function forms take
20164 combined_fn rather than built_in_function.
20165 (gimple_simplify): Likewise.
20166 * gimple-match-head.c (gimple_simplify): Likewise.
20167 * gimple-fold.c (gimple_build): Likewise.
20168 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
20169 rather than gimple_build_call_internal.
20170 (get_initial_defs_for_reduction): Likewise.
20171 (vect_create_epilog_for_reduction): Likewise.
20172 (vectorizable_live_operation): Likewise.
20174 2018-05-17 Martin Liska <mliska@suse.cz>
20176 * gimple-ssa-sprintf.c (format_directive): Do not use
20177 space in between 'G_' and '('.
20179 2018-05-17 Jakub Jelinek <jakub@redhat.com>
20182 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
20183 even if the mask is not all ones.
20186 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
20188 (ix86_gimple_fold_builtin): Likewise.
20191 * config/i386/i386.c: Include tree-vector-builder.h.
20192 (ix86_vector_shift_count): New function.
20193 (ix86_fold_builtin): Fold shift builtins by scalar count.
20194 (ix86_gimple_fold_builtin): Likewise.
20196 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
20197 _mm512_setzero): New intrinsics.
20199 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
20200 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20202 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
20203 code generation for cases where splatting a value is not useful.
20204 * simplify-rtx.c (simplify_ternary_operation): Simplify
20205 vec_merge across a vec_duplicate and a paradoxical subreg forming
20206 a vector mode to a vec_concat.
20208 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
20210 * config.gcc: Support "goldmont-plus".
20211 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
20213 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
20214 PROCESSOR_GOLDMONT_PLUS.
20215 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
20216 (processor_target_table): Add "goldmont-plus".
20217 (PTA_GOLDMONT_PLUS): Define.
20218 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
20219 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
20220 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
20221 (fold_builtin_cpu): Add "goldmont-plus".
20222 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
20223 (ix86_option_override_internal): Add "goldmont-plus".
20224 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
20225 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
20226 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
20227 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
20229 2018-05-17 Richard Biener <rguenther@suse.de>
20231 PR tree-optimization/85757
20232 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
20233 remove defs that only feed that PHI from further processing.
20235 2018-05-16 Jim Wilson <jimw@sifive.com>
20237 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
20239 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
20241 2018-05-16 Mark Wielaard <mark@klomp.org>
20243 * dwarf2out.c (count_index_strings): New function.
20244 (output_indirect_strings): Call count_index_strings and generate
20245 header for dwarf_version >= 5.
20247 2018-05-16 Mark Wielaard <mark@klomp.org>
20249 * dwarf2out.c (dwarf_FORM): New function.
20250 (set_indirect_string): Use dwarf_FORM.
20251 (reset_indirect_string): Likewise.
20252 (size_of_die): Likewise.
20253 (value_format): Likewise.
20254 (output_die): Likewise.
20255 (add_skeleton_AT_string): Likewise.
20256 (output_macinfo_op): Likewise.
20257 (index_string): Likewise.
20258 (output_index_string_offset): Likewise.
20259 (output_index_string): Likewise.
20260 (count_index_strings): Likewise.
20262 2018-05-16 Carl Love <cel@us.ibm.com>
20264 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
20265 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
20267 2018-05-16 Martin Jambor <mjambor@suse.cz>
20269 * ipa-prop.c (ipa_free_all_edge_args): Remove.
20270 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
20272 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
20274 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
20275 (fnma<mode>4): Likewise.
20276 (fms<mode>4): Likewise.
20277 (fnms<mode>4): Likewise.
20278 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
20279 (aarch64_fnma<mode>4): Likewise.
20280 (aarch64_fms<mode>4): Likewise.
20281 (aarch64_fnms<mode>4): Likewise.
20282 (aarch64_fnmadd<mode>4): Likewise.
20284 2018-05-16 Jason Merrill <jason@redhat.com>
20286 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
20288 2018-05-16 Richard Biener <rguenther@suse.de>
20290 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
20291 (dump_stmt_cost): Declare.
20292 (add_stmt_cost): Dump cost we add.
20293 (add_stmt_costs): New function.
20294 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
20295 No longer exported.
20296 (vect_analyze_stmt): Adjust prototype.
20297 (vectorizable_condition): Likewise.
20298 (vectorizable_live_operation): Likewise.
20299 (vectorizable_reduction): Likewise.
20300 (vectorizable_induction): Likewise.
20301 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
20302 cost vector to pass to vectorizable_ and record afterwards.
20303 (vect_model_reduction_cost): Take cost vector argument and adjust.
20304 (vect_model_induction_cost): Likewise.
20305 (vectorizable_reduction): Likewise.
20306 (vectorizable_induction): Likewise.
20307 (vectorizable_live_operation): Likewise.
20308 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
20309 SLP_TREE_NUMBER_OF_VEC_STMTS.
20310 (vect_analyze_slp_cost_1): Remove.
20311 (vect_analyze_slp_cost): Likewise.
20312 (vect_slp_analyze_node_operations): Take visited args and
20313 a target cost vector. Avoid processing already visited stmt sets.
20314 (vect_slp_analyze_operations): Use a local cost vector to gather
20315 costs and register those of non-discarded instances.
20316 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
20317 (vect_schedule_slp_instance): Remove copying of
20318 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
20320 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
20321 adding cost. Record cost entry location.
20322 (vect_prologue_cost_for_slp_op): Function to compute cost of
20323 a constant or invariant generated for SLP vect in the prologue,
20324 split out from vect_analyze_slp_cost_1.
20325 (vect_model_simple_cost): Make static. Adjust for SLP costing.
20326 (vect_model_promotion_demotion_cost): Likewise.
20327 (vect_model_store_cost): Likewise, make static.
20328 (vect_model_load_cost): Likewise.
20329 (vectorizable_bswap): Add cost vector arg and adjust.
20330 (vectorizable_call): Likewise.
20331 (vectorizable_simd_clone_call): Likewise.
20332 (vectorizable_conversion): Likewise.
20333 (vectorizable_assignment): Likewise.
20334 (vectorizable_shift): Likewise.
20335 (vectorizable_operation): Likewise.
20336 (vectorizable_store): Likewise.
20337 (vectorizable_load): Likewise.
20338 (vectorizable_condition): Likewise.
20339 (vectorizable_comparison): Likewise.
20340 (can_vectorize_live_stmts): Likewise.
20341 (vect_analyze_stmt): Likewise.
20342 (vect_transform_stmt): Adjust calls to vectorizable_*.
20343 * tree-vectorizer.c: Include gimple-pretty-print.h.
20344 (dump_stmt_cost): New function.
20346 2018-05-16 Richard Biener <rguenther@suse.de>
20348 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
20349 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
20350 * tree-ssa-dse.c: Include tree-ssa-loop.h.
20351 (check_name): New callback.
20352 (dse_classify_store): Track cycles via a visited bitmap of PHI
20353 defs and simplify handling of in-loop and across loop dead stores
20354 and properly fail for loop-variant refs. Handle byte-tracking with
20355 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
20358 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
20360 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
20361 (vect_get_mask_type_for_stmt): Likewise.
20362 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
20364 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
20365 to determine the statement's vector type and the vector type that
20366 should be used for calculating nunits. Deal with cases in which
20367 the type has to be deferred.
20368 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
20369 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
20370 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
20371 (vect_determine_vf_for_stmt): New functions, split out from...
20372 (vect_determine_vectorization_factor): ...here.
20373 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
20374 (vect_get_mask_type_for_stmt): New functions, split out from
20375 vect_determine_vectorization_factor.
20377 2018-05-16 Richard Biener <rguenther@suse.de>
20379 * tree-cfg.c (verify_gimple_assign_ternary): Properly
20380 verify the [VEC_]COND_EXPR embedded comparison.
20382 2018-05-15 Martin Sebor <msebor@redhat.com>
20384 PR tree-optimization/85753
20385 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
20386 RECORD_TYPE in addition to ARRAY_TYPE.
20388 2018-05-15 Martin Sebor <msebor@redhat.com>
20390 PR middle-end/85643
20391 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
20393 2018-05-15 Richard Biener <rguenther@suse.de>
20395 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
20396 add by_clobber_p one. Change algorithm to collect all defs
20397 representing uses we need to walk and try reducing them to
20398 a single one before failing.
20399 (dse_dom_walker::dse_optimize_stmt): Adjust.
20401 2018-05-13 Mark Wielaard <mark@klomp.org>
20403 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
20404 (size_of_loc_descr): Likewise.
20405 (output_loc_operands): Likewise.
20406 (output_loc_operands_raw): Likewise.
20407 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
20408 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
20409 (hash_loc_operands): Likewise.
20410 (compare_loc_operands): Likewise.
20412 2018-05-14 Mark Wielaard <mark@klomp.org>
20414 * dwarf2out.c (count_index_addrs): New function.
20415 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
20417 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
20419 PR tree-optimization/83648
20420 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
20421 return value as malloc candidate.
20423 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
20426 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
20427 param as true in call to suggest_attribute.
20429 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
20431 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
20432 -mreadonly-in-sdata.
20434 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20436 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
20438 (aarch64_crypto_aesd_fused): Likewise.
20440 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
20442 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
20443 (movsi_aarch64): Likewise.
20444 (load_pairsi): Likewise.
20445 (load_pairdi): Likewise.
20446 (store_pairsi): Likewise.
20447 (store_pairdi): Likewise.
20448 (load_pairsf): Likewise.
20449 (load_pairdf): Likewise.
20450 (store_pairsf): Likewise.
20451 (store_pairdf): Likewise.
20452 (zero_extend): Likewise.
20453 (trunc): Swap alternatives.
20454 (fcvt_target): Add '?' to prefer w over r.
20456 2018-05-14 Jakub Jelinek <jakub@redhat.com>
20459 * config/i386/i386.md: Disallow non-commutative arithmetics in
20460 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
20461 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
20462 in the peephole2 before it.
20464 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
20466 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
20467 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
20468 (ix86_handle_option): Handle -mcldemote.
20469 * config.gcc: New header.
20470 * config/i386/cldemoteintrin.h: New file.
20471 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
20472 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
20474 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
20475 OPTION_MASK_ISA_CLDEMOTE.
20476 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
20477 (ix86_valid_target_attribute_inner_p): Ditto.
20478 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
20479 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
20480 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
20481 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
20482 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
20484 * config/i386/i386.opt: Add -mcldemote.
20485 * config/i386/x86intrin.h: New header.
20486 * doc/invoke.texi: Add -mcldemote.
20488 2018-05-14 Richard Biener <rguenther@suse.de>
20490 * doc/match-and-simplify.texi: Adjust :s documentation.
20492 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
20494 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
20495 intended memcpy size.
20496 (REORDER_45): Likewise.
20498 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
20500 * sort.cc: New file.
20501 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
20502 * vec.c (qsort_chk): Use gcc_qsort.
20503 * Makefile.in (OBJS-libcommon): Add sort.o.
20504 (build/sort.o): New target. Use it...
20505 (BUILD_RTL): ... here, and...
20506 (build/gencfn-macros): ... here, and...
20507 (build/genmatch): ... here.
20509 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
20510 Chung-Ju Wu <jasonwucj@gmail.com>
20512 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
20513 * config/nds32/nds32-graywolf.md: New file.
20514 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
20515 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
20517 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
20518 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
20519 * config/nds32/nds32.md (pipeline_model): Add graywolf.
20520 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
20521 * config/nds32/pipelines.md: Include n15 settings.
20523 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
20524 Chung-Ju Wu <jasonwucj@gmail.com>
20526 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
20527 * config/nds32/nds32-n13.md: New file.
20528 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
20529 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
20531 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
20532 * config/nds32/nds32.md (pipeline_model): Add n13.
20533 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
20534 * config/nds32/pipelines.md: Include n13 settings.
20536 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
20537 Chung-Ju Wu <jasonwucj@gmail.com>
20539 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
20540 * config/nds32/nds32-n10.md: New file.
20541 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
20542 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
20544 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
20545 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
20546 * config/nds32/nds32.md (pipeline_model): Add n10.
20547 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
20548 * config/nds32/pipelines.md: Include n10 settings.
20550 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
20551 Kito Cheng <kito.cheng@gmail.com>
20552 Chung-Ju Wu <jasonwucj@gmail.com>
20554 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
20555 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
20556 Add enum values for DSP extension instructions.
20557 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
20559 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
20560 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
20561 New code iterators.
20562 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
20563 * config/nds32/nds32-dspext.md: New file for DSP implementation.
20564 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
20565 * config/nds32/nds32-intrinsic.md: Likewise.
20566 * config/nds32/nds32_intrinsic.h: Likewise.
20567 * config/nds32/nds32-md-auxiliary.c: Likewise.
20568 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
20569 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
20570 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
20571 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
20572 * config/nds32/nds32-protos.h: New declarations for DSP extension.
20573 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
20574 TYPE_DMAC in switch statement.
20575 * config/nds32/nds32.c: New checking and implementation for DSP
20576 extension instructions.
20577 * config/nds32/nds32.h: Likewise.
20578 * config/nds32/nds32.md: Likewise.
20579 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
20580 * config/nds32/predicates.md: Implement new predicates for DSP
20583 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
20585 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
20586 Reformat alternatives and attributes so it is easier to identify
20587 which constraints/attributes go with which instruction.
20588 (mov<mode>_hardfloat32, FMOVE64): Likewise.
20589 (mov<mode>_softfloat32, FMOVE64): Likewise.
20590 (mov<mode>_hardfloat64, FMOVE64): Likewise.
20591 (mov<mode>_softfloat64, FMOVE64): Likewise.
20593 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
20595 * doc/extend.texi (PowerPC Built-in Functions): Rename this
20597 (Basic PowerPC Built-in Functions): The new name of the
20598 subsection previously known as "PowerPC Built-in Functions".
20599 (Basic PowerPC Built-in Functions Available on all Configurations):
20601 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
20602 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
20603 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
20604 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
20606 2018-05-11 Martin Jambor <mjambor@suse.cz>
20609 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
20612 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
20615 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
20617 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
20619 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
20620 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
20621 (ix86_handle_option): Handle -mwaitpkg.
20622 * config.gcc: New header.
20623 * config/i386/cpuid.h (bit_WAITPKG): New bit.
20624 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
20625 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
20627 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
20628 OPTION_MASK_ISA_WAITPKG.
20629 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
20630 (ix86_option_override_internal): Add PTA_WAITPKG.
20631 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
20632 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
20633 IX86_BUILTIN_TPAUSE.
20634 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
20635 __builtin_ia32_umwait and __builtin_ia32_tpause.
20636 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
20637 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
20638 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
20639 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
20640 UNSPECV_TPAUSE): New.
20641 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
20642 * config/i386/i386.opt: Add -mwaitpkg.
20643 * config/i386/waitpkgintrin.h: New file.
20644 * config/i386/x86intrin.h: New header.
20645 * doc/invoke.texi: Add -mwaitpkg.
20647 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
20650 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
20652 (cortex-m0): Use armv6s-m isa.
20653 (cortex-m0plus): Likewise.
20654 (cortex-m1): Likewise.
20655 (cortex-m0.small-multiply): Likewise.
20656 (cortex-m0plus.small-multiply): Likewise.
20657 (cortex-m1.small-multiply): Likewise.
20659 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
20660 Jakub Jelinek <jakub@redhat.com>
20662 PR tree-optimization/85692
20663 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
20664 source permute as well.
20666 2018-05-11 Martin Liska <mliska@suse.cz>
20669 * doc/extend.texi: Document LLVM style format for no_sanitize
20672 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
20674 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
20675 mode_supports_vsx_dform_quad to mode_supports_dq_form.
20676 (mode_supports_vsx_dform_quad): Likewise.
20677 (mode_supports_vmx_dform): Move these functions to be next to the
20678 other mode_supports functions.
20679 (mode_supports_dq_form): Likewise.
20680 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
20681 mode_supports_dq_form.
20682 (reg_offset_addressing_ok_p): Likewise.
20683 (offsettable_ok_by_alignment): Likewise.
20684 (rs6000_legitimate_offset_address_p): Likewise.
20685 (legitimate_lo_sum_address_p): Likewise.
20686 (rs6000_legitimize_address): Likewise.
20687 (rs6000_legitimize_reload_address): Likewise.
20688 (rs6000_secondary_reload_inner): Likewise.
20689 (rs6000_preferred_reload_class): Likewise.
20690 (rs6000_output_move_128bit): Likewise.
20692 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
20694 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
20695 Generate SImode target register for null target.
20696 <case IX86_BUILTIN_XGETBV>: Ditto.
20697 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
20698 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
20700 2018-05-10 Carl Love <cel@us.ibm.com>
20702 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
20703 dcbtt and dcbtstt if operands[2] is 0.
20705 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
20708 * config/i386/sse.md (usadv64qi): New expander.
20710 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
20712 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
20713 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
20714 -maltivec=be support.
20715 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
20716 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
20717 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
20718 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
20719 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
20720 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
20721 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
20722 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
20723 altivec_vsumsws): Adjust.
20724 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
20725 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
20726 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
20728 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
20729 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
20730 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
20731 (altivec_lve<VI_char>x): Delete expand.
20732 (*altivec_lve<VI_char>x_internal): Rename to...
20733 (altivec_lve<VI_char>x): ... this.
20734 (altivec_lvxl_<mode>): Delete expand.
20735 (*altivec_lvxl_<mode>_internal): Rename to ...
20736 (altivec_lvxl_<mode>): ... this.
20737 (altivec_stvxl_<mode>): Delete expand.
20738 (*altivec_stvxl_<mode>_internal): Rename to ...
20739 (altivec_stvxl_<mode>): ... this.
20740 (altivec_stve<VI_char>x): Delete expand.
20741 (*altivec_stve<VI_char>x_internal): Rename to ...
20742 (altivec_stve<VI_char>x): ... this.
20743 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
20744 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
20745 reduc_plus_scal_<mode>): Adjust.
20746 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
20748 (rs6000_cpu_cpp_builtins): Adjust.
20749 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
20750 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
20751 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
20752 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
20753 -maltivec=be support.
20754 (rs6000_split_vec_extract_var): Adjust.
20755 (rs6000_split_v4si_init): Adjust.
20756 (swap_selector_for_mode): Delete.
20757 (altivec_expand_lvx_be, altivec_expand_stvx_be,
20758 altivec_expand_stvex_be): Delete.
20759 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
20760 -maltivec=be support.
20761 (rs6000_gimple_fold_builtin): Ditto.
20762 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
20764 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
20765 (TARGET_DIRECT_MOVE_64BIT): Adjust.
20766 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
20767 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
20768 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
20769 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
20770 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
20771 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
20772 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
20773 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
20774 anonymous split): Adjust.
20775 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
20776 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
20778 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
20780 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
20781 when --with-gxx-include-dir is also specified.
20782 * configure: Regenerate.
20784 2018-05-09 Jim Wilson <jimw@sifive.com>
20787 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
20788 * config/riscv/t-withmultilib: New.
20789 * config/riscv/withmultilib.h: New.
20790 * doc/install.texi: Document RISC-V --with-multilib-list support.
20792 2018-05-09 Richard Biener <rguenther@suse.de>
20794 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
20796 (vect_bb_vectorization_profitable_p): Adjust. Compute
20797 actual scalar cost using the cost vector and the add_stmt_cost
20800 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
20802 PR rtl-optimization/85645
20803 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
20804 in the REG_CFA_REGISTER note for LR, don't leave it empty.
20806 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
20808 PR rtl-optimization/85645
20809 * shrink-wrap.c (spread_components): Return a boolean saying if
20810 anything was changed.
20811 (try_shrink_wrapping_separate): Iterate spread_components until
20812 nothing changes anymore.
20814 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
20816 PR rtl-optimization/85645
20817 * regrename.c (build_def_use): Also kill the chains that include the
20818 destination of a REG_CFA_REGISTER note.
20820 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
20822 PR rtl-optimization/85645
20823 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
20824 insn that has a REG_CFA_REGISTER note.
20826 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
20828 * cfgexpand.c (expand_clobber): New function.
20829 (expand_gimple_stmt_1): Use it.
20830 * tree-vect-stmts.c (vect_clobber_variable): New function,
20832 (vectorizable_simd_clone_call): ...here.
20833 (vectorizable_store): Emit a clobber either side of an
20834 IFN_STORE_LANES sequence.
20835 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
20837 2018-05-09 Tom de Vries <tom@codesourcery.com>
20840 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
20841 (define_insn "trap_if_false"): Add exit after trap.
20843 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
20845 PR rtl-optimization/85638
20846 * bb-reorder.c: Include common/common-target.h.
20847 (create_forwarder_block): New function extracted from...
20848 (fix_up_crossing_landing_pad): ...here. Rename into...
20849 (dw2_fix_up_crossing_landing_pad): ...this.
20850 (sjlj_fix_up_crossing_landing_pad): New function.
20851 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
20852 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
20853 from both partitions and exit the loop after one iteration.
20855 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
20858 * doc/extend.texi (PowerPC Built-in Functions): Rename this
20860 (Basic PowerPC Built-in Functions): The new name of the
20861 subsection previously known as "PowerPC Built-in Functions".
20862 (Basic PowerPC Built-in Functions Available on all Configurations):
20864 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
20866 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
20868 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
20870 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
20873 2018-05-08 Jim Wilson <jimw@sifive.com>
20875 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
20876 (LD_EMUL_SUFFIX): New.
20877 (LINK_SPEC): Use it.
20879 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
20881 * doc/extend.texi (PowerPC Built-in Functions): Rename this
20883 (Basic PowerPC Built-in Functions): The new name of the
20884 subsection previously known as "PowerPC Built-in Functions".
20885 (Basic PowerPC Built-in Functions Available on all Configurations):
20887 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
20889 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
20891 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
20893 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
20896 2018-05-08 Jakub Jelinek <jakub@redhat.com>
20899 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
20900 after cmpelim optimization.
20902 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
20904 * config.gcc: Support "goldmont".
20905 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
20906 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
20907 PROCESSOR_GOLDMONT.
20908 * config/i386/i386.c (m_GOLDMONT): Define.
20909 (processor_target_table): Add "goldmont".
20910 (PTA_GOLDMONT): Define.
20911 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
20912 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
20913 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
20914 (fold_builtin_cpu): Add "goldmont".
20915 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
20916 (ix86_option_override_internal): Add "goldmont".
20917 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
20918 (processor_type): Add PROCESSOR_GOLDMONT.
20919 * config/i386/i386.md: Add CPU "glm".
20920 * config/i386/glm.md: New file.
20921 * config/i386/x86-tune.def: Add m_GOLDMONT.
20922 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
20924 2018-05-08 Jakub Jelinek <jakub@redhat.com>
20927 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
20929 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
20930 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
20931 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
20934 * config/i386/i386.c (ix86_fold_builtin): Handle
20935 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
20938 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
20939 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
20941 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
20944 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
20945 (check_arch): Likewise.
20946 (check_fpu): Return the result rather than printing it.
20947 (end arch): Fix operator precedence.
20948 (end cpu): Likewise.
20949 (END): Print the result from check_fpu.
20951 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
20952 Alan Hayward <alan.hayward@arm.com>
20953 David Sherwood <david.sherwood@arm.com>
20955 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
20956 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
20957 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
20958 (*fcmuo<mode>_and): New patterns.
20960 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
20962 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
20963 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
20964 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
20965 (cmp_op, sve_imm_con): New code attributes.
20966 (SVE_COND_INT_CMP, imm_con): Delete.
20967 (cmp_op): Remove above unspecs from int attribute.
20968 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
20970 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
20971 comparison-specific unspecs.
20972 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
20973 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
20974 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
20975 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
20976 (*vec_fcm<cmp_op><mode>): Rename to...
20977 (*fcm<cmp_op><mode>): ...this and adjust likewise.
20978 (*vec_fcmuo<mode>): Rename to...
20979 (*fcmuo<mode>): ...this and adjust likewise.
20980 (*pred_fcm<cmp_op><mode>): New pattern.
20981 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
20982 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
20984 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
20986 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
20987 (aarch64_emit_sve_predicated_cond): New function.
20988 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
20989 (aarch64_emit_unspec_cond_or): Replace with...
20990 (aarch64_emit_sve_or_conds): ...this new function. Use
20991 aarch64_emit_sve_ptrue_op for the individual comparisons and
20992 aarch64_emit_binop to OR them together.
20993 (aarch64_emit_inverted_unspec_cond): Replace with...
20994 (aarch64_emit_sve_inverted_cond): ...this new function. Use
20995 aarch64_emit_sve_ptrue_op for the comparison and
20996 aarch64_emit_unop to invert the result.
20997 (aarch64_expand_sve_vec_cmp_float): Update after the above
20998 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
21000 2018-05-07 Nathan Sidwell <nathan@acm.org>
21002 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
21003 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
21004 (Backwards Compatibility): Likewise.
21006 2018-05-07 Luis Machado <luis.machado@linaro.org>
21010 2018-05-07 Luis Machado <luis.machado@linaro.org>
21012 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
21013 <prefetch_dynamic_strides>: New const bool field.
21014 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
21015 prefetch_dynamic_strides.
21016 (exynosm1_prefetch_tune): Likewise.
21017 (thunderxt88_prefetch_tune): Likewise.
21018 (thunderx_prefetch_tune): Likewise.
21019 (thunderx2t99_prefetch_tune): Likewise.
21020 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
21022 (aarch64_override_options_internal): Update to set
21023 PARAM_PREFETCH_DYNAMIC_STRIDES.
21024 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
21025 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
21026 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
21027 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
21028 prefetch-dynamic-strides setting.
21030 2018-05-07 Luis Machado <luis.machado@linaro.org>
21032 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
21033 <minimum_stride>: New const int field.
21034 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
21035 minimum_stride field.
21036 (exynosm1_prefetch_tune): Likewise.
21037 (thunderxt88_prefetch_tune): Likewise.
21038 (thunderx_prefetch_tune): Likewise.
21039 (thunderx2t99_prefetch_tune): Likewise.
21040 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
21041 (aarch64_override_options_internal): Update to set
21042 PARAM_PREFETCH_MINIMUM_STRIDE.
21043 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
21044 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
21045 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
21046 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
21047 stride is constant and is below the minimum stride threshold.
21049 2018-05-07 Luis Machado <luis.machado@linaro.org>
21051 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
21054 2018-05-07 Luis Machado <luis.machado@linaro.org>
21056 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
21057 <prefetch_dynamic_strides>: New const bool field.
21058 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
21059 prefetch_dynamic_strides.
21060 (exynosm1_prefetch_tune): Likewise.
21061 (thunderxt88_prefetch_tune): Likewise.
21062 (thunderx_prefetch_tune): Likewise.
21063 (thunderx2t99_prefetch_tune): Likewise.
21064 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
21066 (aarch64_override_options_internal): Update to set
21067 PARAM_PREFETCH_DYNAMIC_STRIDES.
21068 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
21069 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
21070 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
21071 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
21072 prefetch-dynamic-strides setting.
21074 2018-05-07 Luis Machado <luis.machado@linaro.org>
21076 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
21077 <minimum_stride>: New const int field.
21078 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
21079 minimum_stride field.
21080 (exynosm1_prefetch_tune): Likewise.
21081 (thunderxt88_prefetch_tune): Likewise.
21082 (thunderx_prefetch_tune): Likewise.
21083 (thunderx2t99_prefetch_tune): Likewise.
21084 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
21085 (aarch64_override_options_internal): Update to set
21086 PARAM_PREFETCH_MINIMUM_STRIDE.
21087 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
21088 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
21089 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
21090 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
21091 stride is constant and is below the minimum stride threshold.
21093 2018-05-06 Jakub Jelinek <jakub@redhat.com>
21096 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
21097 the type is addressable. Don't force op into register if it has
21100 2018-05-05 Roland McGrath <mcgrathr@google.com>
21103 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
21104 any section for which we don't know a specific type it should have,
21105 regardless of name. Previously this was done only for the exact
21106 names ".init_array", ".fini_array", and ".preinit_array".
21107 (default_elf_asm_named_section): Add comment about
21108 relationship with default_section_type_flags and SECTION_NOTYPE.
21109 (get_section): Don't consider it a type conflict if one side has
21110 SECTION_NOTYPE and the other doesn't, as long as neither has the
21111 SECTION_BSS et al used in the default_section_type_flags logic.
21113 2018-05-05 Tom de Vries <tom@codesourcery.com>
21116 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
21117 (workaround_barsyncs): New function.
21118 (nvptx_reorg): Use workaround_barsyncs.
21119 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
21120 (define_expand "nvptx_membar_cta"): New define_expand.
21121 (define_insn "*nvptx_membar_cta"): New insn.
21123 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
21125 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
21126 To improve optimization opportunities.
21127 * builtin-types.def: The new needed builtin types for the above.
21129 2018-05-04 Richard Biener <rguenther@suse.de>
21131 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
21132 * gimple-ssa-store-merging.c
21133 (imm_store_chain_info::output_merged_store): Remove redundant create,
21134 release split_store vector contents on failure.
21135 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
21136 scalar stmt vector on cache hit.
21138 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
21140 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
21142 * config.gcc (powerpc-xilinx-eabi*): Remove.
21143 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
21145 (fusion_addis_mem_combo_load): Ditto.
21146 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
21148 (rs6000_cpu_cpp_builtins): Ditto.
21149 * config/rs6000/rs6000-linux.c
21150 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
21151 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
21152 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
21154 (rs6000_setup_reg_addr_masks): Ditto.
21155 (rs6000_init_hard_regno_mode_ok): Ditto.
21156 (rs6000_option_override_internal): Ditto.
21157 (legitimate_lo_sum_address_p): Ditto.
21158 (rs6000_legitimize_address): Ditto.
21159 (rs6000_legitimize_reload_address): Ditto.
21160 (rs6000_legitimate_address_p): Ditto.
21161 (abi_v4_pass_in_fpr): Ditto.
21162 (setup_incoming_varargs): Ditto.
21163 (rs6000_gimplify_va_arg): Ditto.
21164 (rs6000_split_multireg_move): Ditto.
21165 (rs6000_savres_strategy): Ditto.
21166 (rs6000_emit_prologue_components): Ditto.
21167 (rs6000_emit_epilogue_components): Ditto.
21168 (rs6000_emit_prologue): Ditto.
21169 (rs6000_emit_epilogue): Ditto.
21170 (rs6000_elf_file_end): Ditto.
21171 (rs6000_function_value): Ditto.
21172 (rs6000_libcall_value): Ditto.
21173 * config/rs6000/rs6000.h: Ditto.
21174 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
21175 (TARGET_MINMAX): ... this. New.
21176 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
21177 * config/rs6000/rs6000.md: Remove Xilinx FP support.
21178 (*movsi_internal1_single): Delete.
21179 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
21180 mfpu=, mxilinx-fpu): Delete.
21181 * config/rs6000/singlefp.h: Delete.
21182 * config/rs6000/sysv4.h: Remove Xilinx FP support.
21183 * config/rs6000/t-rs6000: Ditto.
21184 * config/rs6000/t-xilinx: Delete.
21185 * config/rs6000/titan.md: Adjust for fp_type removal.
21186 * config/rs6000/vsx.md: Remove Xilinx FP support.
21187 (VStype_simple): Delete.
21188 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
21189 * config/rs6000/xfpu.h: Delete.
21190 * config/rs6000/xfpu.md: Delete.
21191 * config/rs6000/xilinx.h: Delete.
21192 * config/rs6000/xilinx.opt: Delete.
21193 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
21194 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
21196 2018-05-04 Tom de Vries <tom@codesourcery.com>
21199 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
21202 2018-05-04 Richard Biener <rguenther@suse.de>
21204 PR middle-end/85627
21205 * tree-complex.c (update_complex_assignment): We are always in SSA form.
21206 (expand_complex_div_wide): Likewise.
21207 (expand_complex_operations_1): Likewise.
21208 (expand_complex_libcall): Preserve EH info of the original stmt.
21209 (tree_lower_complex): Handle removed blocks.
21210 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
21211 on complex multiplication and division libcall builtins.
21213 2018-05-04 Richard Biener <rguenther@suse.de>
21215 PR middle-end/85574
21216 * fold-const.c (negate_expr_p): Restrict negation of operand
21217 zero of a division to when we know that can happen without
21219 (fold_negate_expr_1): Likewise.
21221 2018-05-04 Jakub Jelinek <jakub@redhat.com>
21224 * real.h (real_nextafter): Declare.
21225 * real.c (real_nextafter): New function.
21226 * fold-const-call.c (fold_const_nextafter): New function.
21227 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
21228 CASE_CFN_NEXTTOWARD.
21229 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
21230 even when arg1_mode is different from arg0_mode.
21232 2018-05-03 Nathan Sidwell <nathan@acm.org>
21234 * doc/extend.texi (Deprecated Features): Remove
21235 -ffriend-injection.
21236 (Backwards Compatibility): Likewise.
21237 * doc/invoke.texi (C++ Language Options): Likewise.
21238 (C++ Dialect Options): Likewise.
21240 2018-05-03 Jakub Jelinek <jakub@redhat.com>
21243 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
21244 _mm512_mask_mullox_epi64): New intrinsics.
21246 2018-05-03 Tom de Vries <tom@codesourcery.com>
21249 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
21250 dump files): Add offload-tree.
21252 2018-05-03 Richard Biener <rguenther@suse.de>
21254 PR tree-optimization/85615
21255 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
21256 to loops not nested in BBs loop father to avoid creating multi-entry
21259 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21261 PR tree-optimization/70291
21262 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
21263 arguments. Change return type to tree. Emit libcall as a new
21264 statement rather than replacing existing one when inplace_p is true.
21265 (expand_complex_multiplication_components): New function.
21266 (expand_complex_multiplication): Expand floating-point complex
21267 multiplication using the above.
21268 (expand_complex_division): Rename inner_type parameter to type.
21269 Update expand_complex_libcall call-site.
21270 (expand_complex_operations_1): Update expand_complex_multiplication
21271 and expand_complex_division call-sites.
21273 2018-05-02 Jakub Jelinek <jakub@redhat.com>
21276 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
21277 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
21278 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
21279 the highest significant bit of the shift count mask is clear. In
21280 check whether and[sq]i3 is needed verify that all significant bits
21281 of the shift count other than the highest are set.
21283 2018-05-02 Tom de Vries <tom@codesourcery.com>
21286 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
21287 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
21288 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
21289 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
21290 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
21291 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
21292 __builtin_goacc_parlevel_size.
21294 2018-05-02 Richard Biener <rguenther@suse.de>
21296 PR tree-optimization/85597
21297 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
21298 do not use split vect_get_vec_defs call but call vect_get_slp_defs
21301 2018-05-02 Tom de Vries <tom@codesourcery.com>
21304 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
21305 dump files): Add ltrans-tree.
21307 2018-05-02 Tom de Vries <tom@codesourcery.com>
21310 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
21311 dump files): Add wpa-ipa.
21313 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
21315 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
21316 powerpc*-*-linux*paired* target.
21317 * config/rs6000/750cl.h: Delete.
21318 * config/rs6000/paired.h: Delete.
21319 * config/rs6000/paired.md: Delete.
21320 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
21322 * config/rs6000/rs6000-builtin.def: Remove paired float support.
21323 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
21324 comment. Remove paired float support.
21325 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
21326 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
21328 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
21329 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
21331 * config/rs6000/rs6000.c: Remove paired float support.
21332 (paired_expand_vector_init, paired_expand_vector_move,
21333 paired_emit_vector_compare, paired_emit_vector_cond_expr,
21334 (paired_expand_lv_builtin, paired_expand_stv_builtin,
21335 paired_expand_builtin, paired_expand_predicate_builtin,
21336 paired_init_builtins): Delete.
21337 * config/rs6000/rs6000.h: Remove paired float support.
21338 * config/rs6000/rs6000.md: Remove paired float support.
21339 (move_from_CR_ov_bit): Delete.
21340 * config/rs6000/rs6000.opt (mpaired): Delete.
21341 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
21342 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
21344 2018-05-02 Richard Biener <rguenther@suse.de>
21346 PR middle-end/85567
21347 * gimplify.c (gimplify_save_expr): When in SSA form allow
21348 SAVE_EXPRs to compute to SSA vars.
21350 2018-05-02 Jakub Jelinek <jakub@redhat.com>
21353 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
21354 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
21355 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
21356 clobber operands[2], instead use a new pseudo. Formatting fixes.
21358 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
21360 PR tree-optimization/85586
21361 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
21362 exit early for statements in the same group if the accesses are
21365 2018-05-02 Tom de Vries <tom@codesourcery.com>
21368 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
21371 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
21373 PR tree-optimization/85143
21374 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
21376 2018-05-01 Tom de Vries <tom@codesourcery.com>
21379 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
21380 not found" error message.
21382 2018-05-01 Tom de Vries <tom@codesourcery.com>
21385 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
21386 * vec.c (test_ordered_remove_if): New function.
21387 (vec_c_tests): Call test_ordered_remove_if.
21388 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
21389 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
21390 * tree-vect-patterns.c (vect_pattern_recog_1): Use
21391 VEC_ORDERED_REMOVE_IF.
21393 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
21395 PR tree-optimization/82665
21396 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
21397 pointer subtraction where arguments come from a memchr call.
21399 2018-05-01 Jakub Jelinek <jakub@redhat.com>
21401 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
21402 --push-state --as-needed and --pop-state instead of --as-needed and
21403 --no-as-needed if ld supports it.
21404 * configure: Regenerated.
21407 * doc/install.texi2html: Replace _002d with - and _002a with * in
21408 generated html files using sed.
21410 2018-04-30 David Malcolm <dmalcolm@redhat.com>
21413 * gcc-rich-location.c (blank_line_before_p): New function.
21414 (use_new_line): New function.
21415 (gcc_rich_location::add_fixit_insert_formatted): New function.
21416 * gcc-rich-location.h
21417 (gcc_rich_location::add_fixit_insert_formatted): New function.
21419 2018-04-30 David Malcolm <dmalcolm@redhat.com>
21421 * selftest.c (assert_streq): Rename "expected" and "actual" to
21422 "val1" and "val2". Extend NULL-handling to cover both inputs
21423 symmetrically, while still requiring both to be non-NULL for a pass.
21424 * selftest.h (assert_streq): Rename "expected" and "actual" to
21426 (ASSERT_EQ): Likewise.
21427 (ASSERT_EQ_AT): Likewise.
21428 (ASSERT_KNOWN_EQ): Likewise.
21429 (ASSERT_KNOWN_EQ_AT): Likewise.
21430 (ASSERT_NE): Likewise.
21431 (ASSERT_MAYBE_NE): Likewise.
21432 (ASSERT_MAYBE_NE_AT): Likewise.
21433 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
21434 the assertion to pass.
21435 (ASSERT_STREQ_AT): Likewise.
21437 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
21439 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
21440 interaction with -pie.
21442 2018-04-30 David Malcolm <dmalcolm@redhat.com>
21444 * selftest.h: Fix alphabetization of per-source-file selftest
21447 2018-04-30 Jason Merrill <jason@redhat.com>
21449 PR c++/61982 - dead stores to destroyed objects.
21450 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
21453 2018-04-30 Jason Merrill <jason@redhat.com>
21455 * tree.c (build_clobber): New.
21456 * tree.h: Declare it.
21457 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
21459 2018-04-30 David Malcolm <dmalcolm@redhat.com>
21461 * diagnostic-show-locus.c (layout::layout): Update for
21462 location_get_source_line returning a char_span.
21463 (struct char_span): Move to input.h.
21464 (struct correction): Update for fields in char_span becoming
21466 (struct source_line): Update for location_get_source_line
21467 returning a char_span.
21468 (layout::print_line): Likewise.
21469 * edit-context.c (edited_file::print_content): Likewise.
21470 (edited_file::print_diff_hunk): Likewise.
21471 (edited_file::print_run_of_changed_lines): Likewise.
21472 (edited_file::get_num_lines): Likewise.
21473 (edited_line::edited_line): Likewise.
21474 * final.c (asm_show_source): Likewise.
21475 * input.c (location_get_source_line): Convert return type
21476 from const char * to char_span, losing the final "line_len"
21478 (dump_location_info): Update for the above.
21479 (get_substring_ranges_for_loc): Likewise. Use a char_span
21480 when handling the literal within the line.
21481 (test_reading_source_line): Update for location_get_source_line
21482 returning a char_span.
21483 * input.h (class char_span): Move here from
21484 diagnostic-show-locus.c, converting from a struct to a class.
21485 Make data members private.
21486 (char_span::operator bool): New.
21487 (char_span::length): New.
21488 (char_span::get_buffer): New.
21489 (char_span::operator[]): New.
21490 (char_span::subspan): Make const.
21491 (char_span::xstrdup): New.
21492 (location_get_source_line): Convert return type from const char *
21493 to char_span, losing the final "line_size" param.
21495 2018-04-30 Jan Hubicka <jh@suse.cz>
21497 * lto-wrapper.c (ltrans_priorities): New static var.
21498 (cmp_priority): New.
21499 (run_gcc): Read priorities and if doing parallel build order
21500 the Makefile by them.
21502 2018-04-30 David Malcolm <dmalcolm@redhat.com>
21504 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
21506 2018-04-30 Richard Biener <rguenther@suse.de>
21508 * tree-cfg.c (verify_address): Remove base argument, add
21509 flag whether to check TREE_ADDRESSABLE and do that.
21510 (verify_expr): Remove.
21511 (verify_types_in_gimple_reference): Add pieces from verify_expr.
21512 (verify_gimple_assign_single): Likewise.
21513 (verify_gimple_switch): Likewise.
21514 (verify_expr_location_1): Dereference tp once. Add (disabled)
21515 piece from verify_expr.
21516 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
21518 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
21520 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
21522 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
21524 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
21525 (small_data_pattern): Likewise.
21526 (arc_rewrite_small_data): Likewise.
21527 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
21528 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
21529 (get_symbol_alignment): New function.
21530 (legitimate_small_data_address_p): Likewise.
21531 (legitimate_scaled_address): Update, call
21532 legitimate_small_data_address_p.
21533 (output_sdata): New static variable.
21534 (arc_print_operand): Update how we handle small data operands.
21535 (arc_print_operand_address): Likewise.
21536 (arc_legitimate_address_p): Update, use
21537 legitimate_small_data_address_p.
21538 (arc_rewrite_small_data_p): Remove.
21539 (arc_rewrite_small_data_1): Likewise.
21540 (arc_rewrite_small_data): Likewise.
21541 (small_data_pattern): Likewise.
21542 (compact_sda_memory_operand): Update to use
21543 legitimate_small_data_address_p and get_symbol_alignment.
21544 (prepare_move_operands): Don't rewite sdata pattern.
21545 (prepare_extend_operands): Remove.
21546 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
21548 (zero_extendqisi2): Likewise.
21549 (zero_extendhisi2): Likewise.
21550 (extendqihi2): Likewise.
21551 (extendqisi2): Likewise.
21552 (extendhisi2): Likewise.
21553 (addsi3): Likewise.
21554 (subsi3): Likewise.
21555 (andsi3): Likewise.
21556 * config/arc/constraints.md (Usd): Change it to memory constraint.
21558 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
21560 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
21561 as source of std instructions.
21562 * config/arc/arc.md (movsi_insn): Update pattern predicate to
21563 allow 6-bit constants as source for store instructions.
21564 (movdi_insn): Update instruction pattern to allow 6-bit constants
21565 as source for store instructions.
21567 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
21569 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
21571 2018-04-30 Nathan Sidwell <nathan@acm.org>
21572 Sandra Loosemore <sandra@codesourcery.com>
21574 * dumpfile.c (dump_open): Allow '-' for stdout.
21575 * doc/invoke.texi (Developer Options): Document dump filename
21576 determination early. Document stdin/stdout selection.
21578 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
21580 Microblaze Target: PIC data text relative
21582 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
21583 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
21585 * config/microblaze/microblaze.h (microblaze_constant_address_p):
21586 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
21587 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
21588 New addressing mode for data-text relative position indepenedent code.
21589 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
21590 'ADDRESS_SYMBOLIC_TXT_REL'.
21591 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
21592 (microblaze_legitimate_pic_operand): Exclude function calls from
21593 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
21594 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
21596 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
21597 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
21598 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
21599 for 'address + offset'.
21600 (microblaze_expand_prologue): Add new function prologue call for
21602 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
21603 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
21604 table in case of TARGET_PIC_DATA_TEXT_REL.
21605 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
21606 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
21607 Add new macros 'UNSPEC_TEXT',
21608 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
21609 + exclude function calls from 'UNSPEC_PLT' in case of data text
21611 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
21612 new target hook for generating address diff vector tables in case of
21614 * doc/tm.texi : Regenerate.
21615 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
21616 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
21617 of addr diff vector generation.
21618 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
21619 target hook definition.
21620 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
21621 Add default function for generate_pic_addr_diff_vec -> flag_pic.
21622 * doc/invoke.texi (Add new pic option): Add new microblaze pic
21623 option for data text relative.
21625 2018-04-30 Richard Biener <rguenther@suse.de>
21627 * tree-chrec.h (evolution_function_is_constant_p): Remove
21629 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
21631 2018-04-30 Richard Biener <rguenther@suse.de>
21634 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
21636 2018-04-30 Richard Biener <rguenther@suse.de>
21638 PR tree-optimization/28364
21639 PR tree-optimization/85275
21640 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
21641 copying first exit test.
21643 2018-04-28 Mark Wielaard <mark@klomp.org>
21645 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
21646 dwarf_version >= 5.
21647 (dwarf_AT): Handle DW_AT_addr_base.
21648 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
21650 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
21653 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
21654 (*ashl<dwi>3_doubleword_mask_1): Ditto.
21655 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
21656 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
21658 2018-04-28 Richard Biener <rguenther@suse.de>
21660 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
21661 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
21662 to reflect use. Only add interesting stmts.
21664 2018-04-27 Martin Jambor <mjambor@suse.cz>
21667 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
21668 the jump function allows for passing through aggregate values.
21670 2018-04-27 David Malcolm <dmalcolm@redhat.com>
21672 * input.h (in_system_header_at): Convert from macro to inline
21674 (from_macro_expansion_at): Likewise.
21675 (from_macro_definition_at): Likewise.
21677 2018-04-27 Jeff Law <law@redhat.com>
21679 * config.gcc: Mark tile* targets as deprecated/obsolete.
21681 2018-04-27 Richard Biener <rguenther@suse.de>
21683 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
21686 2018-04-27 Richard Biener <rguenther@suse.de>
21688 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
21690 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
21692 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
21693 with Yd constraint. Set "preferred_for_speed" attribute from
21694 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
21695 with Yd constraint.
21696 (*movdi_internal): Ditto.
21697 (movti_interunit splitters): Remove
21698 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
21699 (movdi_interunit splitters): Ditto.
21700 * config/i386/constraints.md (Ye): Remove.
21701 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
21703 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21706 * config/aarch64/constraints.md (Usg): Limit to 31.
21707 (Usj): Limit to 63.
21709 2018-04-27 Jakub Jelinek <jakub@redhat.com>
21711 PR tree-optimization/85529
21712 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
21713 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
21714 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
21715 zero extension or masking of the MSB bit.
21716 (optimize_range_tests): Add FIRST_BB argument, pass it through
21717 to optimize_range_tests_var_bound.
21718 (maybe_optimize_range_tests, reassociate_bb): Adjust
21719 optimize_range_tests callers.
21721 2018-04-26 Richard Biener <rguenther@suse.de>
21722 Jakub Jelinek <jakub@redhat.com>
21724 * cgraph.h (symbol_table): Just declare debug method here.
21725 * symtab.c (symbol_table::debug): Define.
21727 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
21729 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
21731 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
21733 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
21734 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
21735 (*movdi_internal): Substitute Yi and Yj constraint with x
21736 and Ym and Yn constraint with y constraint. Update "isa"
21737 attribute and set "preferred_for_speed" attribute from
21738 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
21739 (*movsi_internal): Ditto.
21740 (*movdf_internal): Ditto.
21741 (*movsf_internal): Ditto.
21742 (*zero_extendsidi2): Ditto.
21743 * config/i386/sse.md (vec_set<mode>_0): Ditto.
21744 (sse2_loadld): Ditto.
21745 (*vec_extract<ssevecmodelower>_0): Ditto.
21746 (*vec_extractv4si_0_zext_sse4): Ditto.
21747 (vec_concatv2di): Ditto.
21748 (*vec_dup<mode>): Ditto.
21749 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
21750 * config/i386/constraints.md (Yi): Remove.
21755 2018-04-26 Nathan Sidwell <nathan@acm.org>
21757 * dumpfile.c (dump_open): New.
21758 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
21759 (dump_finish): Detect stdio/stderr by value not name.
21761 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
21763 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
21765 2018-04-26 Tom de Vries <tom@codesourcery.com>
21768 * config/nvptx/nvptx.c (verify_neutering_jumps)
21769 (verify_neutering_labels): New function
21770 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
21772 2018-04-26 Tom de Vries <tom@codesourcery.com>
21775 * config/nvptx/nvptx.c (needs_neutering_p): New function.
21776 (nvptx_single): Use needs_neutering_p to skip over insns that do not
21779 2018-04-26 Richard Biener <rguenther@suse.de>
21780 Tom de Vries <tom@codesourcery.com>
21783 * lto-streamer-out.c (output_function): Fixup loops if required to match
21784 discovery done in the reader.
21786 2018-04-26 Richard Biener <rguenther@suse.de>
21788 PR tree-optimization/85116
21789 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
21790 have a loop exit from the single latch predecessor. Remove
21791 case of header with just condition.
21792 (ch_base::copy_headers): Exclude infinite loops from any
21794 (pass_ch::execute): Record exits.
21796 2018-04-26 Richard Biener <rguenther@suse.de>
21798 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
21799 prologue cost vector and pass it to vect_get_load_cost.
21800 (vect_get_peeling_costs_all_drs): Likewise.
21801 (vect_peeling_hash_get_lowest_cost): Likewise.
21802 (vect_enhance_data_refs_alignment): Likewise.
21804 2018-04-26 Richard Biener <rguenther@suse.de>
21806 PR middle-end/85450
21807 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
21808 checking of integer<->pointer conversions.
21809 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
21810 sign-/zero-extending pointer types.
21811 (expand_omp_for_static_chunk): Likewise.
21813 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
21814 Jean Lee <xiaoyur347@gmail.com>
21816 * config/mips/mips.c (mips_asan_shadow_offset): New function.
21817 (TARGET_ASAN_SHADOW_OFFSET): Define.
21818 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
21819 true for -fsanitize=address.
21821 2018-04-25 Mark Wielaard <mark@klomp.org>
21823 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
21826 2018-04-25 Jakub Jelinek <jakub@redhat.com>
21828 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
21829 than "alu", remove explicit "memory" and "imm_disp" attributes.
21830 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
21832 PR middle-end/85414
21833 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
21834 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
21835 gen_lowpart_no_emit.
21837 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
21840 * config/i386/i386.c (ix86_expand_builtin): Change memory
21841 operand to XI, extend p0 to Pmode.
21842 * config/i386/i386.md: Change unspec volatile and operand
21843 1 mode to XI, change operand 0 mode to P.
21845 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
21847 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
21848 GET_MODE_MASK before any checking.
21849 (nds32_can_use_bset_p): Likewise.
21850 (nds32_can_use_btgl_p): Likewise.
21852 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
21854 * config/nds32/nds32-doubleword.md: New define_split pattern for
21855 illegal register number.
21857 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
21859 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
21861 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
21863 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
21865 2018-04-25 Richard Biener <rguenther@suse.de>
21867 * lto-streamer.h (LTO_major_version): Bump to 8.
21869 2018-04-25 Jakub Jelinek <jakub@redhat.com>
21871 * BASE-VER: Set to 9.0.0.
21873 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
21875 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
21876 in __abskf2 and __powikf2.
21878 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21881 * config/aarch64/constraints.md (Usg, Usj): New constraints.
21882 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
21883 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
21884 Use the above on operand 2. Reindent.
21885 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
21887 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
21890 * common/config/i386/i386-common.c (ix86_handle_option): Don't
21892 * config/i386/i386.opt (mcet): Removed.
21893 * doc/install.texi: Remove -mcet documentation.
21894 * doc/invoke.texi: Likewise.
21896 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
21899 * doc/install.texi: Remove -mcet from bootstrap-cet.
21901 2018-04-24 Jakub Jelinek <jakub@redhat.com>
21904 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
21905 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
21909 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
21910 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
21911 containing a CONST_VECTOR.
21913 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
21915 * doc/install.texi: Update newlib dependency for nvptx.
21917 2018-04-24 Jakub Jelinek <jakub@redhat.com>
21920 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
21921 instead of INTVAL when shifting x left.
21923 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
21925 PR tree-optimization/85478
21926 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
21927 vect_grouped_store_supported for single element vectors.
21929 2018-04-24 Richard Biener <rguenther@suse.de>
21932 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
21933 load cost increase to the case of non-constant step.
21935 2018-04-24 Jakub Jelinek <jakub@redhat.com>
21938 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
21939 destination if any_malformed_asm.
21941 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
21943 PR middle-end/85496
21944 * expr.c (store_field): In the bitfield case, if the value comes from
21945 a function call and is returned in registers by means of a PARALLEL,
21946 do not change the mode of the temporary unless BLKmode and VOIDmode.
21948 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
21950 PR rtl-optimization/85423
21951 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
21952 dependencies to debug insns when the previous insn is non-debug.
21954 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
21956 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
21957 enums into a single definition.
21958 (fls): Fix predicates and printing.
21961 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
21963 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
21964 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
21965 and short u6 immediate.
21966 (check_if_valid_sleep_operand): Remove.
21967 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
21969 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
21971 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
21972 flag_always_save_lp condition.
21973 * config/nds32/nds32.opt (malways-save-lp): New option.
21975 2018-04-22 Shiva Chen <shiva0217@gmail.com>
21977 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
21978 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
21979 * config/nds32/nds32.h
21980 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
21981 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
21983 2018-04-22 Shiva Chen <shiva0217@gmail.com>
21985 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
21986 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
21988 2018-04-22 Shiva Chen <shiva0217@gmail.com>
21989 Chung-Ju Wu <jasonwucj@gmail.com>
21991 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
21993 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
21994 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
21996 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
21998 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
22000 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
22002 * config/nds32/nds32-protos.h (nds32_data_alignment,
22003 nds32_local_alignment): Declare.
22004 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
22005 nds32_local_alignment): New functions.
22006 (TARGET_CONSTANT_ALIGNMENT): Define.
22007 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
22009 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
22011 * config/nds32/nds32.c
22012 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
22013 (TARGET_MODES_TIEABLE_P): Likewise.
22015 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
22017 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
22018 level Ofast and Og.
22020 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
22021 Chung-Ju Wu <jasonwucj@gmail.com>
22023 * config/nds32/constants.md (unspec_volatile_element): Add enum values
22024 for unaligned access.
22025 * config/nds32/nds32-intrinsic.c: Implementation of expanding
22027 * config/nds32/nds32-intrinsic.md: Likewise.
22028 * config/nds32/nds32_intrinsic.h: Likewise.
22029 * config/nds32/nds32.h (nds32_builtins): Likewise.
22030 * config/nds32/nds32.opt (munaligned-access): New option.
22031 * config/nds32/nds32.c (nds32_asm_file_start): Display
22032 flag_unaligned_access status.
22034 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
22036 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
22037 -mno-relax is present.
22038 * config/riscv/linux.h (LINK_SPEC): Ditto.
22040 2018-04-20 Martin Sebor <msebor@redhat.com>
22043 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
22045 (gimple_fold_builtin_stxcpy_chk): Same.
22046 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
22048 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
22051 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
22052 __powikf2 when long double is IEEE 128-bit.
22054 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
22056 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
22057 step to make sure stack always aligned.
22059 2018-04-20 Carl Love <cel@us.ibm.com>
22062 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
22063 size check for arg0.
22065 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
22066 Tom de Vries <tom@codesourcery.com>
22069 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
22070 Emit insns for calls too.
22071 (nvptx_find_par): Always look for worker-level predecessor insn.
22072 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
22074 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
22075 (nvptx_process_pars): Propagate frames for calls.
22077 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
22080 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
22082 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
22083 (ix86_handle_option): Don't handle OPT_mibt.
22084 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
22086 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
22088 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
22089 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
22090 (ix86_target_macros): Define __CET__ with flag_cf_protection
22091 for -fcf-protection.
22092 * config/i386/i386.c (isa2_opts): Remove -mibt.
22093 * config/i386/i386.h (TARGET_IBT): Removed.
22094 (TARGET_IBT_P): Likewise.
22095 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
22096 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
22097 * config/i386/i386.opt (mcet): Update help message.
22098 (mshstk): Likewise.
22100 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
22101 -mcet as an alias for -mshstk.
22103 2018-04-20 Richard Biener <rguenther@suse.de>
22105 PR middle-end/85475
22106 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
22107 complexity by forcing a single use of the multiply operand.
22109 2018-04-20 Martin Jambor <mjambor@suse.cz>
22112 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
22113 recursion dependency to only apply to non-clones.
22115 2018-04-20 Martin Jambor <mjambor@suse.cz>
22118 * ipa-cp.c (create_specialized_node): Check that clones of
22119 self-recursive edges exist during IPA-CP.
22121 2018-04-19 Toon Moene <toon@moene.org>
22123 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
22126 2018-04-19 Jakub Jelinek <jakub@redhat.com>
22128 PR tree-optimization/85467
22129 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
22130 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
22131 VECTOR_CST element to type.
22133 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
22136 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
22137 * config/i386/i386.md (builtin_setjmp_setup): Removed.
22138 (builtin_longjmp): Likewise.
22139 (save_stack_nonlocal): New pattern.
22140 (restore_stack_nonlocal): Likewise.
22142 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
22145 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
22146 Replace ASM_OUTPUT_LABEL with fprintf.
22148 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
22151 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
22152 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
22153 * config/i386/i386-c.c (ix86_target_macros_internal): Also
22154 define __IBT__ and __SHSTK__ for -fcf-protection.
22155 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
22157 (ix86_trampoline_init): Likewise.
22158 (x86_output_mi_thunk): Likewise.
22159 (ix86_notrack_prefixed_insn_p): Likewise.
22160 (ix86_option_override_internal): Don't disallow -fcf-protection.
22161 * config/i386/i386.md (rdssp<mode>): Also enable for
22163 (incssp<mode>): Likewise.
22164 (nop_endbr): Likewise.
22165 * config/i386/i386.opt (mcet): Change help message to built-in
22168 (mshstk): Likewise.
22169 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
22170 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
22171 enable CET built-in functions.
22173 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
22175 * common/config/i386/i386-common.c
22176 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
22177 OPTION_MASK_ISA_MOVDIRI_UNSET,
22178 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
22179 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
22180 * config.gcc (movdirintrin.h): New header.
22181 * config/i386/cpuid.h (bit_MOVDIRI,
22182 bit_MOVDIR64B): New bits.
22183 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
22185 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
22186 (VOID, PVOID, PCVOID)): New function types.
22187 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
22188 __builtin_ia32_directstoreu_u64,
22189 __builtin_ia32_movdir64b): New builtins.
22190 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
22191 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
22193 (ix86_valid_target_attribute_inner_p): Ditto.
22194 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
22195 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
22196 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
22197 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
22198 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
22199 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
22200 (movdiri<mode>, movdir64b_<mode>): New.
22201 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
22202 * config/i386/immintrin.h: Include movdirintrin.h.
22203 * config/i386/movdirintrin.h: New file.
22204 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
22206 2018-04-19 Richard Biener <rguenther@suse.de>
22208 PR middle-end/85455
22209 * cfg.c (clear_bb_flags): When loop state says we have
22210 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
22212 2018-04-19 Richard Biener <rguenther@suse.de>
22214 PR tree-optimization/84737
22215 * tree-vect-data-refs.c (vect_copy_ref_info): New function
22216 copying restrict info.
22217 (vect_setup_realignment): Use it.
22218 * tree-vectorizer.h (vect_copy_ref_info): Declare.
22219 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
22220 the first DR to all generated stores.
22221 (vectorizable_load): Likewise for loads.
22223 2018-04-19 Jakub Jelinek <jakub@redhat.com>
22225 PR tree-optimization/85446
22226 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
22227 the integral and pointer types to have the same precision.
22229 * doc/install.texi: Document --disable-cet being the default and
22232 2018-04-18 Martin Liska <mliska@suse.cz>
22234 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
22237 2018-04-18 Martin Liska <mliska@suse.cz>
22240 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
22243 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
22244 arguments if they are comparable.
22246 2018-04-18 Martin Liska <mliska@suse.cz>
22249 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
22252 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
22255 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
22258 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
22259 ENDBR after calling __morestack.
22261 2018-04-18 David Malcolm <dmalcolm@redhat.com>
22264 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
22265 by using gcc_base_ver to generate a gcc_driver_version, and use
22266 it when generating GCC_DRIVER_NAME.
22267 * configure: Regenerate.
22269 2018-04-18 Jakub Jelinek <jakub@redhat.com>
22272 * config.gcc: Obsolete powerpc*-*-*spe*.
22274 2018-04-17 Jakub Jelinek <jakub@redhat.com>
22277 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
22278 (stabstr_D): Change type of unum from unsigned int to
22279 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
22282 2018-04-17 Jim Wilson <jimw@sifive.com>
22285 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
22286 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
22287 Set arg_pointer_offset after using pretend_args_size.
22289 2018-04-17 Jakub Jelinek <jakub@redhat.com>
22291 PR rtl-optimization/85431
22292 * dse.c (record_store): Ignore zero width stores.
22295 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
22296 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
22297 __builtin_stack_restore rather than after it.
22298 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
22299 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
22300 argument instead of virtual_dynamic_stack_rtx.
22302 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
22304 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
22306 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
22307 Add note to error message to explain internal mapping of overloaded
22308 built-in function name to non-overloaded built-in function name.
22309 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
22312 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
22315 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
22316 where the inputs overlap with the output.
22318 2018-04-17 Jakub Jelinek <jakub@redhat.com>
22320 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
22321 (=v, v) alternative and explicit "memory" attribute.
22322 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
22323 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
22325 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
22326 "sselog1" type instead of "sselog".
22327 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
22328 "sselog". Remove explicit "memory" attribute.
22329 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
22330 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
22332 (vec_extract_hi_v32hi): Merge all alternatives into one, use
22333 "sselog1" type instead of "sselog". Remove explicit "memory"
22335 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
22336 use "sselog1" type instead of "sselog". Remove explicit "memory"
22338 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
22339 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
22341 (vec_extract_hi_v64qi): Merge all alternatives into one, use
22342 "sselog1" type instead of "sselog". Remove explicit "memory"
22344 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
22345 use "sselog1" type instead of "sselog". Remove explicit "memory"
22349 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
22351 PR middle-end/85414
22352 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
22355 2018-04-17 Martin Jambor <mjambor@suse.cz>
22358 * ipa-cp.c (create_specialized_node): Call
22359 expand_all_artificial_thunks if necessary.
22361 2018-04-17 Martin Liska <mliska@suse.cz>
22364 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
22365 in message, remote space in between '_G' and '('.
22367 2018-04-17 Jakub Jelinek <jakub@redhat.com>
22370 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
22371 avx512f_vmcmp<mode>3<round_saeonly_name>,
22372 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
22373 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
22374 avx512f_rndscale<mode><round_saeonly_name>,
22375 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
22376 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
22377 Use %<iptr>2 instead of %2 for -masm=intel.
22378 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
22379 avx512f_vcvttss2usi<round_saeonly_name>,
22380 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
22382 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
22383 avx512f_vcvttsd2usi<round_saeonly_name>,
22384 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
22385 Use %q1 instead of %1 for -masm=intel.
22386 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
22387 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
22388 of %3 for -masm=intel.
22389 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
22391 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
22393 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
22395 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
22396 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
22398 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
22400 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
22401 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
22402 %g1 and one with %0 and %1.
22403 (avx512er_vmrcp28<mode><round_saeonly_name>,
22404 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
22405 %1 for -masm=intel.
22406 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
22407 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
22408 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
22409 of %0 and %{%4%} for -masm=intel.
22410 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
22411 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
22412 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
22413 order of %0 and %{%5%}%{z%} for -masm=intel.
22415 2018-04-17 Jan Hubicka <jh@suse.cz>
22418 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
22420 2018-04-17 Martin Liska <mliska@suse.cz>
22423 * multiple_target.c (create_dispatcher_calls): Set apostrophes
22424 for target_clone error message. Make default implementation
22425 clone to be a local declaration.
22426 (separate_attrs): Add new argument and check for an empty
22428 (expand_target_clones): Handle it.
22429 (ipa_target_clone): Make redirection just for target_clones
22432 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
22433 Tom de Vries <tom@codesourcery.com>
22435 PR middle-end/84955
22436 * omp-expand.c (expand_oacc_for): Add dummy false branch for
22437 tiled basic blocks without omp continue statements.
22439 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
22442 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
22443 vec_extract expression as having side effects to make sure it gets
22446 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
22449 * config/i386/i386.c (get_builtin_code_for_version): Check
22452 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
22455 * config.gcc: Support "skylake".
22456 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
22458 * config/i386/i386.c (m_SKYLAKE): Define.
22459 (processor_target_table): Add "skylake".
22460 (ix86_option_override_internal): Add "skylake".
22461 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
22462 PROCESSOR_CANNONLAKE.
22463 (get_builtin_code_for_version): Fix priority for
22464 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
22465 PROCESSOR_SKYLAKE-AVX512.
22466 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
22467 (processor_type): Add PROCESSOR_SKYLAKE.
22469 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
22470 Jason Merrill <jason@redhat.com>
22473 * convert.c (convert_to_integer_1): Use direct recursion for
22474 enumeral types and types with a precision less than the number
22475 of bits in their mode.
22477 2018-04-16 Julia Koval <julia.koval@intel.com>
22480 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
22481 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
22483 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
22486 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
22487 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
22488 and -mno-direct-move.
22490 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
22493 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
22494 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
22495 Ensure negative shifts result in {0}.
22497 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
22499 PR rtl-optimization/79916
22500 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
22501 regs (if any) to define how to gnerate SD moves when LRA is in
22504 2018-04-13 Jakub Jelinek <jakub@redhat.com>
22506 PR rtl-optimization/85393
22507 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
22508 * except.c (expand_dw2_landing_pad_for_region): Make static.
22509 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
22510 a label and unconditional jump to old_bb, rather than
22511 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
22514 PR rtl-optimization/85376
22515 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
22516 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
22517 instead of a specific value.
22519 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
22520 Bin Cheng <bin.cheng@arm.com>
22522 PR tree-optimization/82965
22523 PR tree-optimization/83991
22524 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
22525 by_profile_only parameter.
22526 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
22527 information if the loop was predicted to iterate too many times.
22528 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
22530 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
22533 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
22536 2018-04-13 Martin Liska <mliska@suse.cz>
22537 Jakub Jelinek <jakub@redhat.com>
22539 PR middle-end/81657
22540 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
22541 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
22542 * builtins.c (expand_builtin_memory_copy_args): Use
22543 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
22544 handle dest_addr == pc_rtx.
22546 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
22549 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
22550 asked to not generate direct moves.
22551 (fix_trunc<mode>si2_stfiwx): Similar.
22552 (fix_trunc<mode>si2_internal): Similar.
22554 2018-04-12 Jakub Jelinek <jakub@redhat.com>
22557 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
22558 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
22559 lookup if dest in some wider mode is known to be const0_rtx and
22560 if so, record permanent equivalence for it to be ZERO_EXTEND of
22561 the narrower mode destination.
22563 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
22565 * lto-streamer-out.c (output_function): Revert 259346.
22566 * omp-expand.c (expand_oacc_for): Likewise.
22568 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
22570 PR rtl-optimization/85354
22571 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
22572 * sel-sched.c (sel_global_init): ... here.
22574 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
22577 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
22578 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
22579 mode for PE-COFF targets.
22580 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
22581 (i386_pe_asm_lto_end): Likewise.
22582 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
22583 (TARGET_ASM_LTO_END): Likewise.
22584 * config/i386/winnt.c (saved_debug_info_level): New static variable.
22585 (i386_pe_asm_lto_start): New function.
22586 (i386_pe_asm_lto_end): Likewise.
22588 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
22589 Richard Biener <rguenther@suse.de>
22591 PR middle-end/84955
22592 * lto-streamer-out.c (output_function): Fix CFG loop state before
22594 * omp-expand.c (expand_oacc_for): Handle calls to internal
22595 functions like regular functions.
22597 2018-04-12 Richard Biener <rguenther@suse.de>
22600 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
22601 for the early LTO debug to properly generate references to it
22602 during DIE emission. Do not re-use that for the skeleton for
22604 (dwarf2out_early_finish): Likewise.
22606 2018-04-12 Jakub Jelinek <jakub@redhat.com>
22609 * config/i386/sse.md
22610 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
22611 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
22612 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
22613 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
22614 and output is a reg, avoid creating invalid lowpart subreg, but
22615 instead split into a 512-bit move. Don't split if not AVX512VL,
22616 input is xmm16+ reg and output is a mem.
22617 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
22618 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
22619 xmm16+ reg and output is a mem.
22621 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
22623 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
22624 also for flag_dwarf2_cfi_asm.
22626 2018-04-12 Jakub Jelinek <jakub@redhat.com>
22628 PR rtl-optimization/85342
22629 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
22630 a bool scalar var inside of the loop instead. Don't try to update
22631 recog_data.operand after failed apply_change_group.
22633 2018-04-12 Tom de Vries <tom@codesourcery.com>
22636 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
22637 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
22638 array with flexible array member as array without given dimension.
22639 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
22640 argument for undefined param to true.
22642 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
22645 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
22646 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
22647 from PowerPC section.
22648 * config/rs6000/sysv4.opt (mcall-): Improve help text.
22649 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
22650 help text that is too long.
22651 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
22652 help text that is too long.
22653 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
22654 help text that is too long.
22656 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
22658 * config/alpha/alpha.md (stack_probe_internal): Rename
22659 from "probe_stack". Update all callers.
22661 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
22663 PR rtl-optimization/84566
22664 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
22665 sched_macro_fuse_insns.
22667 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
22670 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
22671 (compute_block_dependences): ... from here.
22673 2018-04-11 Jakub Jelinek <jakub@redhat.com>
22675 PR tree-optimization/85331
22676 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
22677 from int to HOST_WIDE_INT.
22679 2018-04-11 Martin Jambor <mjambor@suse.cz>
22682 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
22683 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
22684 not the same as the source val.
22685 (cgraph_edge_brings_value_p): New parameter.
22686 (gather_edges_for_value): Pass destination value to
22687 cgraph_edge_brings_value_p.
22688 (perhaps_add_new_callers): Likewise.
22689 (get_info_about_necessary_edges): Likewise and exclude values brought
22690 only by self-recursive edges.
22691 (create_specialized_node): Redirect only clones of self-calling edges.
22692 (+self_recursive_pass_through_p): New function.
22693 (find_more_scalar_values_for_callers_subset): Use it.
22694 (find_aggregate_values_for_callers_subset): Likewise.
22695 (known_aggs_to_agg_replacement_list): Removed.
22696 (decide_whether_version_node): Re-calculate known constants for all
22697 remaining context clones.
22699 2018-04-11 Richard Biener <rguenther@suse.de>
22702 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
22703 from early DWARF output.
22704 (dwarf2out_early_finish): Output line info unconditionally into
22705 early DWARF and add reference to it.
22707 2018-04-11 Jakub Jelinek <jakub@redhat.com>
22710 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
22711 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
22712 other than V2DFmode using iptr mode attribute.
22713 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
22715 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
22717 PR rtl-optimization/84659
22718 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
22720 2018-04-11 Jakub Jelinek <jakub@redhat.com>
22723 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
22725 (output_loc_list): Pass address of a dummy size variable even in the
22726 locview handling loop.
22727 (index_location_lists): Add comment on why skip_loc_list_entry can't
22730 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
22733 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
22736 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
22739 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
22740 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
22741 and -mstring-compare-inline-limit.
22743 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
22746 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
22747 for stack clash protection in a register whenever we need it to be in
22750 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
22752 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
22753 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
22755 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
22758 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
22760 (mlong-double-): Ditto.
22761 * config/rs6000/sysv4.opt (msdata=): Ditto.
22762 (mtls-size=): Ditto.
22764 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
22766 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
22767 erroneous entries for
22768 "vector int vec_ldl (int, long int *)", and
22769 "vector unsigned int vec_ldl (int, unsigned long int *)".
22770 Add comments and entries for
22771 "vector bool char vec_ldl (int, bool char *)",
22772 "vector bool short vec_ldl (int, bool short *)",
22773 "vector bool int vec_ldl (int, bool int *)",
22774 "vector bool long long vec_ldl (int, bool long long *)",
22775 "vector pixel vec_ldl (int, pixel *)",
22776 "vector long long vec_ldl (int, long long *)",
22777 "vector unsigned long long vec_ldl (int, unsigned long long *)".
22778 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
22779 type tree bool_long_long_type_node and correct definition of
22780 bool_V2DI_type_node to make reference to this new type tree.
22781 (rs6000_mangle_type): Replace erroneous reference to
22782 bool_long_type_node with bool_long_long_type_node.
22783 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
22784 comments to emphasize sign distinctions for char and int types and
22785 replace RS6000_BTI_bool_long constant with
22786 RS6000_BTI_bool_long_long constant. Also add comment to restrict
22787 use of RS6000_BTI_pixel.
22788 (bool_long_type_node): Remove this macro definition.
22789 (bool_long_long_type_node): New macro definition
22791 2018-04-10 Jakub Jelinek <jakub@redhat.com>
22793 PR rtl-optimization/85300
22794 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
22795 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
22796 simplify_unary_operation fails.
22798 2018-04-10 Martin Liska <mliska@suse.cz>
22800 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
22801 cgraph_edge and ipa_ref.
22803 2018-04-10 Jakub Jelinek <jakub@redhat.com>
22807 * config/i386/sse.md
22808 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
22809 computation of the VEC_MERGE selector from mask.
22810 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
22811 Fix decoding of the VEC_MERGE selector into mask.
22813 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
22815 PR tree-optimization/85286
22816 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
22818 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
22820 * final.c (final_1): Set insn_last_address as well as
22821 insn_current_address.
22823 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22826 * explow.c (emit_stack_probe): Call validize_mem on memory location
22827 before passing it to gen_probe_stack. Create address operand and
22828 legitimize it for the probe_stack_address case.
22830 2018-04-09 Jan Hubicka <jh@suse.cz>
22833 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
22834 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
22835 * tree.c (free_lang_data_in_type): Fix handling of binfos;
22837 (free_lang_data): Rebuild type inheritance graph.
22839 2018-04-09 Martin Sebor <msebor@redhat.com>
22841 * invoke.texi (-finline-small-functions): Mention other optimization
22843 (-findirect-inlining, -fpartial-inlining): Same.
22844 (-finline-functions-called-once): Same.
22845 (-freorder-blocks-and-partition): Same.
22847 2018-04-09 Jan Hubicka <jh@suse.cz>
22850 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
22851 jumps; choose last target that matches the criteria (i.e.
22852 no partition changes for non-crossing jumps).
22853 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
22854 support for redirecting crossing jumps to non-crossing.
22856 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
22858 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
22859 also for naked functions.
22861 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
22863 * config/arc/arc.md (add_shift): New pattern.
22864 (add_shift2): Likewise.
22865 (sub_shift): Likewise.
22866 (sub_shift_cmp0_noout): Likewise.
22867 (compare_si_ashiftsi): Likewise.
22868 (xbfu_cmp0_noout): New combine pattern.
22869 (xbfu_cmp0"): Likewise.
22870 (movsi_set_cc_insn): Place the predicable variant first.
22871 (commutative_binary_cmp0_noout): Remove clobber.
22872 (commutative_binary_cmp0): New pattern.
22873 (noncommutative_binary_cmp0): Likewise.
22874 (noncommutative_binary_cmp0_noout): Likewise.
22875 (noncommutative_binary_comparison_result_used): Removed.
22876 (rsub_cmp0): New pattern.
22877 (rsub_cmp0_noout): Likewise.
22878 (extzvsi): Changed, keep only meaningful variants.
22879 (SQH, SEZ): New iterators.
22880 (SQH_postfix): New mode attribute.
22881 (SEZ_prefix): New code attribute.
22882 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
22883 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
22884 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
22885 of numerical value.
22886 (noncommutative_operator): Check the availability of barrel
22889 2018-04-09 Richard Biener <rguenther@suse.de>
22891 PR tree-optimization/85284
22892 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
22893 Only use the niter constraining form of simple_iv when the exit
22894 is always executed.
22896 2018-04-09 Tom de Vries <tom@codesourcery.com>
22899 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
22900 (define_expand "*memory_barrier"): New define_expand.
22901 (define_insn "memory_barrier"): New insn.
22903 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
22905 PR rtl-optimization/80463
22906 PR rtl-optimization/83972
22907 PR rtl-optimization/83480
22909 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
22910 correct producer for the insn.
22911 (tidy_control_flow): Fixup seqnos in case of debug insns.
22913 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
22915 PR rtl-optimization/83913
22917 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
22918 different sched-times when merging exprs.
22920 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
22922 PR rtl-optimization/83962
22924 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
22925 tidy_fallthru_edge and tidy_control_flow.
22927 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
22929 PR rtl-optimization/83530
22931 * sel-sched.c (force_next_insn): New global variable.
22932 (remove_insn_for_debug): When force_next_insn is true, also leave only
22933 next insn in the ready list.
22934 (sel_sched_region): When the region wasn't scheduled, make another pass
22935 over it with force_next_insn set to 1.
22937 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
22939 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
22941 * config/nds32/constants.md (unspec_volatile_element): Add enum values
22942 for interrupt control.
22943 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
22944 functions for interrupt control.
22945 * config/nds32/nds32-intrinsic.md: Likewise.
22946 * config/nds32/nds32_intrinsic.h: Likewise.
22947 * config/nds32/nds32.h (nds32_builtins): Likewise.
22949 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
22951 * config/nds32/nds32.c (nds32_init_machine_status,
22952 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
22953 strict_aligned_p field.
22954 (nds32_expand_to_rtl_hook): New function.
22955 (TARGET_EXPAND_TO_RTL_HOOK): Define.
22956 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
22958 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
22959 Chung-Ju Wu <jasonwucj@gmail.com>
22961 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
22962 * config/nds32/nds32-n7.md: New file.
22963 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
22964 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
22966 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
22967 * config/nds32/nds32.md (pipeline_model): Add n7.
22968 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
22969 * config/nds32/pipelines.md: Include n7 settings.
22971 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
22972 Chung-Ju Wu <jasonwucj@gmail.com>
22974 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
22975 * config/nds32/nds32-e8.md: New file.
22976 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
22977 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
22979 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
22980 * config/nds32/nds32.md (pipeline_model): Add e8.
22981 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
22982 * config/nds32/pipelines.md: Include e8 settings.
22984 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
22985 Chung-Ju Wu <jasonwucj@gmail.com>
22987 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
22988 * config/nds32/nds32-n8.md: New file.
22989 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
22990 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
22992 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
22993 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
22994 * config/nds32/nds32.md (pipeline_model): Add n8.
22995 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
22996 * config/nds32/pipelines.md: Include n8 settings.
22998 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
22999 Chung-Ju Wu <jasonwucj@gmail.com>
23001 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
23002 * config/nds32/nds32-n9-2r1w.md: New file.
23003 * config/nds32/nds32-n9-3r2w.md: New file.
23004 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
23005 nds32_register_ports): New or modify for cpu n9.
23006 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
23008 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
23009 * config/nds32/nds32-utils.c: New file.
23010 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
23011 TARGET_MUL_SLOW): Define.
23012 * config/nds32/nds32.md (pipeline_model): New attribute.
23013 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
23014 New options that support cpu n9.
23015 * config/nds32/pipelines.md: Include n9 settings.
23016 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
23018 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
23020 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
23021 information if necessary.
23022 (output_cond_branch_compare_zero): Likewise.
23023 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
23024 (nds32_target_alignment): Refine for alignment.
23025 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
23026 (FUNCTION_BOUNDARY): Modify.
23027 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
23029 * config/nds32/nds32.opt (malways-align, malign-functions): New.
23031 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
23033 * config/nds32/constants.md (unspec_volatile_element): Add values for
23034 TLB operation and data prefetch.
23035 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
23036 functions for TLB operation and data prefetch.
23037 * config/nds32/nds32-intrinsic.md: Likewise.
23038 * config/nds32/nds32_intrinsic.h: Likewise.
23039 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
23040 (nds32_print_operand): Likewise.
23041 * config/nds32/nds32.h (nds32_builtins): Likewise.
23043 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
23044 Andrew Pinski <pinsika@gcc.gnu.org>
23046 PR middle-end/82976
23047 * match.pd: Use constant_boolean_node of correct type instead of
23048 boolean_true_node or boolean_false_node for simplifying
23049 pointer comparisons to zero.
23051 2018-04-07 Jakub Jelinek <jakub@redhat.com>
23053 PR tree-optimization/80021
23054 * tree.c (verify_type_variant): Make error call in verify_variant_match
23055 translatable and remove final full stop.
23057 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
23059 * config/nds32/constants.md (unspec_volatile_element): Add
23060 UNSPEC_VOLATILE_EH_RETURN.
23061 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
23062 nds32_output_stack_pop): Support dwarf exception handling process.
23063 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
23064 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
23065 exception handling process.
23066 (nds32_compute_stack_frame): Likewise.
23067 (nds32_return_addr_rtx): Likewise.
23068 (nds32_initial_elimination_offset): Likewise.
23069 (nds32_expand_prologue): Likewise.
23070 (nds32_expand_epilogue): Likewise.
23071 (nds32_dynamic_chain_address): New function.
23072 * config/nds32/nds32.h (machine_function): Add fields for dwarf
23073 exception handling.
23074 (DYNAMIC_CHAIN_ADDRESS): Define.
23075 (EH_RETURN_DATA_REGNO): Define.
23076 (EH_RETURN_STACKADJ_RTX): Define.
23077 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
23078 patterns for dwarf exception handling.
23080 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
23082 * config/nds32/nds32.h: Clean up obsolete macros.
23084 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
23086 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
23087 Add enum values for particular instructions.
23088 * config/nds32/nds32-intrinsic.c: Implementation of expanding
23089 particular intrinsic functions.
23090 * config/nds32/nds32-intrinsic.md: Likewise.
23091 * config/nds32/nds32_intrinsic.h: Likewise.
23092 * config/nds32/nds32.h (nds32_builtins): Likewise.
23093 * config/nds32/nds32.md (type): Add pbsad and pbsada.
23094 (btst, ave): New patterns for particular instructions.
23096 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
23098 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
23099 Add enum values for atomic load/store and memory sync.
23100 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
23102 * config/nds32/nds32-intrinsic.md: Likewise.
23103 * config/nds32/nds32_intrinsic.h: Likewise.
23104 * config/nds32/nds32.h (nds32_builtins): Likewise.
23106 2018-04-07 Jakub Jelinek <jakub@redhat.com>
23108 PR tree-optimization/85257
23109 * fold-const.c (native_encode_vector): If not all elts could fit
23110 and off is -1, return 0 rather than offset.
23111 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
23112 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
23113 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
23114 adjust buffer in native_interpret_expr call.
23116 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
23118 * config/nds32/constants.md (unspec_volatile_element): Add cache
23119 control enum values.
23120 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
23121 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
23122 * config/nds32/nds32.c (nds32_cctl_names): New.
23123 (nds32_print_operand): Handle cache control register names.
23124 * config/nds32/nds32.h (nds32_builtins): New enum values.
23125 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
23127 * config/nds32/nds32.md (type): Add mmu.
23128 * config/nds32/pipelines.md (simple_insn): Add mmu.
23130 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
23132 * config/nds32/nds32.md (type): Remove call.
23133 * config/nds32/pipelines.md (simple_insn): Likewise.
23135 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
23137 * config/nds32/constants.md (unspec_volatile_element): Add
23138 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
23139 UNSPEC_VOLATILE_FMFCFG.
23140 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
23141 description for fmfcfg and fmfcsr.
23142 (bdesc_1arg): Add fmtcsr.
23143 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
23144 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
23145 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
23146 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
23147 unspec_fmfcfg): New patterns.
23148 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
23149 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
23150 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
23151 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
23152 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
23153 __nds32__fmfcfg): Define.
23155 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
23157 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
23158 intrinsic register names.
23159 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
23160 intrinsic register enum values and macros.
23162 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
23164 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
23165 for load/store addressing form.
23166 (nds32_print_operand_address): Likewise.
23168 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
23171 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
23172 based on LABEL_REF. Remove useless assertion.
23173 (pic_address_needs_scratch): Fix formatting.
23174 (sparc_legitimize_pic_address): Minor tweaks.
23175 (sparc_delegitimize_address): Adjust assertion accordingly.
23176 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
23177 into symbolic_operand.
23178 (movsi_high_pic_label_ref): Likewise.
23179 (movsi_lo_sum_pic_label_ref): Likewise.
23180 (movdi_pic_label_ref): Likewise.
23181 (movdi_high_pic_label_ref): Likewise.
23182 (movdi_lo_sum_pic_label_ref): Likewise.
23184 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
23186 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
23187 custom LIB_SPEC setup.
23189 2018-04-06 Ruslan Bukin <br@bsdpad.com>
23190 Kito Cheng <kito.cheng@gmail.com>
23192 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
23193 * config/riscv/freebsd.h: New.
23195 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
23197 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
23198 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
23201 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
23202 Kito Cheng <kito.cheng@gmail.com>
23204 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
23205 nds32_output_call, nds32_symbol_binds_local_p): New functions.
23206 * config/nds32/nds32-protos.h (nds32_output_call,
23207 nds32_output_return): Declare.
23208 * config/nds32/nds32.md: Refine all the call and return patterns.
23210 2018-04-06 Jakub Jelinek <jakub@redhat.com>
23213 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
23214 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
23216 PR rtl-optimization/84872
23217 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
23218 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
23219 EDGE_CROSSING edge.
23221 2018-04-06 Tamar Christina <tamar.christina@arm.com>
23223 * expr.c (copy_blkmode_to_reg): Revert 254862.
23224 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
23226 2018-04-06 Richard Biener <rguenther@suse.de>
23228 PR middle-end/85244
23229 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
23230 after seeing a component reference with an adjacent field. Treat
23231 refs to arrays at struct end of external decls similar to
23232 refs to unconstrained commons.
23234 2018-04-06 Jakub Jelinek <jakub@redhat.com>
23237 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
23238 look through SAVE_EXPRs with non-side-effects argument. Adjust
23240 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
23243 2018-04-06 Richard Biener <rguenther@suse.de>
23245 PR middle-end/85180
23246 * alias.c (find_base_term): New wrapper around find_base_term
23247 unwinding CSELIB_VAL_PTR changes.
23248 (find_base_term): Do not restore CSELIB_VAL_PTR during the
23251 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
23253 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
23255 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
23256 constant definitions.
23257 ("nop"): lr 0,0 -> nopr r0
23258 ("nop_lr0", "nop_lr1"): New insn definitions.
23260 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
23262 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
23263 NDS32_V3PUSH_AVAILABLE_P macro.
23265 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
23266 Chung-Ju Wu <jasonwucj@gmail.com>
23268 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
23269 (nds32*-*-*): Add float and fpu_config into supported_defaults.
23270 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
23271 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
23272 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
23273 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
23274 * config/nds32/constraints.md: New constraints and checking for hard
23275 float configuration.
23276 * config/nds32/iterators.md: New mode iterator and attribute for hard
23277 float configuration.
23278 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
23280 * config/nds32/nds32-fpu.md: New file.
23281 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
23282 deal with hard float code generation.
23283 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
23285 (abi_type, float_reg_number): New enum type.
23286 * config/nds32/nds32-predicates.c: New predicates for hard float.
23287 * config/nds32/nds32-protos.h: Declare functions for hard float.
23288 * config/nds32/nds32.c: Implementation for hard float configuration.
23289 * config/nds32/nds32.h: Definitions for hard float configuration.
23290 * config/nds32/nds32.md: Include hard float machine description and
23291 modify patterns for hard float configuration.
23292 * config/nds32/nds32.opt: New options for hard float configuration.
23293 * config/nds32/predicates.md: New predicates for hard float
23296 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
23298 * common/config/nds32/nds32-common.c
23299 (nds32_option_optimization_table): Enable -mreleax-hint by default.
23301 2018-04-05 Jakub Jelinek <jakub@redhat.com>
23303 PR middle-end/85195
23304 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
23305 CONSTRUCTOR_ELT (ctor, ...)->value.
23307 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
23310 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
23312 2018-04-05 Tom de Vries <tom@codesourcery.com>
23315 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
23318 2018-04-05 Shiva Chen <shiva0217@gmail.com>
23319 Kito Cheng <kito.cheng@gmail.com>
23321 * config/nds32/constraints.md (U33): Fine-tune checking condition.
23322 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
23323 * config/nds32/nds32.h (nds32_16bit_address_type): Add
23324 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
23326 2018-04-05 Shiva Chen <shiva0217@gmail.com>
23327 Kito Cheng <kito.cheng@gmail.com>
23329 * config/nds32/constraints.md (Ufe): New memory constraint.
23330 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
23331 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
23332 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
23334 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
23335 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
23337 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
23339 * config/nds32/nds32.md: Use optimize_size in the condition for
23340 alu-shift instructions.
23342 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
23344 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
23346 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
23348 * config/nds32/nds32.md (negsi2): Refine pattern.
23350 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
23351 Chung-Ju Wu <jasonwucj@gmail.com>
23353 * config/nds32/iterators.md (shift_rotate): New code iterator.
23354 (shift): New code attribute.
23355 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
23356 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
23357 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
23358 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
23359 bit-wise operations.
23360 (andsi3, *andsi3): Ditto.
23361 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
23362 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
23363 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
23364 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
23365 nds32_ior_operand, nds32_xor_operand): New predicates.
23367 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
23369 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
23370 (addsi3, subsi3): ... this.
23372 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
23374 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
23376 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
23378 * config/nds32/nds32.md: Adjust indention.
23380 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
23382 * config/nds32/nds32.md (feature): New attribute.
23384 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
23386 * config/nds32/nds32.md (subtype): New attribute.
23388 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
23391 * config/arm/arm-builtins.c (arm_expand_builtin): Change
23392 expansion to perform a bitwise AND of the argument followed by a
23393 boolean negation of the result.
23395 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
23397 PR rtl-optimization/84878
23398 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
23399 the basic block. Assert the use reference is not artificial and that
23400 it has an associated insn.
23402 2018-04-04 Michael Matz <matz@suse.de>
23404 * builtins.c (compute_objsize): Pass correct operand
23405 to array_at_struct_end_p.
23407 2018-04-04 Richard Biener <rguenther@suse.de>
23410 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
23411 from contexts for DINFO_LEVEL_TERSE and below.
23413 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
23415 * config/nds32/nds32-doubleword.md (move_<mode>): Require
23416 resiter_operand condition.
23417 * config/nds32/nds32.md (*move<mode>): Ditto.
23419 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
23420 Monk Chiang <sh.chiang04@gmail.com>
23422 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
23424 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
23426 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
23428 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
23429 Kito Cheng <kito.cheng@gmail.com>
23431 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
23432 nds32_cond_code_str, output_cond_branch,
23433 output_cond_branch_compare_zero, nds32_expand_cbranch,
23434 nds32_expand_cstore, nds32_expand_movcc,
23435 nds32_output_cbranchsi4_equality_zero,
23436 nds32_output_cbranchsi4_equality_reg,
23437 nds32_output_cbranchsi4_equality_reg_or_const_int,
23438 nds32_output_cbranchsi4_greater_less_zero: New functions.
23439 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
23440 nds32_expand_cstore, nds32_expand_movcc,
23441 nds32_output_cbranchsi4_equality_zero,
23442 nds32_output_cbranchsi4_equality_reg,
23443 nds32_output_cbranchsi4_equality_reg_or_const_int,
23444 nds32_output_cbranchsi4_greater_less_zero): Declare.
23445 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
23446 nds32_rimm11s_operand): New predicates.
23447 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
23448 * config/nds32/nds32.md: Rewrite all the branch and conditional move
23451 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
23453 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
23454 * config/nds32/nds32.md: Ditto.
23455 * config/nds32/pipelines.md: Ditto.
23457 2018-04-04 Richard Biener <rguenther@suse.de>
23459 PR tree-optimization/85168
23460 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
23461 propagating abnormals.
23463 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
23465 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
23467 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
23468 Kito Cheng <kito.cheng@gmail.com>
23470 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
23471 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
23472 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
23473 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
23474 * config/nds32/nds32.md (sibcall_internal): New.
23475 (sibcall_register): Remove.
23476 (sibcall_immediate): Remove.
23477 (sibcall_value_internal): New.
23478 (sibcall_value_register): Remove.
23479 (sibcall_value_immediate): Remove.
23480 * config/nds32/predicates.md (nds32_general_register_operand): New.
23481 (nds32_call_address_operand): New.
23483 2018-04-03 Jakub Jelinek <jakub@redhat.com>
23485 PR rtl-optimization/85167
23486 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
23487 bb_defs if *split_p, instead preinitialize it to NULL.
23489 PR tree-optimization/85156
23490 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
23491 evaluating the argument multiple times.
23493 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
23495 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
23497 (_mm_cvtpd_ps): Likewise.
23498 (_mm_cvttpd_epi32): Likewise.
23499 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
23500 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
23501 vector, pixel, and bool following altivec.h include.
23503 2018-04-03 Martin Sebor <msebor@redhat.com>
23505 * doc/extend.texi (Common Function Attributes): Clarify.
23506 (const attribute): Likewise.
23507 (pure attribute): Likewise.
23509 2018-04-03 Jakub Jelinek <jakub@redhat.com>
23512 * config/i386/i386.c (ix86_expand_vector_set): Use
23513 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
23515 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
23517 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
23518 instructions when changing rounding bits to preserve precision bits
23519 in the x87 control word.
23521 2018-04-03 Martin Liska <mliska@suse.cz>
23523 PR tree-optimization/82491
23524 * rtl.h (strip_offset_and_add): Replace += suboffset with
23525 poly_uint64 () + suboffset.
23527 2018-03-29 Martin Liska <mliska@suse.cz>
23528 Martin Jambor <mjambor@suse.cz>
23531 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
23532 param_type is not an integral or pointer type.
23534 2018-04-03 Richard Biener <rguenther@suse.de>
23536 * sese.h (recompute_all_dominators): Remove.
23538 2018-04-02 Martin Sebor <msebor@redhat.com>
23540 * doc/invoke.texi (-Wrestrict): Fix typos.
23542 2018-04-02 Jim Wilson <jimw@sifive.com>
23544 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
23545 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
23546 (<optab>di3, <optab>si3_extend): Likewise.
23547 (<optab>si3_mask, <optab>si3_mask_1): New.
23548 (<optab>di3_mask, <optab>di3_mask_1): New.
23549 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
23550 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
23551 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
23553 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
23555 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
23558 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
23560 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
23561 (nds32_canonicalize_comparison): New function.
23563 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
23564 Kito Cheng <kito.cheng@gmail.com>
23565 Kuan-Lin Chen <kuanlinchentw@gmail.com>
23567 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
23568 * config/nds32/constants.md (unspec_volatile_element): Add
23569 UNSPEC_VOLATILE_RELAX_GROUP.
23570 * config/nds32/nds32-relax-opt.c: New file.
23571 * config/nds32/nds32-predicates.c
23572 (nds32_symbol_load_store_p): New function.
23573 * config/nds32/nds32-protos.h
23574 (nds32_symbol_load_store_p): Declare function.
23575 (make_pass_nds32_relax_opt): Declare new rtl pass function.
23576 * config/nds32/nds32.c
23577 (nds32_register_pass): New function to register pass.
23578 (nds32_register_passes): New function to register passes.
23579 * config/nds32/nds32.md (relax_group): New pattern.
23580 * config/nds32/nds32.opt (mrelax-hint): New option.
23581 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
23583 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
23585 * config/nds32/t-nds32: Modify files dependency.
23587 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
23589 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
23590 (PROFILE_HOOK): Define its implementation.
23592 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
23594 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
23595 type and 32-bit size.
23597 2018-04-01 Jakub Jelinek <jakub@redhat.com>
23599 PR middle-end/85090
23600 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
23601 (V_128_256): New mode iterator.
23602 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
23603 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
23604 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
23606 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
23607 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
23609 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
23612 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
23613 NaN inputs correctly.
23615 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
23618 * config/rs6000/vsx.md (??r): New mode attribute.
23619 (*vsx_mov<mode>_64bit): Use it.
23620 (*vsx_mov<mode>_32bit): Likewise.
23622 2018-03-30 Martin Sebor <msebor@redhat.com>
23624 PR tree-optimization/84818
23625 * builtins.c (check_access): Use warning_n.
23627 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
23630 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
23632 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
23635 2018-03-30 Julia Koval <julia.koval@intel.com>
23638 * x86-tune.def (movx, partial_reg_dependency): Enable for
23641 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
23643 PR inline-asm/84985
23644 * lra-constraints.c (process_alt_operands): Move setting
23645 this_alternative_matches below.
23647 2018-03-29 Martin Liska <mliska@suse.cz>
23650 * doc/invoke.texi: Document how LTO works with debug info.
23651 Describe auto-load support of binutils. Mention 'x86-64'
23652 as valid option value of -march option.
23654 2018-03-29 Jakub Jelinek <jakub@redhat.com>
23656 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
23659 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
23660 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
23661 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
23664 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
23667 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
23668 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
23669 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
23670 for RS6000_BTM_POWERPC64.
23671 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
23672 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
23673 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
23676 (DIVDEU): Likewise.
23678 2018-03-28 Carl Love <cel@us.ibm.com>
23681 2017-09-27 Carl Love <cel@us.ibm.com>
23683 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
23684 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
23685 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
23688 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
23690 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
23691 instead of __vector bool.
23692 (_mm_max_pu8): Likewise.
23693 (_mm_min_pi16): Likewise.
23695 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
23698 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
23699 (DIVWEUO): Likewise.
23700 (DIVDEO): Likewise.
23701 (DIVDEUO): Likewise.
23702 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
23703 DIVWEUO and DIVDEUO.
23704 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
23705 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
23706 (div_extend): Likewise.
23707 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
23709 (__builtin_divweuo): Likewise.
23710 (__builtin_divdeo): Likewise.
23711 (__builtin_divdeuo): Likewise.
23713 2018-03-28 Jakub Jelinek <jakub@redhat.com>
23716 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
23717 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
23719 PR tree-optimization/82004
23720 * gimple-match-head.c (optimize_pow_to_exp): New function.
23721 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
23722 Don't fold to exp if optimize_pow_to_exp is false.
23724 2018-03-28 Martin Liska <mliska@suse.cz>
23727 * calls.c (initialize_argument_information): Fix trailing space.
23728 * common.opt: Fix typo and provide better explanation for
23729 -fsanitize-coverage option.
23730 * config/i386/i386.opt: Fix typo.
23732 2018-03-28 Jakub Jelinek <jakub@redhat.com>
23733 Martin Liska <mliska@suse.cz>
23736 * gimplify.c (asan_poison_variable): Don't do the check for
23737 gimplify_omp_ctxp here.
23738 (gimplify_decl_expr): Do it here.
23739 (gimplify_target_expr): Likewise.
23741 2018-03-28 Martin Liska <mliska@suse.cz>
23744 * config/i386/i386.c (ix86_function_arg_advance): Do not call
23745 chkp_type_bounds_count if MPX is not enabled.
23747 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
23749 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
23751 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
23754 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
23755 function to create the function decl for complex long double
23756 multiply and divide for -mabi=ieeelongdouble.
23757 (init_float128_ieee): Call it.
23759 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
23762 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
23763 -fcf-protection=branch -mibt.
23764 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
23766 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
23769 * config/arm/arm.c (arm_valid_symbolic_address): Handle
23770 arm_word_relocations.
23772 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
23775 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
23776 extern array declarations.
23778 2018-03-27 Richard Biener <rguenther@suse.de>
23780 PR middle-end/84067
23781 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
23782 explicit single_use checks.
23784 2018-03-27 Richard Biener <rguenther@suse.de>
23786 PR tree-optimization/85082
23787 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
23790 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
23792 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
23793 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
23794 Turn on fasynchronous-unwind-tables and funwind-tables.
23796 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
23799 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
23800 (*bmi_blsr_<mode>_ccz): Ditto.
23802 2018-03-26 Tom de Vries <tom@codesourcery.com>
23804 PR tree-optimization/85063
23805 * omp-general.c (offloading_function_p): New function. Factor out
23807 * omp-offload.c (pass_omp_target_link::gate): ... here.
23808 * omp-general.h (offloading_function_p): Declare.
23809 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
23810 with attribute omp declare target for offloading functions.
23812 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
23814 PR tree-optimization/84005
23815 * tree-data-ref.h (get_base_for_alignment): Declare.
23816 * tree-data-ref.c (get_base_for_alignment_1): New function.
23817 (get_base_for_alignment): Likewise.
23818 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
23819 get_base_for_alignment to find a suitable base object, instead
23820 of always using drb->base_address.
23822 2018-03-23 Jakub Jelinek <jakub@redhat.com>
23824 PR inline-asm/85022
23825 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
23826 known size by default.
23828 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
23830 PR inline-asm/85030
23831 * lra-constraints.c (process_alt_operands): Don't match BLKmode
23832 and non BLKmode operands.
23834 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23837 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
23838 Clean up attributes.
23840 2018-03-23 Richard Biener <rguenther@suse.de>
23843 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
23844 we are going to emit early debug for LTO.
23846 2018-03-23 Jakub Jelinek <jakub@redhat.com>
23848 PR inline-asm/85034
23849 * function.c (match_asm_constraints_1): Don't optimize if input
23850 doesn't satisfy general_operand predicate for output's mode.
23852 PR inline-asm/85022
23853 * alias.c (write_dependence_p): Don't require for x_canonicalized
23854 non-VOIDmode if x has VOIDmode.
23857 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
23858 just don't try to optimize it rather than assert it never happens.
23860 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
23862 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
23863 macro expansions for definition of ST_INTERNAL_<mode> and
23864 LD_INTERNAL_<mode> builtins.
23865 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
23867 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
23869 (altivec_expand_st_builtin): Likewise.
23870 (altivec_expand_builtin): Remove calls to deleted functions.
23871 (rs6000_address_for_altivec): Delete this function.
23872 * config/rs6000/vector.md: Remove expands for
23873 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
23875 2018-03-22 Sudakshina Das <sudi.das@arm.com>
23878 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
23879 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
23880 re-computing once computed.
23881 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
23882 (arm_init_machine_status): Initialize
23883 machine->static_chain_stack_bytes.
23885 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
23888 * doc/extend.texi: Add four new prototypes for vec_ld.
23889 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
23890 definitions for more logical presentation.
23891 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
23892 entries for V1TI variants of __builtin_altivec_ld builtin.
23893 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
23894 handling of V1TI variant of LVX icode pattern.
23895 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
23896 (rs6000_gimple_fold_builtin): Likewise.
23897 (altivec_init_builtins): Add code to define
23898 __builtin_altivec_lvx_v1ti function.
23900 2018-03-22 Jakub Jelinek <jakub@redhat.com>
23902 PR inline-asm/84941
23903 * function.c (match_asm_constraints_1): Don't do the optimization
23904 if input isn't a REG, SUBREG, MEM or constant.
23906 2018-03-22 Tom de Vries <tom@codesourcery.com>
23908 PR tree-optimization/84956
23909 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
23910 bb_has_abnormal_pred.
23912 2018-03-22 Jakub Jelinek <jakub@redhat.com>
23915 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
23916 DECL_INITIAL (decl) to decl at the end.
23917 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
23918 adjust the comment.
23920 2018-03-21 Joseph Myers <joseph@codesourcery.com>
23922 * doc/extend.texi (__builtin_tgmath): Document when complex
23923 integer types are treated as _Complex _Float64.
23925 2018-03-21 Tom de Vries <tom@codesourcery.com>
23927 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
23929 2018-03-21 Jakub Jelinek <jakub@redhat.com>
23931 PR tree-optimization/84960
23932 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
23933 if it is ENTRY block, move them into single succ of ENTRY in that case.
23935 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
23937 PR tree-optimization/84811
23938 * poly-int.h (poly_span_traits): Remove the T3 parameter and
23939 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
23940 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
23941 (known_subrange_p): Update accordingly. Cast each value involved
23942 in the size comparison, rather than casting the result of the
23945 2018-03-21 Jakub Jelinek <jakub@redhat.com>
23947 PR tree-optimization/84982
23948 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
23949 by flipping the least significant bit rather than all bits from
23950 bitpos to bitpos + bitsize - 1.
23952 2018-03-21 Nathan Sidwell <nathan@acm.org>
23954 * doc/extend.texi (Deprecated Features): Remove mention of
23955 long-deleted deprecations.
23957 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
23960 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
23961 * configure: Regenerate.
23963 2018-03-21 Tom de Vries <tom@codesourcery.com>
23965 PR tree-optimization/83126
23966 * tree-parloops.c (num_phis): New function.
23967 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
23969 2018-03-21 Nathan Sidwell <nathan@acm.org>
23971 * doc/extend.texi (Deprecated Features): Update deprecated flags,
23972 mention anon-struct/union members and trailing attributes.
23974 2018-03-21 Bin Cheng <bin.cheng@arm.com>
23976 PR tree-optimization/84969
23977 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
23978 builtin memset partitions if they set different rhs values.
23980 2018-03-21 Jakub Jelinek <jakub@redhat.com>
23982 PR rtl-optimization/84989
23983 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
23984 VEC_DUPLICATE with scalar result mode.
23986 2018-03-21 Martin Liska <mliska@suse.cz>
23989 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
23990 not intended return statement.
23992 2018-03-21 Martin Liska <mliska@suse.cz>
23995 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
23996 (chkp_find_bound_slots_1): Limit number of iterations.
23998 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
24001 * Minor grammar fixes for x86 options.
24003 2018-03-20 Jakub Jelinek <jakub@redhat.com>
24006 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
24007 holding REG_CFA_RESTORE notes, instead turn them into a USE.
24009 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
24012 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
24013 (altivec_lvx_<mode>_1op): Likewise.
24014 (altivec_stvx_<mode>_2op): Likewise.
24015 (altivec_stvx_<mode>_1op): Likewise.
24016 (altivec_lvx_<VM2:mode>): New define_expand.
24017 (altivec_stvx_<VM2:mode>): Likewise.
24018 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
24019 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
24020 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
24021 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
24022 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
24023 (rs6000_gen_lvx): Likewise.
24024 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
24025 (altivec_expand_stv_builtin): Likewise.
24026 (altivec_expand_builtin): Likewise.
24027 * config/rs6000/vector.md: Likewise.
24029 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
24032 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
24035 2018-03-20 Richard Biener <rguenther@suse.de>
24038 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
24039 sign-conversions as zero, fall back to standard scalar_stmt
24042 2018-03-20 Martin Liska <mliska@suse.cz>
24045 * predict.c (rebuild_frequencies): Handle case when we have
24046 PROFILE_ABSENT, but flag_guess_branch_prob is false.
24048 2018-03-20 Jakub Jelinek <jakub@redhat.com>
24051 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
24052 flag_section_anchors.
24053 * varasm.c (use_blocks_for_decl_p): Remove hack for
24054 dw2_force_const_mem.
24057 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
24059 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
24060 be created, use lowpart_subreg of operands[0] rather than operands[0]
24062 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
24063 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
24064 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
24065 and n constraint instead of aarch64_shift_imm_di and Usd.
24066 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
24067 (*aarch64_<optab>_reg_minus<mode>3): ... this.
24069 2018-03-20 Sudakshina Das <sudi.das@arm.com>
24072 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
24073 to favor GPR over NEON registers.
24074 (<shift>di3_neon): Likewise.
24076 2018-03-20 Tom de Vries <tom@codesourcery.com>
24079 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
24080 (nvptx_process_pars): Emit bar.sync asap and alap.
24082 2018-03-20 Tom de Vries <tom@codesourcery.com>
24085 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
24086 seen_label if seen_label is already set.
24088 2018-03-20 Jakub Jelinek <jakub@redhat.com>
24091 * config/i386/i386.c (fold_builtin_cpu): For features above 31
24092 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
24093 Use 1U instead of 1. Formatting fixes.
24096 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
24097 instead of TREE_TYPE (s1) for the return value.
24099 2018-03-19 Jakub Jelinek <jakub@redhat.com>
24101 PR tree-optimization/84946
24102 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
24103 bitsize + bitsize in poly_uint64 rather than poly_int64.
24106 * dwarf2asm.c: Include fold-const.c.
24107 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
24108 of decl rather than decl itself.
24110 PR rtl-optimization/84643
24111 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
24113 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
24116 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
24117 calling assemble_variable.
24119 2018-03-19 Sudakshina Das <sudi.das@arm.com>
24122 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
24123 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
24125 2018-03-19 Jim Wilson <jimw@sifive.com>
24128 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
24129 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
24130 (riscv_first_stack_step): Likewise.
24131 (riscv_option_override): Use STACK_BOUNDARY instead of
24132 MIN_STACK_BOUNDARY.
24133 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
24134 MIN_STACK_BOUNDARY.
24135 (BIGGEST_ALIGNMENT): Set to 128.
24136 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
24137 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
24140 2018-03-19 Richard Biener <rguenther@suse.de>
24142 PR tree-optimization/84933
24143 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
24144 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
24146 2018-03-19 Richard Biener <rguenther@suse.de>
24148 PR tree-optimization/84859
24149 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
24150 (cond_if_else_store_replacement): Perform sinking operation on
24151 single-store BBs regardless of MAX_STORES_TO_SINK setting.
24152 Generalize what a BB with a single eligible store is.
24154 2018-03-19 Richard Biener <rguenther@suse.de>
24156 PR tree-optimization/84929
24157 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
24158 chrec_is_positive against non-chrec arg.
24160 2018-03-19 Tamar Christina <tamar.christina@arm.com>
24163 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
24165 2018-03-18 Martin Liska <mliska@suse.cz>
24167 PR rtl-optimization/84635
24168 * regrename.c (build_def_use): Use matches_mode only when
24171 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
24173 PR tree-optimization/84913
24174 * tree-vect-loop.c (vectorizable_reduction): Don't try to
24175 vectorize chains of COND_EXPRs.
24177 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
24179 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
24181 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
24183 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
24185 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
24187 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
24189 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
24190 Kito Cheng <kito.cheng@gmail.com>
24192 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
24193 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
24194 (nds32_adjust_reg_alloc_order): New function.
24195 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
24197 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
24199 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
24200 nds32_print_operand, nds32_print_operand_address): Use
24201 HOST_WIDE_INT_PRINT_DEC instead.
24203 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
24205 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
24207 2018-03-17 Jakub Jelinek <jakub@redhat.com>
24210 * config/i386/i386.c (initial_ix86_tune_features,
24211 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
24212 unsigned long long.
24213 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
24214 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
24215 rather than 1u << ix86_tune. Formatting fix.
24216 (ix86_option_override_internal): Change ix86_arch_mask from
24217 unsigned int to unsigned HOST_WIDE_INT, initialize to
24218 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
24219 (ix86_function_specific_restore): Likewise.
24221 2018-03-16 Jakub Jelinek <jakub@redhat.com>
24224 * postreload.c (reload_combine_recognize_pattern): Perform
24225 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
24226 truncate_int_for_mode the result for the destination's mode.
24229 * hsa-gen.c (mem_type_for_type): Fix comment typo.
24230 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
24232 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
24235 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
24238 * lra-assigns.c (lra_split_hard_reg_for): Don't use
24239 regno_allocno_class_array and sorted_pseudos.
24240 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
24241 insns where regno is used.
24243 2018-03-16 Martin Liska <mliska@suse.cz>
24246 * multiple_target.c (create_dispatcher_calls): Redirect
24247 reference in the symbol table.
24249 2018-03-16 Martin Liska <mliska@suse.cz>
24252 * multiple_target.c (create_dispatcher_calls): Redirect also
24255 2018-03-16 Jakub Jelinek <jakub@redhat.com>
24259 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
24260 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
24261 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
24263 2018-03-16 Julia Koval <julia.koval@intel.com>
24265 * doc/invoke.texi (Skylake Server): Add CLWB.
24266 Cannonlake): Remove CLWB.
24268 2018-03-16 Jakub Jelinek <jakub@redhat.com>
24270 PR tree-optimization/84841
24271 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
24273 (FLOAT_ONE_CONST_TYPE): Define.
24274 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
24275 (sort_by_operand_rank): Put entries with higher constant_type last
24276 rather than first to match comments.
24278 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
24280 * config/nios2/nios2.md (movsi_internal): Fix thinko in
24283 2018-03-15 Jakub Jelinek <jakub@redhat.com>
24286 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
24287 check and use address of target always.
24289 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
24292 * config/i386/i386.c (indirect_thunk_needed): Update comments.
24293 (indirect_thunk_bnd_needed): Likewise.
24294 (indirect_thunks_used): Likewise.
24295 (indirect_thunks_bnd_used): Likewise.
24296 (indirect_return_needed): New.
24297 (indirect_return_bnd_needed): Likewise.
24298 (output_indirect_thunk_function): Add a bool argument for
24300 (output_indirect_thunk_function): Don't generate alias for
24301 function return thunk.
24302 (ix86_code_end): Call output_indirect_thunk_function to generate
24303 function return thunks.
24304 (ix86_output_function_return): Set indirect_return_bnd_needed
24305 and indirect_return_needed instead of indirect_thunk_bnd_needed
24306 and indirect_thunk_needed.
24308 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
24310 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
24311 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
24312 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
24314 2018-03-15 David Malcolm <dmalcolm@redhat.com>
24315 Paul Hua <paul.hua.gm@gmail.com>
24318 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
24320 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
24322 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
24323 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
24324 resp. SFmode cases.
24326 2018-03-15 Tamar Christina <tamar.christina@arm.com>
24329 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
24330 instead of GET_MODE_SIZE when comparing Units.
24332 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
24335 * varasm.c (hash_section): Return an unchangeble hash value
24336 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
24337 Return !aarch64_can_use_per_function_literal_pools_p ().
24339 2018-03-15 Jakub Jelinek <jakub@redhat.com>
24342 * optabs.c (emit_conditional_move): Pass address of cmode's copy
24343 rather than address of cmode as last argument to prepare_cmp_insn.
24345 2018-03-15 Julia Koval <julia.koval@intel.com>
24347 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
24348 F_AVX512VNNI, F_AVX512BITALG): New.
24350 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
24353 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
24354 insn for floating-point loads and stores.
24356 2018-03-14 Carl Love <cel@us.ibm.com>
24358 * config/rs6000/rs6000-c.c: Add macro definitions for
24359 ALTIVEC_BUILTIN_VEC_PERMXOR.
24360 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
24361 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
24362 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
24363 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
24365 * config/doc/extend.texi: Add prototypes for vec_permxor.
24367 2018-03-14 David Malcolm <dmalcolm@redhat.com>
24370 * diagnostic-show-locus.c (class layout_point): Convert m_line
24371 from int to linenum_type.
24372 (line_span::comparator): Use linenum "compare" function when
24373 comparing line numbers.
24374 (test_line_span): New function.
24375 (layout_range::contains_point): Convert param "row" from int to
24377 (layout_range::intersects_line_p): Likewise.
24378 (layout::will_show_line_p): Likewise.
24379 (layout::print_source_line): Likewise.
24380 (layout::should_print_annotation_line_p): Likewise.
24381 (layout::print_annotation_line): Likewise.
24382 (layout::print_leading_fixits): Likewise.
24383 (layout::annotation_line_showed_range_p): Likewise.
24384 (struct line_corrections): Likewise for field m_row.
24385 (line_corrections::line_corrections): Likewise for param "row".
24386 (layout::print_trailing_fixits): Likewise.
24387 (layout::get_state_at_point): Likewise.
24388 (layout::get_x_bound_for_row): Likewise.
24389 (layout::print_line): Likewise.
24390 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
24391 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
24392 * input.c (selftest::test_linenum_comparisons): New function.
24393 (selftest::input_c_tests): Call it.
24394 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
24395 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
24396 * selftest.h (ASSERT_GT): New macro.
24397 (ASSERT_GT_AT): New macro.
24398 (ASSERT_LT): New macro.
24399 (ASSERT_LT_AT): New macro.
24401 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
24403 PR rtl-optimization/84780
24404 * combine.c (distribute_links): Don't make a link based on pc_rtx.
24406 2018-03-14 Martin Liska <mliska@suse.cz>
24408 * tree.c (record_node_allocation_statistics): Use
24409 get_stats_node_kind.
24410 (get_stats_node_kind): New function extracted from
24411 record_node_allocation_statistics.
24412 (free_node): Use get_stats_node_kind.
24414 2018-03-14 Richard Biener <rguenther@suse.de>
24416 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
24417 that the value-set of ANTIC_IN doesn't grow.
24420 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
24422 (BB_VISITED_WITH_VISITED_SUCCS): New define.
24423 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
24425 2018-03-14 Julia Koval <julia.koval@intel.com>
24427 * config.gcc (icelake-client, icelake-server): New.
24429 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
24430 (initial_ix86_arch_features): Ditto.
24431 (PTA_SKYLAKE): Add SGX.
24432 (PTA_ICELAKE): Remove.
24433 (PTA_ICELAKE_CLIENT): New.
24434 (PTA_ICELAKE_SERVER): New.
24435 (ix86_option_override_internal): Split up icelake on icelake client and
24437 (get_builtin_code_for_version): Ditto.
24438 (fold_builtin_cpu): Ditto.
24439 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
24440 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
24441 * config/i386/i386.h (processor_type): Ditto.
24442 * doc/invoke.texi: Ditto.
24444 2018-03-14 Jakub Jelinek <jakub@redhat.com>
24447 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
24448 INTEGER_CST offset, add it together with bitpos / 8 and
24449 sign extend based on POINTER_SIZE.
24453 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
24456 * config/i386/constraints.md (Yc): New register constraint.
24457 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
24458 Use Yc constraint for alternative 2 of operand 0. Remove
24459 preferred_for_speed attribute.
24461 2018-03-14 Richard Biener <rguenther@suse.de>
24463 PR tree-optimization/84830
24464 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
24465 with the old one to avoid oscillations.
24467 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
24470 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
24472 (assign_by_spills): Return a flag of reload assignment failure.
24473 Do not process the reload assignment failures. Do not spill other
24474 reload pseudos if they has the same reg class. Update n if
24476 (lra_assign): Add a return arg. Set up from the result of
24477 assign_by_spills call.
24478 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
24479 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
24480 usage_insns if it is not NULL.
24481 (spill_hard_reg_in_range): New function.
24482 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
24483 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
24484 function prototypes.
24485 (lra_assign): Change prototype.
24486 * lra.c (lra): Add code to deal with fails by splitting hard reg
24489 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
24491 * config/riscv/riscv.opt (mrelax): New option.
24492 * config/riscv/riscv.c (riscv_file_start): Emit ".option
24493 "norelax" when riscv_mrelax is disabled.
24494 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
24496 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
24499 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
24500 reassociation for int modes.
24502 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
24504 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
24505 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
24507 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
24508 * config/aarch64/aarch64-sve.md
24509 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
24510 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
24511 (*extend<mode><Vwide>2): Rename to...
24512 (aarch64_sve_extend<mode><Vwide>2): ...this.
24513 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
24514 renaming the old pattern to...
24515 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
24517 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
24518 define_expand, renaming the old pattern to...
24519 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
24520 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
24521 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
24522 account when deciding which SVE instruction the optab should use.
24523 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
24525 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
24527 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
24528 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
24529 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
24530 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
24531 (tlsdesc_small_<mode>): Turn a define_expand and use
24532 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
24533 (tlsdesc_small_advsimd_<mode>): ...this.
24534 (tlsdesc_small_sve_<mode>): New pattern.
24536 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
24538 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
24539 (UNSPEC_UMUL_HIGHPART): New constants.
24540 (MUL_HIGHPART): New int iteraor.
24541 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
24542 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
24544 (*<su>mul<mode>3_highpart): New define_insn.
24546 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
24549 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
24552 2018-03-13 Martin Liska <mliska@suse.cz>
24555 * (sem_item_optimizer::sem_item_optimizer): Initialize new
24557 (sem_item_optimizer::~sem_item_optimizer): Release it.
24558 (sem_item_optimizer::merge_classes): Register variable aliases.
24559 (sem_item_optimizer::fixup_pt_set): New function.
24560 (sem_item_optimizer::fixup_points_to_sets): Likewise.
24561 * ipa-icf.h: Declare new variables and functions.
24563 2018-03-13 Jakub Jelinek <jakub@redhat.com>
24565 PR middle-end/84834
24566 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
24567 integer_pow2p@2 and test integer_pow2p in condition.
24568 (A < 0 ? C : 0): Similarly for @1.
24570 PR middle-end/84831
24571 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
24572 characters starting at p contain '\0' character, don't look beyond
24576 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
24577 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
24580 * reg-stack.c (change_stack): Change update_end var from int to
24581 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
24582 also call set_block_for_insn on the newly added insns and rescan.
24585 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
24586 on the last operand.
24589 * tree.c (stabilize_reference_1): Return save_expr (e) for
24590 STATEMENT_LIST even if it doesn't have side-effects.
24592 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
24594 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
24596 2018-03-12 Renlin Li <renlin.li@arm.com>
24598 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
24599 aarch64_output_scalar_simd_mov_immediate.
24601 2018-03-12 Martin Sebor <msebor@redhat.com>
24603 PR tree-optimization/83456
24604 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
24605 for perfectly overlapping calls to memcpy.
24606 (gimple_fold_builtin_memory_chk): Same.
24607 (gimple_fold_builtin_strcpy): Handle no-warning.
24608 (gimple_fold_builtin_stxcpy_chk): Same.
24609 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
24611 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
24613 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
24614 parameter. Use it for SFmode.
24615 (rs6000_function_arg_advance_1): Adjust.
24616 (rs6000_function_arg): Adjust.
24617 (rs6000_gimplify_va_arg): Pass false for that new parameter.
24619 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
24621 PR rtl-optimization/84169
24622 PR rtl-optimization/84780
24623 * combine.c (can_combine_p): Check for a 2-insn combination whether
24624 the destination register is used between the two insns, too.
24626 2018-03-12 Richard Biener <rguenther@suse.de>
24628 PR tree-optimization/84803
24629 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
24630 for refs DR analysis didn't process.
24632 2018-03-12 Richard Biener <rguenther@suse.de>
24634 PR tree-optimization/84777
24635 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
24636 force-vectorize loops ignore whether we are optimizing for size.
24638 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
24640 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
24641 (TARGET_MD_ASM_ADJUST): Define.
24643 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
24644 Kito Cheng <kito.cheng@gmail.com>
24645 Chung-Ju Wu <jasonwucj@gmail.com>
24647 * config/nds32/nds32.c (nds32_compute_stack_frame,
24648 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
24649 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
24650 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
24651 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
24652 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
24653 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
24654 * config/nds32/nds32.md (prologue, epilogue): Use macro
24655 NDS32_V3PUSH_AVAILABLE_P to do checking.
24657 2018-03-11 Jakub Jelinek <jakub@redhat.com>
24660 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
24661 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
24662 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
24663 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
24664 addition of most attributes on !orig_type_die or the attribute not
24665 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
24667 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
24668 Chung-Ju Wu <jasonwucj@gmail.com>
24670 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
24671 __NDS32_VH__ macro.
24672 * config/nds32/nds32.opt (mvh): New option.
24674 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
24675 Chung-Ju Wu <jasonwucj@gmail.com>
24677 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
24679 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
24680 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
24683 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
24684 Chung-Ju Wu <jasonwucj@gmail.com>
24686 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
24688 * config/nds32/nds32-multiple.md (strlensi): New pattern.
24689 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
24691 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
24692 Kito Cheng <kito.cheng@gmail.com>
24693 Chung-Ju Wu <jasonwucj@gmail.com>
24695 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
24696 UNSPEC_FFMISM and UNSPEC_FLMISM.
24697 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
24698 for ffb, ffmism and flmism.
24699 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
24700 (unspec_ffmism): Ditto.
24701 (unspec_flmism): Ditto.
24702 (nds32_expand_builtin_impl): Check if string extension is available.
24703 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
24704 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
24706 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
24709 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
24712 * lra-assigns.c (assign_by_spills): Return a flag of reload
24713 assignment failure. Do not process the reload assignment
24714 failures. Do not spill other reload pseudos if they has the same
24716 (lra_assign): Add a return arg. Set up from the result of
24717 assign_by_spills call.
24718 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
24719 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
24720 usage_insns if it is not NULL.
24721 (spill_hard_reg_in_range): New function.
24722 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
24723 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
24724 function prototypes.
24725 (lra_assign): Change prototype.
24726 * lra.c (lra): Add code to deal with fails by splitting hard reg
24729 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
24732 * config/i386/i386.opt: Replace Enforcment with Enforcement.
24734 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
24737 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
24738 (dw_val_node): Add val_symbolic_view.
24739 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
24740 (symview_upper_bound): New.
24741 (new_line_info_table): Initialize symviews_since_reset.
24742 (dwarf2out_source_line): Count symviews_since_reset and set
24743 symview_upper_bound.
24744 (dw_val_equal_p): Handle symview.
24745 (add_AT_symview): New.
24746 (print_dw_val): Handle symview.
24747 (attr_checksum, attr_checksum_ordered): Likewise.
24748 (same_dw_val_p, size_of_die): Likewise.
24749 (value_format, output_die): Likewise.
24750 (add_high_low_attributes): Use add_AT_symview for entry_view.
24751 (dwarf2out_finish): Reset symview_upper_bound, clear
24754 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
24757 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
24758 Add strict argument and use it.
24759 (rs6000_split_multireg_move): Update for new strict argument.
24760 (mem_operand_gpr): Disallow all non-offsettable addresses.
24761 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
24763 2018-03-09 Jakub Jelinek <jakub@redhat.com>
24766 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
24767 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
24768 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
24771 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
24772 decl, use remap_type if we want to use the type.
24774 2018-03-09 Martin Sebor <msebor@redhat.com>
24776 PR tree-optimization/84526
24777 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
24779 (builtin_access::generic_overlap): Be prepared to handle non-array
24782 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
24784 PR rtl-optimization/84682
24785 * lra-constraints.c (process_address_1): Check is_address flag
24786 for address constraints.
24787 (process_alt_operands): Likewise.
24788 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
24789 preprocess_constraints.
24790 * recog.h (preprocess_constraints): Add oploc parameter.
24792 * recog.c (preprocess_constraints): Test address_operand for
24793 CT_ADDRESS constraints.
24795 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
24798 * lra-assigns.c (assign_by_spills): Return a flag of reload
24799 assignment failure. Do not process the reload assignment
24800 failures. Do not spill other reload pseudos if they has the same
24802 (lra_assign): Add a return arg. Set up from the result of
24803 assign_by_spills call.
24804 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
24805 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
24806 usage_insns if it is not NULL.
24807 (spill_hard_reg_in_range): New function.
24808 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
24809 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
24810 function prototypes.
24811 (lra_assign): Change prototype.
24812 * lra.c (lra): Add code to deal with fails by splitting hard reg
24815 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
24818 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
24819 Accept complain bool parameter. Only emit errors if it is true.
24820 (arm_parse_cpu_option_name): Likewise.
24821 (arm_target_thumb_only): Adjust callers of the above.
24822 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
24823 prototype to take a default true bool parameter.
24824 (arm_parse_arch_option_name): Likewise.
24826 2018-03-09 David Malcolm <dmalcolm@redhat.com>
24827 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
24831 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
24832 * configure: Regenerate.
24833 * configure.ac ("linker --version-script option"): New.
24834 ("linker soname option"): New.
24836 2018-03-09 Richard Biener <rguenther@suse.de>
24838 PR tree-optimization/84775
24839 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
24840 immediate uses of predicate stmts and mark them modified.
24843 PR tree-optimization/84178
24844 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
24846 (version_loop_for_if_conversion): Delay update_ssa call.
24847 (tree_if_conversion): Delay update_ssa until after predicate
24850 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
24853 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
24854 when the function accesses prior frames.
24856 2018-03-08 Jakub Jelinek <jakub@redhat.com>
24859 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
24860 gen_llsym, otherwise call maybe_gen_llsym.
24862 PR inline-asm/84742
24863 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
24864 has ',' character inside of it.
24866 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
24869 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
24870 as clobbering CC_REGNUM.
24872 2018-03-08 Richard Biener <rguenther@suse.de>
24874 PR middle-end/84552
24875 * tree-scalar-evolution.c: Include tree-into-ssa.h.
24876 (follow_copies_to_constant): Do not follow SSA names registered
24879 2018-03-08 Richard Biener <rguenther@suse.de>
24881 PR tree-optimization/84178
24882 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
24884 (version_loop_for_if_conversion): Delay update_ssa call.
24885 (tree_if_conversion): Delay update_ssa until after predicate
24888 2018-03-08 David Malcolm <dmalcolm@redhat.com>
24890 PR tree-optimization/84178
24891 * tree-if-conv.c (release_bb_predicate): Remove the
24892 the assertion that the stmts have NULL use_ops.
24893 Discard the statements, asserting that they haven't
24894 yet been added to a BB.
24896 2018-03-08 Richard Biener <rguenther@suse.de>
24898 PR tree-optimization/84746
24899 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
24900 (phi_translate): Pass in destination ANTIC_OUT set.
24901 (phi_translate_1): Likewise. For a simplified result lookup
24902 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
24903 (phi_translate_set): Adjust.
24904 (do_pre_regular_insertion): Likewise.
24905 (do_pre_partial_partial_insertion): Likewise.
24907 2018-03-08 Martin Liska <mliska@suse.cz>
24909 PR gcov-profile/84735
24910 * doc/gcov.texi: Document usage of profile files.
24911 * gcov-io.h: Document changes in the format.
24913 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
24917 * dwarf2out.c (struct dw_line_info_table): Update comments for
24919 (FORCE_RESET_NEXT_VIEW): New.
24920 (FORCE_RESETTING_VIEW_P): New.
24921 (RESETTING_VIEW_P): Check for -1 too.
24922 (ZERO_VIEW_P): Likewise.
24923 (new_line_info_table): Force-reset next view.
24924 (dwarf2out_begin_function): Likewise.
24925 (dwarf2out_source_line): Simplify zero_view_p initialization.
24926 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
24927 view directly. Omit view when omitting .loc at line 0.
24929 2018-03-08 Jakub Jelinek <jakub@redhat.com>
24931 PR tree-optimization/84740
24932 * tree-switch-conversion.c (process_switch): Call build_constructors
24933 only if info.phi_count is non-zero.
24935 PR tree-optimization/84739
24936 * tree-tailcall.c (find_tail_calls): Check call arguments against
24937 DECL_ARGUMENTS (current_function_decl) rather than
24938 DECL_ARGUMENTS (func) when checking for tail recursion.
24940 2018-03-07 Jakub Jelinek <jakub@redhat.com>
24942 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
24943 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
24944 Volker Reichelt's entry and add entries for people that perform
24945 GCC fuzzy testing and report numerous bugs.
24947 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
24950 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
24951 readonly data in sdata, if that is disabled.
24952 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
24953 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
24954 -mreadonly-in-sdata option.
24956 2018-03-07 Martin Sebor <msebor@redhat.com>
24958 PR tree-optimization/84468
24959 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
24960 basic block when looking for nul assignment.
24962 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
24965 * except.h (output_function_exception_table): Adjust prototype.
24966 * except.c (output_function_exception_table): Remove FNNAME parameter
24967 and add SECTION parameter. Ouput one part of the table at a time.
24968 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
24969 the first part of the exception table and emit unwind directives.
24970 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
24971 (i386_pe_seh_cold_init): Likewise.
24972 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
24973 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
24974 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
24975 (ix86_output_call_insn): Emit a nop in one more case for SEH.
24976 * config/i386/winnt.c: Include except.h.
24977 (struct seh_frame_state): Add reg_offset, after_prologue and
24978 in_cold_section fields.
24979 (i386_pe_seh_end_prologue): Set seh->after_prologue.
24980 (i386_pe_seh_cold_init): New function.
24981 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
24982 to seh->in_cold_section.
24983 (seh_emit_push): Record the offset of the push.
24984 (seh_emit_save): Record the offet of the save.
24985 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
24986 Test seh->after_prologue to disregard the epilogue.
24987 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
24988 (i386_pe_end_cold_function): New function.
24990 2018-03-07 Jakub Jelinek <jakub@redhat.com>
24993 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
24994 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
24997 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
24999 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
25000 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
25002 PR middle-end/84723
25003 * multiple_target.c: Include tree-inline.h and intl.h.
25004 (expand_target_clones): Diagnose and fail if node->definition and
25005 !tree_versionable_function_p (node->decl).
25007 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
25009 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
25011 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
25012 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
25013 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
25015 2018-03-06 Jakub Jelinek <jakub@redhat.com>
25018 * combine.c (try_combine): Use reg_or_subregno instead of handling
25019 just paradoxical SUBREGs and REGs.
25021 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
25023 * config/arc/arc.c (arc_finalize_pic): Remove function.
25024 (arc_must_save_register): We use single base PIC register, remove
25025 checks to save/restore the PIC register.
25026 (arc_expand_prologue): Likewise.
25027 * config/arc/arc-protos.h (arc_set_default_type_attributes):
25029 (arc_verify_short): Likewise.
25030 (arc_attr_type): Likewise.
25031 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
25032 (walk_stores): Likewise.
25033 (arc_address_cost): Make it static.
25034 (arc_verify_short): Likewise.
25035 (branch_dest): Likewise.
25036 (arc_attr_type): Likewise.
25037 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
25038 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
25039 (arc_final_prescan_insn): Remove inserting the nops due to
25040 hardware hazards. It is done in reorg step.
25041 (insn_length_variant_t): Remove.
25042 (insn_length_parameters_t): Likewise.
25043 (arc_insn_length_parameters): Likewise.
25044 (arc_get_insn_variants): Likewise.
25045 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
25047 2018-03-06 Jakub Jelinek <jakub@redhat.com>
25049 PR inline-asm/84683
25050 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
25053 PR tree-optimization/84687
25054 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
25056 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
25058 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
25060 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
25061 Rename to ppc_speculation_barrier.
25062 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
25063 __builtin_ppc_speculation_barrier.
25065 2018-03-05 Jakub Jelinek <jakub@redhat.com>
25068 * combine.c (combine_simplify_rtx): Don't try to simplify if
25069 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
25072 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
25074 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
25075 to 32 bytes when compiling for POWER9.
25077 2018-03-05 Jakub Jelinek <jakub@redhat.com>
25080 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
25081 regparm >= 3 with no arg reg available also for calls with
25082 flag_force_indirect_call. Pass decl to ix86_function_regparm.
25085 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
25087 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
25089 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
25092 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
25094 2018-03-05 Richard Biener <rguenther@suse.de>
25096 PR tree-optimization/84486
25097 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
25098 When inserting a __builtin_assume_aligned call set the LHS
25099 SSA name alignment info accordingly.
25101 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
25103 PR tree-optimization/84114
25104 * config/aarch64/aarch64.c (aarch64_reassociation_width)
25105 Avoid reassociation of FLOAT_MODE addition.
25107 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
25109 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
25110 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
25111 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
25112 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
25113 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
25114 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
25115 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
25117 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
25118 __builtin_ia32_wbinvd): New builtins.
25119 (SPECIAL_ARGS2): New.
25120 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
25121 (SPECIAL_ARGS2): New.
25122 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
25123 (ix86_valid_target_attribute_inner_p): Ditto.
25124 (ix86_init_mmx_sse_builtins): Add special_args2.
25125 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
25126 TARGET_WBNOINVD_P): New.
25127 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
25128 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
25129 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
25130 * config/i386/immintrin.h (_wbinvd): New intrinsic.
25131 * config/i386/pconfigintrin.h: New file.
25132 * config/i386/wbnoinvdintrin.h: Ditto.
25133 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
25135 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
25137 2018-03-05 Richard Biener <rguenther@suse.de>
25139 PR tree-optimization/84670
25140 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
25142 (BB_VISITED_WITH_VISITED_SUCCS): New define.
25143 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
25144 (compute_antic_aux): Only assert the number of values in ANTIC_IN
25145 doesn't grow if all successors (recursively) were visited at least
25148 2018-03-05 Richard Biener <rguenther@suse.de>
25150 PR tree-optimization/84650
25151 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
25152 if executed in the loop pipeline.
25154 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
25156 * doc/configfiles.texi (Configuration Files): Move info about
25157 conditionalizing $target-protos.h to...
25158 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
25159 differs from $target-protos.h.
25161 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
25162 Chung-Ju Wu <jasonwucj@gmail.com>
25164 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
25165 * config/nds32/nds32-multiple.md (setmemsi): Define.
25166 * config/nds32/nds32-memory-manipulation.c
25167 (nds32_gen_dup_4_byte_to_word_value): New.
25168 (emit_setmem_word_loop): New.
25169 (emit_setmem_byte_loop): New.
25170 (nds32_expand_setmem_loop): New.
25171 (nds32_expand_setmem_loop_v3m): New.
25172 (nds32_expand_setmem_unroll): New.
25173 (nds32_expand_setmem): New.
25175 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
25176 Chung-Ju Wu <jasonwucj@gmail.com>
25178 * config/nds32/nds32-memory-manipulation.c
25179 (nds32_emit_load_store): New.
25180 (nds32_emit_post_inc_load_store): New.
25181 (nds32_emit_mem_move): New.
25182 (nds32_emit_mem_move_block): New.
25183 (nds32_expand_movmemsi_loop_unknown_size): New.
25184 (nds32_expand_movmemsi_loop_known_size): New.
25185 (nds32_expand_movmemsi_loop): New.
25186 (nds32_expand_movmemsi_unroll): New.
25187 (nds32_expand_movmemqi): Rename ...
25188 (nds32_expand_movmemsi): ... to this.
25189 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
25190 (movmemsi): ... to this.
25191 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
25192 (nds32_expand_movmemsi): ... to this.
25194 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
25195 Monk Chiang <sh.chiang04@gmail.com>
25196 Chung-Ju Wu <jasonwucj@gmail.com>
25198 * config/nds32/nds32-protos.h
25199 (nds32_expand_load_multiple): New arguments.
25200 (nds32_expand_store_multiple): Ditto.
25201 (nds32_valid_multiple_load_store): Rename ...
25202 (nds32_valid_multiple_load_store_p): ... to this.
25203 * config/nds32/nds32-memory-manipulation.c
25204 (nds32_expand_load_multiple): Refine implementation.
25205 (nds32_expand_store_multiple): Ditto.
25206 * config/nds32/nds32-multiple.md
25207 (load_multiple): Update nds32_expand_load_multiple interface.
25208 (store_multiple): Update nds32_expand_store_multiple interface.
25209 * config/nds32/nds32-predicates.c
25210 (nds32_valid_multiple_load_store): Rename ...
25211 (nds32_valid_multiple_load_store_p): ... to this and refine
25213 * config/nds32/predicates.md
25214 (nds32_load_multiple_and_update_address_operation): New predicate.
25215 (nds32_store_multiple_and_update_address_operation): New predicate.
25217 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
25218 Chung-Ju Wu <jasonwucj@gmail.com>
25220 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
25221 (combo): New attribute.
25222 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
25224 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
25226 * config/nds32/nds32.opt: Change -mcmodel= default value.
25228 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
25229 Monk Chiang <sh.chiang04@gmail.com>
25230 Chung-Ju Wu <jasonwucj@gmail.com>
25232 * config/nds32/constants.md (unspec_element): New enum.
25233 * config/nds32/constraints.md (Umw): New constraint.
25234 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
25235 * config/nds32/nds32-intrinsic.md: Likewise.
25236 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
25237 (nds32_valid_smw_lwm_base_p): New.
25238 (nds32_output_smw_single_word): New.
25239 (nds32_output_lmw_single_word): New.
25240 (nds32_expand_unaligned_load): New.
25241 (nds32_expand_unaligned_store): New.
25242 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
25243 (nds32_output_smw_single_word): Declare.
25244 (nds32_output_lmw_single_word): Declare.
25245 (nds32_expand_unaligned_load): Declare.
25246 (nds32_expand_unaligned_store): Declare.
25247 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
25248 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
25249 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
25250 NDS32_BUILTIN_UASTORE_DW.
25251 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
25254 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
25255 Kito Cheng <kito.cheng@gmail.com>
25256 Chung-Ju Wu <jasonwucj@gmail.com>
25258 * config/nds32/nds32-intrinsic.c
25259 (nds32_expand_builtin_null_ftype_reg): Delete.
25260 (nds32_expand_builtin_reg_ftype_imm): Ditto.
25261 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
25262 (nds32_read_argument): New.
25263 (nds32_legitimize_target): Ditto.
25264 (nds32_legitimize_argument): Ditto.
25265 (nds32_check_constant_argument): Ditto.
25266 (nds32_expand_unop_builtin): Ditto.
25267 (nds32_expand_unopimm_builtin): Ditto.
25268 (nds32_expand_binop_builtin): Ditto.
25269 (nds32_builtin_decl_impl): Ditto.
25270 (builtin_description): Ditto.
25271 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
25272 (nds32_init_builtins_impl): Ditto.
25273 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
25274 (nds32_builtin_decl): New.
25275 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
25276 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
25278 2018-03-02 Jeff Law <law@redhat.com>
25280 * reorg.c (stop_search_p): Handle DEBUG_INSN.
25281 (redundant_insn, fill_simple_delay_slots): Likewise.
25282 (fill_slots_from_thread): Likewise.
25283 * resource.c (mark_referenced_resources): Likewise.
25284 (mark_set_resources, find_dead_or_set_registers): Likewise.
25286 2018-03-02 Jakub Jelinek <jakub@redhat.com>
25288 * substring-locations.h (format_warning_va): Formatting fix for
25289 ATTRIBUTE_GCC_DIAG.
25290 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
25292 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
25293 * substring-locations.c: Include intl.h.
25294 (format_warning_va): Turned into small wrapper around
25295 format_warning_n_va, renamed to ...
25296 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
25297 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
25299 (format_warning_at_substring_n): New function.
25300 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
25301 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
25302 format_warning_at_substring with just a shorter name instead of
25303 const function pointer.
25304 (fmtwarn_n): New function.
25305 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
25306 appropriate, get rid of all the fmtstr temporaries, move conditionals
25307 with G_() wrapped string literals directly into fmtwarn arguments,
25308 cast dir.len to (int), formatting fixes.
25310 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
25312 * doc/invoke.texi: Remove "Cilk Plus" references.
25314 2018-03-02 Jakub Jelinek <jakub@redhat.com>
25315 Richard Biener <rguenther@suse.de>
25318 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
25319 for error or warning attributes if CALL_FROM_THUNK_P is set.
25322 2018-03-02 Jakub Jelinek <jakub@redhat.com>
25325 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
25326 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
25329 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
25330 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
25332 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
25333 instead of -1U in last predictors element's probability member.
25335 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
25338 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
25339 arguments if they are comparable.
25341 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
25343 PR tree-optimization/84634
25344 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
25345 masks and masked_loop_p with a single loop_masks, making sure it's
25346 null for bb vectorization.
25348 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
25350 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
25351 (vect_analyze_data_ref_access): Use loop->safe_len rather than
25352 loop->force_vectorize to check whether there is no alias.
25354 2018-03-02 Jakub Jelinek <jakub@redhat.com>
25357 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
25359 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
25361 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
25362 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
25363 instead of a loop around prev_real_insn.
25364 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
25367 PR inline-asm/84625
25368 * config/i386/i386.c (ix86_print_operand): Use conditional
25369 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
25372 2018-03-02 Richard Biener <rguenther@suse.de>
25374 PR tree-optimization/84427
25375 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
25376 (bitmap_set_subtract_values): Rewrite to handle multiple
25379 (prune_clobbered_mems): Likewise.
25380 (phi_translate): Take edge instead of pred/phiblock.
25381 (phi_translate_1): Likewise.
25382 (phi_translate_set): Likewise. Insert all translated
25383 exprs for a value into the set, keeping possibly multiple
25384 expressions per value.
25385 (compute_antic_aux): Adjust for phi_translate changes.
25386 When intersecting union the expressions and prune those
25387 not in the final value set, keeping possibly multiple
25388 expressions per value. Do not use value-insertion
25389 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
25390 all expressions. Add verification that the value-sets
25391 only shrink during iteration.
25392 (compute_partial_antic_aux): Adjust for the phi_translate changes.
25393 (do_pre_regular_insertion): Likewise.
25394 (do_pre_partial_partial_insertion): Likewise.
25396 2018-03-02 Richard Biener <rguenther@suse.de>
25399 * config/darwin.c (saved_debug_info_level): New static global.
25400 (darwin_asm_lto_start): Disable debug info generation for LTO out.
25401 (darwin_asm_lto_end): Restore debug info generation settings.
25403 2018-03-01 Martin Liska <mliska@suse.cz>
25406 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
25407 volatile arguments.
25409 2018-03-01 Richard Biener <rguenther@suse.de>
25412 * dwarf2out.c (gen_variable_die): Properly handle late VLA
25413 type annotation with LTO when debug was disabled at compile-time.
25415 2018-03-01 Matthew Fortune <mfortune@gmail.com>
25417 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
25419 (mips_final_postscan_insn): Likewise.
25421 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
25423 PR rtl-optimization/84528
25424 * alias.c (init_alias_target): Add commentary.
25425 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
25426 a unique base value if the frame pointer is not eliminated
25427 to the stack pointer.
25429 2018-03-01 Tom de Vries <tom@codesourcery.com>
25431 PR rtl-optimization/83327
25432 * lra-int.h (hard_regs_spilled_into): Declare.
25433 * lra.c (hard_regs_spilled_into): Define.
25434 (init_reg_info): Init hard_regs_spilled_into.
25435 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
25436 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
25437 (process_bb_lives): Handle hard_regs_spilled_into.
25438 (lra_create_live_ranges_1): Before doing liveness propagation, clear
25439 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
25441 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
25443 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
25444 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
25445 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
25446 * config/rs6000/aix72.h: New file.
25448 2018-02-28 Jakub Jelinek <jakub@redhat.com>
25450 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
25451 instead of warning_at with conditional singular and plural messages
25455 * stor-layout.c (update_alignment_for_field): For
25456 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
25457 && !DECL_PACKED (field), do the alignment update, just use
25458 only desired_align instead of MAX (type_align, desired_align)
25460 (place_field): Don't do known_align < desired_align handling
25461 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
25462 is non-NULL, instead do it after rli->prev_field handling and
25463 only if not within a bitfield word. For DECL_PACKED (field)
25464 use type_align of BITS_PER_UNIT.
25466 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
25468 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
25469 superfluous parentheses and trailing spaces.
25471 2018-02-28 Richard Biener <rguenther@suse.de>
25473 PR tree-optimization/84584
25474 * graphite-scop-detection.c (scop_detection::add_scop): Discard
25475 SCoPs with fake exit edge.
25477 2018-02-28 Martin Liska <mliska@suse.cz>
25480 * timevar.c (timer::print): Fix format to properly print 100%
25483 2018-02-28 Richard Biener <rguenther@suse.de>
25485 PR middle-end/84607
25486 * genmatch.c (capture_info::walk_match): Do not mark
25487 captured expressions without operands as expr_p given
25488 they act more like predicates and should be subject to
25489 "lost tail" side-effect preserving.
25491 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
25493 PR rtl-optimization/81611
25494 * auto-inc-dec.c (attempt_change): Move dead note from
25495 mem_insn if it's the next use of regno
25496 (find_address): Take address use of reg holding
25497 non-incremented value. Add parm to limit search to the named
25499 (merge_in_block): Attempt to use a mem insn that is the next
25500 use of the original regno.
25502 2018-02-27 Martin Sebor <msebor@redhat.com>
25505 * doc/invoke.texi (-Wmissing-attributes): New option.
25506 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
25508 2018-02-27 Martin Sebor <msebor@redhat.com>
25510 PR translation/84207
25511 * diagnostic-core.h (warning_n, error_n, inform_n): Change
25512 n argument to unsigned HOST_WIDE_INT.
25513 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
25514 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
25515 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
25516 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
25518 2018-02-27 Richard Biener <rguenther@suse.de>
25520 PR tree-optimization/84512
25521 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
25522 Do not use the estimate returned from record_stmt_cost for
25523 the scalar iteration cost but sum properly using add_stmt_cost.
25525 2018-02-27 Richard Biener <rguenther@suse.de>
25527 PR tree-optimization/84466
25528 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
25529 Adjust last change to less strictly validate use operands.
25531 2018-02-27 Martin Liska <mliska@suse.cz>
25533 PR gcov-profile/84548
25534 * gcov.c (process_file): Allow partial overlap and consider it
25535 also as group functions.
25536 (output_lines): Properly calculate range of lines for a group.
25538 2018-02-27 Martin Liska <mliska@suse.cz>
25540 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
25541 'ggc' suffixes. Change first column width.
25542 (timer::print): Fix formatting of the column.
25544 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
25546 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
25547 preserve inline entry blocks for the sake of debug inline
25548 entry point markers alone.
25549 (remove_unused_locals): Suggest in comments a better place to
25550 force the preservation of inline entry blocks that are
25551 otherwise unused, but do not preserve them.
25553 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
25555 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
25557 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
25560 * config/i386/constraints.md (Bs): Replace
25561 ix86_indirect_branch_register with
25562 TARGET_INDIRECT_BRANCH_REGISTER.
25564 * config/i386/i386.md (indirect_jump): Likewise.
25565 (tablejump): Likewise.
25566 (*sibcall_memory): Likewise.
25567 (*sibcall_value_memory): Likewise.
25568 Peepholes of indirect call and jump via memory: Likewise.
25569 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
25570 (*sibcall_value_GOT_32): Likewise.
25571 * config/i386/predicates.md (indirect_branch_operand): Likewise.
25572 (GOT_memory_operand): Likewise.
25573 (call_insn_operand): Likewise.
25574 (sibcall_insn_operand): Likewise.
25575 (GOT32_symbol_operand): Likewise.
25576 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
25578 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
25580 PR rtl-optimization/83496
25581 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
25582 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
25583 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
25584 redundant insn, if any.
25585 (relax_delay_slots): Likewise.
25586 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
25588 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
25590 PR tree-optimization/83965
25591 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
25592 that grouped statements are part of a reduction chain. Return
25593 true if the statement is not marked as a reduction itself but
25594 is part of a group.
25595 (vect_recog_dot_prod_pattern): Don't check whether the statement
25596 is part of a group here.
25597 (vect_recog_sad_pattern): Likewise.
25598 (vect_recog_widen_sum_pattern): Likewise.
25600 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
25603 * final.c (rest_of_clean_state): Also look for calls inside sequences.
25605 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
25608 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
25610 (ix86_output_indirect_function_return): New prototype.
25611 (ix86_split_simple_return_pop_internal): Likewise.
25612 * config/i386/i386.c (indirect_return_via_cx): New.
25613 (indirect_return_via_cx_bnd): Likewise.
25614 (indirect_thunk_name): Handle return va CX_REG.
25615 (output_indirect_thunk_function): Create alias for
25616 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
25617 (ix86_output_indirect_jmp): Remove the bool argument.
25618 (ix86_output_indirect_function_return): New function.
25619 (ix86_split_simple_return_pop_internal): Likewise.
25620 * config/i386/i386.md (*indirect_jump): Don't pass false
25621 to ix86_output_indirect_jmp.
25622 (*tablejump_1): Likewise.
25623 (simple_return_pop_internal): Change it to define_insn_and_split.
25624 Call ix86_split_simple_return_pop_internal to split it for
25625 -mfunction-return=.
25626 (simple_return_indirect_internal): Call
25627 ix86_output_indirect_function_return instead of
25628 ix86_output_indirect_jmp.
25630 2018-02-26 Jakub Jelinek <jakub@redhat.com>
25633 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
25634 memset and value initialization afterwards.
25636 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
25638 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
25640 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
25643 * common/config/aarch64/aarch64-common.c
25644 (aarch_option_optimization_table[]): Switch
25645 off fomit-frame-pointer
25647 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
25648 Chung-Ju Wu <jasonwucj@gmail.com>
25650 * config/nds32/nds32-multiple.md (load_multiple): Disallow
25652 (store_multiple): Ditto.
25654 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
25656 * config.gcc: Add --with-cpu support for nds32 target.
25657 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
25658 * config/nds32/nds32.opt: Add -mcpu= option.
25660 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
25662 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
25663 isel=yes): Warn for these deprecated options.
25665 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
25667 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
25668 ISA_2_5_MASKS_EMBEDDED.
25670 2018-02-23 Jakub Jelinek <jakub@redhat.com>
25672 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
25673 p->max as pointers rather than using iterative_hash_expr.
25675 2018-02-23 Carl Love <cel@us.ibm.com>
25677 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
25678 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
25680 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
25681 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
25682 P8V_BUILTIN_VEC_VUNSIGNED2.
25684 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
25687 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
25688 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
25690 * lra-constraints.c (curr_insn_transform): Set up
25691 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
25693 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
25694 * lra-eliminations.c (spill_pseudos): Ditto.
25695 (process_insn_for_elimination): Ditto.
25696 * lra-lives.c (reg_early_clobber_p): Use the new macros.
25697 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
25698 LRA_NON_CLOBBERED_ALT.
25700 2018-02-22 Martin Sebor <msebor@redhat.com>
25702 PR tree-optimization/84480
25703 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
25704 to maybe_diag_stxncpy_trunc. Call it.
25705 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
25706 from gimple_fold_builtin_strcpy. Print inlining stack.
25707 (handle_builtin_stxncpy): Print inlining stack.
25708 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
25710 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
25713 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
25714 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
25715 and -fcheck-pointer-bounds are used together.
25716 (indirect_thunk_prefix): New enum.
25717 (indirect_thunk_need_prefix): New function.
25718 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
25719 "_nt" instead of "_bnd" for NOTRACK prefix.
25720 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
25721 (output_indirect_thunk_function): Likewise.
25723 (ix86_code_end): Update output_indirect_thunk_function calls.
25724 (ix86_output_indirect_branch_via_reg): Replace
25725 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
25726 (ix86_output_indirect_branch_via_push): Likewise.
25727 (ix86_output_function_return): Likewise.
25728 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
25729 incompatible with -fcf-protection=branch and
25730 -fcheck-pointer-bounds.
25732 2018-02-22 Steve Ellcey <sellcey@cavium.com>
25735 * config/aarch64/aarch64.c (aarch64_print_address_internal):
25736 Change gcc_assert call to output_operand_lossage.
25738 2018-02-22 Steve Ellcey <sellcey@cavium.com>
25740 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
25742 2018-02-22 DJ Delorie <dj@redhat.com>
25743 Sebastian Perta <sebastian.perta@renesas.com>
25744 Oleg Endo <olegendo@gcc.gnu.org>
25746 * config/rx/rx.c (rx_rtx_costs): New function.
25747 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
25749 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
25751 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
25753 2018-02-22 Martin Liska <mliska@suse.cz>
25756 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
25757 Add "native" as a possible value.
25759 2018-02-22 Martin Liska <mliska@suse.cz>
25762 * config/i386/i386.c (ix86_option_override_internal):
25763 Add "native" as a possible value for -march and -mtune.
25765 2018-02-22 Jakub Jelinek <jakub@redhat.com>
25768 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
25769 to all type variants.
25771 PR tree-optimization/84503
25772 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
25773 width as info->bitpos + info->bitsize - start.
25774 (merged_store_group::merge_overlapping): Simplify width computation.
25775 (check_no_overlap): New function.
25776 (imm_store_chain_info::try_coalesce_bswap): Compute expected
25777 start + width and last_order of the group, fail if check_no_overlap
25779 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
25780 to group if check_no_overlap fails.
25782 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
25784 * config/rs6000/altivec.md: Delete contraint arguments to
25785 define_expand, define_split, and define_peephole2, and in
25786 define_insn_and_split if always unused.
25787 * config/rs6000/darwin.md: Ditto.
25788 * config/rs6000/dfp.md: Ditto.
25789 * config/rs6000/rs6000.md: Ditto.
25790 * config/rs6000/sync.md: Ditto.
25791 * config/rs6000/vector.md: Ditto.
25792 * config/rs6000/vsx.md: Ditto.
25794 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
25796 * config/rs6000/altivec.md: Write output control strings as braced
25797 blocks instead of double-quoted strings.
25798 * config/rs6000/darwin.md: Ditto.
25799 * config/rs6000/rs6000.md: Ditto.
25800 * config/rs6000/vector.md: Ditto.
25801 * config/rs6000/vsx.md: Ditto.
25803 2018-02-21 Jason Merrill <jason@redhat.com>
25805 PR c++/84314 - ICE with templates and fastcall attribute.
25806 * attribs.c (build_type_attribute_qual_variant): Remove assert.
25808 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
25810 * ipa-cp.c (determine_versionability): Fix comment typos.
25812 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
25815 * ipa-cp.c (determine_versionability): Do not version functions caling
25818 2018-02-21 Martin Liska <mliska@suse.cz>
25821 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
25822 Add "native" as a possible value.
25823 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
25824 the macro when native cpu detection is available.
25826 2018-02-21 Martin Liska <mliska@suse.cz>
25829 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
25830 Add "native" as a possible value.
25831 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
25832 when native cpu detection is available.
25834 2018-02-21 Jakub Jelinek <jakub@redhat.com>
25835 Martin Sebor <msebor@redhat.com>
25837 PR tree-optimization/84478
25838 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
25840 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
25841 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
25842 support which is conservatively correct, for 2 only stay conservative
25843 for maxlen. Formatting and comment capitalization fixes. Add STRICT
25844 argument to the 2 argument get_range_strlen, adjust 6 arg
25845 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
25847 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
25848 (gimple_fold_builtin_strlen): Pass true as last argument to
25851 2018-02-20 Martin Sebor <msebor@redhat.com>
25853 PR middle-end/84095
25854 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
25855 (builtin_memref::set_base_and_offset): Same. Handle inner references.
25856 (builtin_memref::builtin_memref): Factor out parts into
25857 set_base_and_offset and call it.
25859 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
25861 PR middle-end/84406
25862 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
25863 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
25864 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
25865 search at the associated MODE_INT.
25867 2018-02-20 Jeff Law <law@redhat.com>
25869 PR middle-end/82123
25870 PR tree-optimization/81592
25871 PR middle-end/79257
25872 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
25873 for range data rather than using global data.
25874 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
25875 range data rather than using global data.
25876 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
25877 pass it to children as needed.
25878 (struct directive::fmtresult): Similarly.
25879 (struct directive::set_width): Similarly.
25880 (struct directive::set_precision): Similarly.
25881 (format_integer, format_directive, parse_directive): Similarly.
25882 (format_none): Accept unnamed vr_values parameter.
25883 (format_percent, format_floating, format_character): Similarly.
25884 (format_string, format_plain): Similarly.
25885 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
25886 the EVRP range analyzer for range data rather than using global data.
25887 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
25888 gimple-ssa-evrp-analyze.h
25889 (class sprintf_dom_walker): Add after_dom_children member function.
25890 Add evrp_range_analyzer member.
25891 (sprintf_dom_walker::before_dom_children): Call into the EVRP
25892 range analyzer as needed.
25893 (sprintf_dom_walker::after_dom_children): New member function.
25894 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
25896 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
25897 (evrp_range_analyzer::pop_to_marker): Likewise.
25899 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
25901 PR tree-optimization/84419
25902 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
25903 with the required type if its current type is compatible but
25906 2018-02-20 Jakub Jelinek <jakub@redhat.com>
25908 PR middle-end/82004
25909 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
25910 after vectorization.
25912 2018-02-20 Martin Liska <mliska@suse.cz>
25915 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
25916 possible values if we don't have a hint.
25918 2018-02-20 Martin Liska <mliska@suse.cz>
25922 * final.c (shorten_branches): Build align_tab array with one
25924 * opts.c (finish_options): Add alignment option limit check.
25925 (MAX_CODE_ALIGN): Likewise.
25926 (MAX_CODE_ALIGN_VALUE): Likewise.
25927 * doc/invoke.texi: Document maximum allowed option value for
25928 all -falign-* options.
25930 2018-02-19 Jakub Jelinek <jakub@redhat.com>
25933 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
25934 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
25935 * var-tracking.c (emit_note_insn_var_location): Remove all references
25936 to NOTE_INSN_CALL_ARG_LOCATION.
25937 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
25938 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
25939 Use copy_rtx_if_shared.
25940 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
25941 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
25942 (dwarf2out_var_location): Remove handling of
25943 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
25945 * final.c (final_scan_insn): Remove all references to
25946 NOTE_INSN_CALL_ARG_LOCATION.
25947 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
25948 before dumping final insns.
25949 * except.c (emit_note_eh_region_end): Remove all references to
25950 NOTE_INSN_CALL_ARG_LOCATION.
25951 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
25952 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
25953 * config/arc/arc.c (hwloop_optimize): Likewise.
25954 * config/arm/arm.c (create_fix_barrier): Likewise.
25955 * config/s390/s390.c (s390_chunkify_start): Likewise.
25956 * config/sh/sh.c (find_barrier): Likewise.
25957 * config/i386/i386.c (rest_of_insert_endbranch,
25958 ix86_seh_fixup_eh_fallthru): Likewise.
25959 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
25960 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
25961 * config/frv/frv.c (frv_function_prologue): Likewise.
25962 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
25964 (note_outside_basic_block_p): Remove all references to
25965 NOTE_INSN_CALL_ARG_LOCATION.
25966 * gengtype.c (adjust_field_rtx_def): Likewise.
25967 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
25969 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
25970 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
25973 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
25976 PR tree-optimization/84452
25977 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
25978 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
25981 2018-02-19 Martin Liska <mliska@suse.cz>
25984 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
25986 2018-02-19 Martin Liska <mliska@suse.cz>
25987 Richard Sandiford <richard.sandiford@linaro.org>
25989 PR tree-optimization/82491
25990 * gimple-fold.c (get_base_constructor): Make earlier bail out
25993 2018-02-19 Carl Love <cel@us.ibm.com>
25995 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
25996 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
25998 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
25999 P8V_BUILTIN_VEC_NEG.
26001 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
26003 * config/rl78/rl78.md (movdf): New define expand.
26005 2018-02-19 Martin Liska <mliska@suse.cz>
26008 * doc/invoke.texi: Fix typo.
26009 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
26011 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
26013 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
26014 handle rs6000_single_float and rs6000_double_float specially for
26017 2018-02-16 Jeff Law <law@redhat.com>
26019 * config/rx/rx.c (add_pop_cfi_notes): New function.;
26020 (pop_regs): Use it.
26022 2018-02-16 Jakub Jelinek <jakub@redhat.com>
26025 * ipa-inline.c (inline_small_functions): Fix a typo.
26027 2018-02-16 Nathan Sidwell <nathan@acm.org>
26029 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
26031 2018-02-16 Carl Love <cel@us.ibm.com>
26033 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
26034 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
26035 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
26036 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
26037 expansion to P8V_BUILTIN_VEC_FLOAT2.
26039 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
26041 PR rtl-optimization/70023
26042 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
26043 src_regno into account.
26045 2018-02-16 Carl Love <cel@us.ibm.com>
26047 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
26048 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
26049 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
26050 * config/rs6000/rs6000.c: Remove case statements for
26051 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
26052 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
26053 and P9V_BUILTIN_VEC_VINSERT4B.
26054 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
26055 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
26056 * config/rs6000/vsx.md:
26057 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
26060 2018-02-16 Carl Love <cel@us.ibm.com>
26062 * config/rs6000/altivec.h: Add builtin names vec_extract4b
26064 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
26066 * config/rs6000/rs6000-c.c: Add the definitions for
26067 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
26068 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
26069 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
26070 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
26071 definition for insert4b and define insn *insert3b_internal.
26072 * doc/extend.texi: Add documentation for vec_extract4b.
26074 2018-02-16 Nathan Sidwell <nathan@acm.org>
26076 * doc/extend.texi (Backwards Compatibility): Mention friend
26077 injection. Note for-scope is deprecated.
26078 * doc/invoke.texi (-ffriend-injection): Deprecate.
26080 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
26082 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
26083 that moved to I2, also allow destinations that are a paradoxical
26084 subreg (instead of a normal reg).
26086 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
26089 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
26092 2018-02-16 Richard Biener <rguenther@suse.de>
26094 PR tree-optimization/84037
26095 PR tree-optimization/84016
26097 * config/i386/i386.c (ix86_builtin_vectorization_cost):
26098 Adjust vec_construct for the fact we need additional higher latency
26099 128bit inserts for AVX256 and AVX512 vector builds.
26100 (ix86_add_stmt_cost): Scale vector construction cost for
26103 2018-02-16 Richard Biener <rguenther@suse.de>
26105 PR tree-optimization/84417
26106 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
26107 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
26108 (non_rewritable_lvalue_p): Likewise, use poly-ints.
26110 2018-02-16 Martin Liska <mliska@suse.cz>
26113 * internal-fn.def (ASAN_CHECK): Set proper flags.
26114 (ASAN_MARK): Likewise.
26116 2018-02-16 Julia Koval <julia.koval@intel.com>
26118 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
26119 from PTA_CANNONLAKE.
26121 2018-02-16 Jakub Jelinek <jakub@redhat.com>
26124 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
26125 Use ++iter rather than iter++ for std::list iterators.
26126 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
26127 defer deleting them until all nodes in the forest are processed. Do
26128 free even leaf nodes. Change to_process into auto_vec.
26131 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
26132 * vec.h (vec_default_construct): Use memset instead of placement new
26133 if BROKEN_VALUE_INITIALIZATION is defined.
26134 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
26135 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
26138 PR rtl-optimization/83723
26139 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
26140 * lra.c (lra_substitute_pseudo): Likewise. If true, use
26141 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
26143 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
26145 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
26147 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
26149 PR rtl-optimization/81443
26150 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
26151 from inner REGs to paradoxical SUBREGs.
26153 2018-02-16 Richard Biener <rguenther@suse.de>
26155 PR tree-optimization/84399
26156 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
26157 For operands we can analyze at their definition make sure we can
26158 analyze them at each use as well.
26160 2018-02-16 Richard Biener <rguenther@suse.de>
26162 PR tree-optimization/84190
26163 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
26164 volatile accesses if the decl isn't volatile.
26166 2018-02-15 Jason Merrill <jason@redhat.com>
26168 PR c++/84314 - ICE with templates and fastcall attribute.
26169 * attribs.c (build_type_attribute_qual_variant): Don't clobber
26170 TYPE_CANONICAL on an existing type.
26172 2018-02-15 Jakub Jelinek <jakub@redhat.com>
26174 PR tree-optimization/84383
26175 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
26176 dstoff nor call operand_equal_p if dstbase is NULL.
26178 PR tree-optimization/84334
26179 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
26180 also a CONSTANT_CLASS_P, punt.
26182 2018-02-14 Jim Wilson <jimw@sifive.com>
26184 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
26185 first SMALL_OPERAND check. New local min_second_step. Move assert
26186 to where locals are set. Add TARGET_RVC support.
26187 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
26189 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
26191 * doc/invoke.texi: Correct -Wformat-overflow code sample.
26193 2018-02-14 Martin Sebor <msebor@redhat.com>
26195 PR tree-optimization/83698
26196 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
26197 arrays constrain the offset range to their bounds.
26198 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
26199 (builtin_access::overlap): Avoid setting the size of overlap if it's
26201 (maybe_diag_overlap): Also consider arrays when deciding what values
26202 of offsets to include in diagnostics.
26204 2018-02-14 Martin Sebor <msebor@redhat.com>
26207 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
26208 that correspond to the kind of a declaration.
26210 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
26213 * config/pa/pa.md: Load address of PIC label using the linkage table
26214 if the label is nonlocal.
26216 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
26218 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
26219 warning message if user requests -maltivec=be.
26220 * doc/invoke.texi: Document deprecation of -maltivec=be.
26222 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
26225 * config/rs6000/rs6000-c.c: Update definitions for
26226 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
26227 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
26229 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
26232 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
26233 add _get_ssp intrinsics. Remove argument from
26234 __builtin_ia32_rdssp[d|q].
26235 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
26236 * config/i386/i386-builtin.def: Remove argument from
26237 __builtin_ia32_rdssp[d|q].
26238 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
26239 ix86_expand_special_args_builtin for _rdssp[d|q].
26240 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
26241 Clear register before usage.
26242 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
26243 Add documentation for new _get_ssp and _inc_ssp intrinsics.
26245 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
26247 PR tree-optimization/84357
26248 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
26249 operand 1 of an ARRAY_REF too.
26251 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
26254 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
26255 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
26257 (set_of_reg): New struct.
26258 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
26259 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
26260 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
26262 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
26263 Split into bitclr, bitset, bitinvert patterns if appropriate.
26264 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
26265 use rx_fuse_in_memory_bitop.
26266 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
26267 to named insn, correct maximum insn length.
26269 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
26272 * machmode.def: Define a complex mode for PARTIAL_INT.
26273 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
26275 * doc/rtl.texi: Document CSPImode.
26276 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
26278 (msp430_hard_regno_nregs_with_padding): Likewise.
26280 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
26283 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
26285 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
26287 PR rtl-optimization/84169
26288 * combine.c (try_combine): New variable split_i2i3. Set it to true if
26289 we generated a parallel as new i3 and we split that to new i2 and i3
26290 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
26291 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
26292 those to i2, not i1. Partially rewrite this scan code.
26294 2018-02-13 Jakub Jelinek <jakub@redhat.com>
26297 * stor-layout.c (place_field): For variable length fields, adjust
26298 offset_align afterwards not just based on the field's alignment,
26299 but also on the size.
26301 PR middle-end/84309
26302 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
26303 of exps and logs in the use_exp2 case.
26305 2018-02-13 Jeff Law <law@redhat.com>
26307 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
26308 entry for "vector".
26310 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
26313 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
26317 * common.opt (gas-loc-support, gas-locview-support): New.
26318 (ginline-points, ginternal-reset-location-views): New.
26319 * doc/invoke.texi: Document them. Use @itemx where intended.
26320 (gvariable-location-views): Adjust.
26321 * target.def (reset_location_view): New.
26322 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
26323 (TARGET_RESET_LOCATION_VIEW): New.
26324 * doc/tm.texi: Rebuilt.
26325 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
26326 (dwarf2out_default_as_locview_support): New.
26327 (output_asm_line_debug_info): Use option variables.
26328 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
26329 (output_loc_list): Likewise.
26330 (add_high_low_attributes): Check option variables.
26331 Don't output entry view attribute in strict mode.
26332 (gen_inlined_subroutine_die): Check option variables.
26333 (dwarf2out_inline_entry): Likewise.
26334 (init_sections_and_labels): Likewise.
26335 (dwarf2out_early_finish): Likewise.
26336 (maybe_reset_location_view): New, from...
26337 (dwarf2out_var_location): ... here. Call it.
26338 * debug.h (dwarf2out_default_as_loc_support): Declare.
26339 (dwarf2out_default_as_locview_support): Declare.
26340 * hooks.c (hook_int_rtx_insn_0): New.
26341 * hooks.h (hook_int_rtx_insn_0): Declare.
26342 * toplev.c (process_options): Take -gas-loc-support and
26343 -gas-locview-support from dwarf2out. Enable
26344 -gvariable-location-views by default only with locview
26345 assembler support. Enable -ginternal-reset-location-views by
26346 default only if the target defines the corresponding hook.
26347 Enable -ginline-points by default if location views are
26348 enabled; force it disabled if statement frontiers are
26350 * tree-inline.c (expand_call_inline): Check option variables.
26351 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
26353 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
26355 PR tree-optimization/84321
26356 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
26357 handling. Also check whether the anti-range contains any values
26358 that satisfy the mask; switch to a VR_RANGE if not.
26360 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
26363 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
26365 2018-02-13 Martin Jambor <mjambor@suse.cz>
26368 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
26369 of call statements, also set location of a load to a temporary.
26371 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
26373 * config/rl78/rl78.c (add_vector_labels): New function.
26374 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
26375 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
26376 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
26377 which checks that no arguments are passed.
26378 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
26379 * doc/extend.texi: Documentation for the new attribute.
26381 2018-02-13 Andreas Schwab <schwab@suse.de>
26383 * config/riscv/linux.h (CPP_SPEC): Define.
26385 2018-02-13 Jakub Jelinek <jakub@redhat.com>
26388 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
26389 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
26390 OPTION_MASK_ISA_AES as first argument to def_builtin_const
26391 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
26392 instead of OPTION_MASK_ISA_PCLMUL as first argument to
26393 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
26394 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
26395 temporarily for AES and PCLMUL builtins.
26397 PR tree-optimization/84339
26398 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
26399 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
26402 PR middle-end/84309
26403 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
26404 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
26405 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
26407 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
26409 * omp-simd-clone.h: New file.
26410 * omp-simd-clone.c: Include omp-simd-clone.h.
26411 (expand_simd_clones): No longer static.
26412 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
26413 cgraph.h and omp-simd-clone.h.
26414 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
26415 (vect_recog_widen_shift_pattern): Formatting fix.
26416 (vect_pattern_recog_1): Don't check optab for calls.
26419 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
26420 operands[2] into a REG before using gen_lowpart on it.
26422 2018-02-12 Jeff Law <law@redhat.com>
26425 * config/sh/sh.c (find_barrier): Consider a sibling call
26428 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
26429 successfully back substituting a reg.
26431 2018-02-12 Richard Biener <rguenther@suse.de>
26433 PR tree-optimization/84037
26434 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
26435 parameter, move visited init to caller.
26436 (vect_slp_analyze_operations): Separate cost from validity
26437 check, initialize visited once for all instances.
26438 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
26440 * tree-vect-stmts.c (vect_model_simple_cost): Make early
26442 (vect_model_promotion_demotion_cost): Likewise.
26443 (vectorizable_bswap): Guard cost modeling with !slp_node
26444 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
26446 (vectorizable_call): Likewise.
26447 (vectorizable_conversion): Likewise.
26448 (vectorizable_assignment): Likewise.
26449 (vectorizable_shift): Likewise.
26450 (vectorizable_operation): Likewise.
26451 (vectorizable_store): Likewise.
26452 (vectorizable_load): Likewise.
26453 (vectorizable_condition): Likewise.
26454 (vectorizable_comparison): Likewise.
26456 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
26459 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
26460 (ASAN_MARK): Fix fnspec to account for return value, change pointer
26461 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
26463 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
26465 PR middle-end/83665
26466 * params.def (inline-min-speedup): Increase from 8 to 15.
26467 (max-inline-insns-auto): Decrease from 40 to 30.
26468 * ipa-split.c (consider_split): Add some buffer for function to
26469 be considered inlining candidate.
26470 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
26473 2018-02-12 Richard Biener <rguenther@suse.de>
26475 PR tree-optimization/84037
26476 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
26477 matched stmts if we cannot swap the non-matched ones.
26479 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
26481 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
26482 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
26483 _mm_maskz_scalef_round_ss): New intrinsics.
26484 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
26485 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
26486 __builtin_ia32_scalefss_round): Remove.
26487 (__builtin_ia32_scalefsd_mask_round,
26488 __builtin_ia32_scalefss_mask_round): New intrinsics.
26489 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
26490 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
26491 ((match_operand:VF_128 2 "<round_nimm_predicate>"
26492 "<round_constraint>")): Changed to ...
26493 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
26494 "<round_scalar_constraint>")): ... this.
26495 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
26496 %0, %1, %2<round_op3>}"): Changed to ...
26497 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
26498 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
26499 %2<round_scalar_mask_op3>}"): ... this.
26500 * config/i386/subst.md (round_scalar_nimm_predicate): New.
26502 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
26504 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
26505 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
26506 (_mm_maskz_sqrt_round_ss): New intrinsics.
26507 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
26508 (__builtin_ia32_sqrtsd_mask_round)
26509 (__builtin_ia32_sqrtss_mask_round): New builtins.
26510 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
26511 (__builtin_ia32_sqrtss_round): Remove.
26512 (__builtin_ia32_sqrtsd_mask_round)
26513 (__builtin_ia32_sqrtss_mask_round): New builtins.
26514 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
26515 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
26516 ((match_operand:VF_128 1 "vector_operand"
26517 "xBm,<round_constraint>")): Changed to ...
26518 ((match_operand:VF_128 1 "vector_operand"
26519 "xBm,<round_scalar_constraint>")): ... this.
26520 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
26521 %0, %2, %<iptr>1<round_op3>}): Changed to ...
26522 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
26523 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
26524 %<iptr>1<round_scalar_mask_op3>}): ... this.
26525 ((set_attr "prefix" "<round_prefix>")): Changed to ...
26526 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
26528 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
26531 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
26532 Cast vec_cmpeq result to correct type.
26533 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
26534 Cast vec_cmpgt result to correct type.
26536 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
26538 * final.c (final_scan_insn_1): Renamed from...
26539 (final_scan_insn): ... this. New wrapper, to recover
26540 seen from the outermost call in recursive ones.
26541 * config/sparc/sparc.c (output_return): Drop seen from call.
26542 (output_sibcall): Likewise.
26543 * config/visium/visium.c (output_branch): Likewise.
26545 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
26547 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
26550 2018-02-10 Alan Modra <amodra@gmail.com>
26553 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
26554 Specify LR as an input.
26556 2018-02-10 Jakub Jelinek <jakub@redhat.com>
26559 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
26560 remove_member_access_dummy_vars): New functions.
26561 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
26562 lower_omp_1, execute_lower_omp): Use them.
26564 PR rtl-optimization/84308
26565 * shrink-wrap.c (spread_components): Release todo vector.
26567 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
26569 PR rtl-optimization/57193
26570 * ira-color.c (struct allocno_color_data): Add member
26571 conflict_allocno_hard_prefs.
26572 (update_conflict_allocno_hard_prefs): New.
26573 (bucket_allocno_compare_func): Add a preference based on
26574 conflict_allocno_hard_prefs.
26575 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
26576 (color_allocnos): Remove a dead code. Initiate
26577 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
26579 2018-02-09 Jakub Jelinek <jakub@redhat.com>
26582 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
26583 constraint from =wa to wa. Avoid a subreg on the output operand,
26584 instead use a pseudo and subreg it in a move.
26585 (p9_xxbrd_<mode>): Changed to ...
26586 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
26587 (p9_xxbrd_v2df): New expander.
26588 (p9_xxbrw_<mode>): Changed to ...
26589 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
26590 (p9_xxbrw_v4sf): New expander.
26592 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
26594 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
26596 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
26599 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
26600 multiply in 32-bit mode.
26601 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
26602 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
26605 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
26607 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
26608 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
26609 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
26610 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
26612 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
26615 * dwarf2out.c (is_trivial_indirect_ref): New function.
26616 (dwarf2out_late_global_decl): Do not generate a location
26617 attribute for variables that have a non-trivial DECL_VALUE_EXPR
26618 and that are not defined in the current unit.
26620 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
26622 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
26623 instead of a libcall for UNORDERED.
26625 2018-02-09 Tamar Christina <tamar.christina@arm.com>
26628 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
26629 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
26631 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
26634 * config/s390/s390.c (s390_set_current_function): Invoke
26635 s390_indirect_branch_settings also if fndecl didn't change.
26637 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
26639 * config/rs6000/rs6000.md (blockage): Set length to zero.
26641 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
26643 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
26645 2018-02-09 Jakub Jelinek <jakub@redhat.com>
26648 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
26649 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
26653 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
26654 PARALLEL incoming that failed vt_get_decl_and_offset check.
26656 PR middle-end/84237
26657 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
26658 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
26660 (get_variable_section): For decls in named .bss* sections pass true as
26661 second argument to bss_initializer_p.
26663 2018-02-09 Marek Polacek <polacek@redhat.com>
26664 Jakub Jelinek <jakub@redhat.com>
26667 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
26668 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
26669 Sync some changes from cxx_fold_indirect_ref.
26671 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
26673 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
26675 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
26676 (BLOCK_INLINE_ENTRY_LABEL): New.
26677 (dwarf2out_var_location): Disregard inline entry markers.
26678 (inline_entry_data): New struct.
26679 (inline_entry_data_hasher): New hashtable type.
26680 (inline_entry_data_hasher::hash): New.
26681 (inline_entry_data_hasher::equal): New.
26682 (inline_entry_data_table): New variable.
26683 (add_high_low_attributes): Add DW_AT_entry_pc and
26684 DW_AT_GNU_entry_view attributes if a pending entry is found
26685 in inline_entry_data_table. Add old entry_pc attribute only
26686 if debug nonbinding markers are disabled.
26687 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
26688 markers are enabled.
26689 (block_within_block_p, dwarf2out_inline_entry): New.
26690 (dwarf2out_finish): Check that no entries remained in
26691 inline_entry_data_table.
26692 * final.c (reemit_insn_block_notes): Handle inline entry notes.
26693 (final_scan_insn, notice_source_line): Likewise.
26694 (rest_of_clean_state): Skip inline entry markers.
26695 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
26697 * gimple.c (gimple_build_debug_inline_entry): New.
26698 * gimple.h (enum gimple_debug_subcode): Add
26699 GIMPLE_DEBUG_INLINE_ENTRY.
26700 (gimple_build_debug_inline_entry): Declare.
26701 (gimple_debug_inline_entry_p): New.
26702 (gimple_debug_nonbind_marker_p): Adjust.
26703 * insn-notes.def (INLINE_ENTRY): New.
26704 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
26705 inline entry marker notes.
26706 (print_insn): Likewise.
26707 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
26708 (INSN_DEBUG_MARKER_KIND): Likewise.
26709 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
26710 * tree-inline.c (expand_call_inline): Build and insert
26711 debug_inline_entry stmt.
26712 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
26713 inline entry blocks early, if nonbind markers are enabled.
26714 (dump_scope_block): Dump fragment info.
26715 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
26716 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
26717 (gimple_build_debug_inline_entry): New.
26718 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
26719 Enable/disable inline entry points too.
26720 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
26721 (DEBUG_INSN): Describe inline entry markers.
26723 * common.opt (gvariable-location-views): New.
26724 (gvariable-location-views=incompat5): New.
26725 * config.in: Rebuilt.
26726 * configure: Rebuilt.
26727 * configure.ac: Test assembler for view support.
26728 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
26729 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
26730 * dwarf2out.c (var_loc_view): New typedef.
26731 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
26732 (dwarf2out_locviews_in_attribute): New.
26733 (dwarf2out_locviews_in_loclist): New.
26734 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
26735 (enum dw_line_info_opcode): Add LI_adv_address.
26736 (struct dw_line_info_table): Add view.
26737 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
26738 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
26739 (zero_view_p): New variable.
26740 (ZERO_VIEW_P): New macro.
26741 (output_asm_line_debug_info): New.
26742 (struct var_loc_node): Add view.
26743 (add_AT_view_list, AT_loc_list): New.
26744 (add_var_loc_to_decl): Add view param. Test it against last.
26745 (new_loc_list): Add view params. Record them.
26746 (AT_loc_list_ptr): Handle loc and view lists.
26747 (view_list_to_loc_list_val_node): New.
26748 (print_dw_val): Handle dw_val_class_view_list.
26749 (size_of_die): Likewise.
26750 (value_format): Likewise.
26751 (loc_list_has_views): New.
26752 (gen_llsym): Set vl_symbol too.
26753 (maybe_gen_llsym, skip_loc_list_entry): New.
26754 (dwarf2out_maybe_output_loclist_view_pair): New.
26755 (output_loc_list): Output view list or entries too.
26756 (output_view_list_offset): New.
26757 (output_die): Handle dw_val_class_view_list.
26758 (output_dwarf_version): New.
26759 (output_compilation_unit_header): Use it.
26760 (output_skeleton_debug_sections): Likewise.
26761 (output_rnglists, output_line_info): Likewise.
26762 (output_pubnames, output_aranges): Update version comments.
26763 (output_one_line_info_table): Output view numbers in asm comments.
26764 (dw_loc_list): Determine current endview, pass it to new_loc_list.
26765 Call maybe_gen_llsym.
26766 (loc_list_from_tree_1): Adjust.
26767 (add_AT_location_description): Create view list attribute if
26768 needed, check it's absent otherwise.
26769 (convert_cfa_to_fb_loc_list): Adjust.
26770 (maybe_emit_file): Call output_asm_line_debug_info for test.
26771 (dwarf2out_var_location): Reset views as needed. Precompute
26772 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
26773 attribute. Set view.
26774 (new_line_info_table): Reset next view.
26775 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
26776 (dwarf2out_source_line): Likewise. Output view resets and labels to
26777 the assembler, or select appropriate line info opcodes.
26778 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
26779 (optimize_string_length): Catch it. Adjust.
26780 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
26781 dw_val_class_view_list, and remove it if no longer needed.
26782 (hash_loc_list): Hash view numbers.
26783 (loc_list_hasher::equal): Compare them.
26784 (optimize_location_lists): Check whether a view list symbol is
26785 needed, and whether the locview attribute is present, and
26786 whether they match. Remove the locview attribute if no longer
26788 (index_location_lists): Call skip_loc_list_entry for test.
26789 (dwarf2out_finish): Call output_asm_line_debug_info for test.
26790 Use output_dwarf_version.
26791 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
26792 (struct dw_val_node): Add val_view_list.
26793 * final.c (SEEN_NEXT_VIEW): New.
26794 (set_next_view_needed): New.
26795 (clear_next_view_needed): New.
26796 (maybe_output_next_view): New.
26797 (final_start_function): Rename to...
26798 (final_start_function_1): ... this. Take pointer to FIRST,
26799 add SEEN parameter. Emit param bindings in the initial view.
26800 (final_start_function): Reintroduce SEEN-less interface.
26801 (final): Rename to...
26802 (final_1): ... this. Take SEEN parameter. Output final pending
26803 next view at the end.
26804 (final): Reintroduce seen-less interface.
26805 (final_scan_insn): Output pending next view before switching
26806 sections or ending a block. Mark the next view as needed when
26807 outputting variable locations. Notify debug backend of section
26808 changes, and of location view changes.
26809 (rest_of_handle_final): Adjust.
26810 * toplev.c (process_options): Autodetect value for debug variable
26811 location views option. Warn on incompat5 without -gdwarf-5.
26812 * doc/invoke.texi (gvariable-location-views): New.
26813 (gvariable-location-views=incompat5): New.
26814 (gno-variable-location-views): New.
26816 2018-02-08 David Malcolm <dmalcolm@redhat.com>
26818 PR tree-optimization/84136
26819 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
26820 that the result of find_edge is non-NULL.
26822 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
26825 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
26826 storing integer register in SImode. Fix cost of 256 and 512
26827 byte aligned SSE register store.
26829 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
26831 * config/i386/i386.c (ix86_multiplication_cost): Fix
26832 multiplication cost for TARGET_AVX512DQ.
26834 2018-02-08 Marek Polacek <polacek@redhat.com>
26836 PR tree-optimization/84238
26837 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
26840 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
26842 PR tree-optimization/84265
26843 * tree-vect-stmts.c (vectorizable_store): Don't treat
26844 VMAT_CONTIGUOUS accesses as grouped.
26845 (vectorizable_load): Likewise.
26847 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
26849 PR tree-optimization/81635
26850 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
26851 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
26852 (test_round_for_mask): New functions.
26853 (wide_int_cc_tests): Call test_round_for_mask.
26854 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
26855 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
26856 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
26857 range returned by get_range_info.
26859 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
26862 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
26863 * symtab.c: Include builtins.h
26864 (symtab_node::output_to_lto_symbol_table_p): Move here
26865 from lto-streamer-out.c:output_symbol_p.
26866 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
26867 (output_symbol_p): Move all logic to symtab.c
26868 (produce_symtab): Update.
26870 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
26872 * config/s390/s390-opts.h (enum indirect_branch): Define.
26873 * config/s390/s390-protos.h (s390_return_addr_from_memory)
26874 (s390_indirect_branch_via_thunk)
26875 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
26876 (enum s390_indirect_branch_type): Define.
26877 * config/s390/s390.c (struct s390_frame_layout, struct
26878 machine_function): Remove.
26879 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
26880 (indirect_branch_table_label_no, indirect_branch_table_name):
26882 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
26883 (enum s390_indirect_branch_option): Define.
26884 (s390_return_addr_from_memory): New function.
26885 (s390_handle_string_attribute): New function.
26886 (s390_attribute_table): Add new attribute handler.
26887 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
26888 (s390_indirect_branch_via_thunk): New function.
26889 (s390_indirect_branch_via_inline_thunk): New function.
26890 (s390_function_ok_for_sibcall): When jumping via thunk disallow
26891 sibling call optimization for non z10 compiles.
26892 (s390_emit_call): Force indirect branch target to be a single
26893 register. Add r1 clobber for non-z10 compiles.
26894 (s390_emit_epilogue): Emit return jump via return_use expander.
26895 (s390_reorg): Handle JUMP_INSNs as execute targets.
26896 (s390_option_override_internal): Perform validity checks for the
26897 new command line options.
26898 (s390_indirect_branch_attrvalue): New function.
26899 (s390_indirect_branch_settings): New function.
26900 (s390_set_current_function): Invoke s390_indirect_branch_settings.
26901 (s390_output_indirect_thunk_function): New function.
26902 (s390_code_end): Implement target hook.
26903 (s390_case_values_threshold): Implement target hook.
26904 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
26906 * config/s390/s390.h (struct s390_frame_layout)
26907 (struct machine_function): Move here from s390.c.
26908 (TARGET_INDIRECT_BRANCH_NOBP_RET)
26909 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
26910 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
26911 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
26912 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
26913 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
26914 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
26915 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
26916 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
26917 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
26918 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
26919 (mnemonic attribute): Add values which aren't recognized
26921 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
26922 pattern for branch conversion. Fix mnemonic attribute.
26923 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
26924 indirect branch via thunk if requested.
26925 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
26926 ("*indirect_jump"): Disable for branch conversion using out of
26928 ("indirect_jump_via_thunk<mode>_z10")
26929 ("indirect_jump_via_thunk<mode>")
26930 ("indirect_jump_via_inlinethunk<mode>_z10")
26931 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
26932 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
26933 ("casesi_jump_via_inlinethunk<mode>_z10")
26934 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
26935 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
26936 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
26937 ("*indirect2_jump"): Disable for branch conversion.
26938 ("casesi_jump"): Turn into expander and expand patterns for branch
26940 ("return_use"): New expander.
26941 ("*return"): Emit return via thunk and rename it to ...
26942 ("*return<mode>"): ... this one.
26943 * config/s390/s390.opt: Add new options and and enum for the
26946 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
26948 * lra-constraints.c (match_reload): Unconditionally use
26949 gen_lowpart_SUBREG, rather than selecting between that
26950 and equivalent gen_rtx_SUBREG code.
26952 2018-02-08 Richard Biener <rguenther@suse.de>
26954 PR tree-optimization/84233
26955 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
26956 changed flag instead of boguously re-using phi_inserted.
26958 2018-02-08 Martin Jambor <mjambor@suse.cz>
26960 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
26961 static local variables.
26963 2018-02-08 Richard Biener <rguenther@suse.de>
26965 PR tree-optimization/84278
26966 * tree-vect-stmts.c (vectorizable_store): When looking for
26967 smaller vector types to perform grouped strided loads/stores
26968 make sure the mode is supported by the target.
26969 (vectorizable_load): Likewise.
26971 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
26973 * config/aarch64/aarch64.c (aarch64_components_for_bb):
26974 Increase LDP/STP opportunities by adding adjacent callee-saves.
26976 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
26978 PR rtl-optimization/84068
26979 PR rtl-optimization/83459
26980 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
26982 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
26984 PR tree-optimization/84224
26985 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
26986 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
26987 non-zero arguments.
26989 2018-02-07 Iain Sandoe <iain@codesourcery.com>
26992 * config/rs6000/altivec.md (*restore_world): Remove LR use.
26993 * config/rs6000/predicates.md (restore_world_operation): Adjust op
26994 count, remove one USE.
26996 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
26998 * doc/install.texi (Configuration): Document the
26999 --with-long-double-format={ibm,ieee} PowerPC configuration
27003 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
27004 Convert from define_expand to be define_insn_and_split. Rework
27005 float/double/_Float128 conversions to QI/HI/SImode to work with
27006 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
27007 conversions to QI/HImode types did a store and then a load to
27008 truncate the value. For conversions to VSX registers, don't split
27009 the insn, instead emit the code directly. Use the code iterator
27010 any_fix to combine signed and unsigned conversions.
27011 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
27012 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
27013 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
27014 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
27015 (fix_<mode>di2_hw): Likewise.
27016 (fixuns_<mode>di2_hw): Likewise.
27017 (fix_<mode>si2_hw): Likewise.
27018 (fixuns_<mode>si2_hw): Likewise.
27019 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
27020 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
27021 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
27022 fix<uns>_trunc<SFDF:mode>si2_p8.
27023 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
27024 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
27025 (fix<uns>_<mode>_mem): Likewise.
27026 (fctiw<u>z_<mode>_mem): Likewise.
27027 (fix<uns>_<mode>_mem): Likewise.
27028 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
27029 the register allocator from doing a direct move to the GPRs to do
27030 a store, and instead use the ISA 3.0 store byte/half-word from
27031 vector register instruction. For IEEE 128-bit floating point,
27032 also optimize stores of 32-bit ints.
27033 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
27035 2018-02-07 Alan Hayward <alan.hayward@arm.com>
27037 * genextract.c (push_pathstr_operand): New function to support
27039 (walk_rtx): Call push_pathstr_operand.
27040 (print_path): Support [a-zA-Z].
27042 2018-02-07 Richard Biener <rguenther@suse.de>
27044 PR tree-optimization/84037
27045 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
27046 (cse_and_gimplify_to_preheader): Declare.
27047 (vect_get_place_in_interleaving_chain): Likewise.
27048 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
27050 (_loop_vec_info::~_loop_vec_info): Delete it.
27051 (cse_and_gimplify_to_preheader): New function.
27052 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
27053 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
27054 (vectorizable_load): Likewise. For grouped stores always base
27055 the IV on the first element.
27056 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
27057 condition before gimplifying.
27059 2018-02-07 Jakub Jelinek <jakub@redhat.com>
27061 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
27062 *DIV_EXPR and *MOD_EXPR.
27064 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
27067 * config/i386/i386.c (ix86_option_override_internal): Mask out
27068 the CF_SET bit when checking -fcf-protection.
27070 2018-02-07 Tom de Vries <tom@codesourcery.com>
27073 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
27076 2018-02-07 Richard Biener <rguenther@suse.de>
27078 PR tree-optimization/84204
27079 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
27082 PR tree-optimization/84205
27083 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
27084 special-case isl_ast_op_zdiv_r.
27086 PR tree-optimization/84223
27087 * graphite-scop-detection.c (gather_bbs::before_dom_children):
27088 Only add conditions from within the region.
27089 (gather_bbs::after_dom_children): Adjust.
27091 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
27094 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
27095 * config/avr/avr.md: Only post-reload split REG-REG moves if
27096 either register is GENERAL_REG_P.
27098 2018-02-07 Jakub Jelinek <jakub@redhat.com>
27100 PR tree-optimization/84235
27101 * tree-ssa-scopedtables.c
27102 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
27103 if the subtraction is performed in floating point type where NaNs are
27104 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
27105 build 1. Formatting fix.
27107 2018-02-06 Jakub Jelinek <jakub@redhat.com>
27110 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
27111 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
27112 and skip it regardless of bb boundaries. Use CALL_P macro,
27113 don't test INSN_P (insn) together with CALL_P or JUMP_P check
27114 unnecessarily, formatting fix.
27116 2018-02-06 Michael Collison <michael.collison@arm.com>
27118 * config/arm/thumb2.md:
27119 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
27120 (*thumb_mov_notscc): Ditto.
27122 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
27125 * config/rs6000/rs6000.md (su code attribute): Use "u" for
27126 unsigned_fix, not "s".
27128 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
27130 * configure.ac (gcc_fn_eh_frame_ro): New function.
27131 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
27132 correct .eh_frame permissions.
27133 * configure: Regenerate.
27135 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
27137 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
27138 irrelevant options.
27140 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
27142 * config/rs6000/rs6000.c (rs6000_option_override_internal):
27143 Display warning message for -mno-speculate-indirect-jumps.
27145 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
27147 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
27149 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
27151 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
27153 PR tree-optimization/84225
27154 * tree-eh.c (find_trapping_overflow): Only call
27155 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
27157 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
27160 * config/i386/i386.c: Reimplement the check of possible options
27161 -mibt/-mshstk conbination. Change error messages.
27162 * doc/invoke.texi: Fix a typo: remove extra '='.
27164 2018-02-06 Marek Polacek <polacek@redhat.com>
27166 PR tree-optimization/84228
27167 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
27169 2018-02-06 Tamar Christina <tamar.christina@arm.com>
27172 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
27173 emitted arch directives.
27174 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
27175 __ARM_FEATURE_COPROC before changing architectures.
27177 2018-02-06 Richard Biener <rguenther@suse.de>
27179 * config/i386/i386.c (print_reg): Fix typo.
27180 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
27182 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
27184 * configure: Regenerate.
27186 2018-02-05 Martin Sebor <msebor@redhat.com>
27188 PR tree-optimization/83369
27189 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
27192 2018-02-05 Martin Liska <mliska@suse.cz>
27194 * doc/invoke.texi: Cherry-pick upstream r323995.
27196 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
27198 * ira.c (ira_init_register_move_cost): Adjust comment.
27200 2018-02-05 Martin Liska <mliska@suse.cz>
27202 PR gcov-profile/84137
27203 * doc/gcov.texi: Fix typo in documentation.
27205 2018-02-05 Martin Liska <mliska@suse.cz>
27207 PR gcov-profile/83879
27208 * doc/gcov.texi: Document necessity of --dynamic-list-data when
27209 using dlopen functionality.
27211 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
27213 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
27214 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
27215 _mm_maskz_range_ss, _mm_mask_range_round_ss,
27216 _mm_maskz_range_round_ss): New intrinsics.
27217 (__builtin_ia32_rangesd128_round)
27218 (__builtin_ia32_rangess128_round): Remove.
27219 (__builtin_ia32_rangesd128_mask_round,
27220 __builtin_ia32_rangess128_mask_round): New builtins.
27221 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
27222 __builtin_ia32_rangess128_round): Remove.
27223 (__builtin_ia32_rangesd128_mask_round,
27224 __builtin_ia32_rangess128_mask_round): New builtins.
27225 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
27226 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
27227 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
27228 "<round_saeonly_constraint>")): Changed to ...
27229 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
27230 "<round_saeonly_scalar_constraint>")): ... this.
27231 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
27232 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
27233 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
27234 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
27235 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
27237 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
27239 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
27241 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
27242 Remove all values except native, 8540 and 8548.
27244 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
27246 * config/i386/i386.c (ix86_output_function_return): Pass
27247 INVALID_REGNUM, instead of -1, as invalid register number to
27248 indirect_thunk_name and output_indirect_thunk.
27250 2018-02-02 Julia Koval <julia.koval@intel.com>
27252 * config.gcc: Add -march=icelake.
27253 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
27254 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
27255 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
27256 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
27257 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
27258 (processor_target_table): Add icelake.
27259 (ix86_option_override_internal): Handle new PTAs.
27260 (get_builtin_code_for_version): Handle icelake.
27261 (M_INTEL_COREI7_ICELAKE): New.
27262 (fold_builtin_cpu): Handle icelake.
27263 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
27264 * doc/invoke.texi: Add -march=icelake.
27266 2018-02-02 Julia Koval <julia.koval@intel.com>
27268 * config/i386/i386.c (ix86_option_override_internal): Change flags type
27269 to wide_int_bitmask.
27270 * wide-int-bitmask.h: New.
27272 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
27275 * config/i386/i386.md: Replace Pmode with word_mode in
27276 builtin_setjmp_setup and builtin_longjmp to support x32.
27278 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
27282 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
27284 (rs6000_supported_cpu_names): New static variable.
27285 (linux_cpu_translation_table): Likewise.
27286 (elf_platform) <cpu>: Define new static variable and use it.
27287 Translate kernel AT_PLATFORM name to canonical name if needed.
27288 Error if platform name is unknown.
27290 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
27293 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
27295 2018-02-01 Jeff Law <law@redhat.com>
27298 * config/i386/i386.c (release_scratch_register_on_entry): Add new
27299 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
27300 the scratch if RELEASE_VIA_POP is false.
27301 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
27302 If we have to save a temporary register, decrement SIZE appropriately.
27303 Pass new arguments to release_scratch_register_on_entry.
27304 (ix86_adjust_stack_and_probe): Likewise.
27305 (ix86_emit_probe_stack_range): Pass new arguments to
27306 release_scratch_register_on_entry.
27308 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
27310 PR rtl-optimization/84157
27311 * combine.c (change_zero_ext): Use REG_P predicate in
27312 front of HARD_REGISTER_P predicate.
27314 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
27316 * config/avr/avr.c (avr_option_override): Move disabling of
27317 -fdelete-null-pointer-checks to...
27318 * common/config/avr/avr-common.c (avr_option_optimization_table):
27321 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
27323 PR tree-optimization/81635
27324 * tree-data-ref.c (split_constant_offset_1): For types that
27325 wrap on overflow, try to use range info to prove that wrapping
27328 2018-02-01 Renlin Li <renlin.li@arm.com>
27331 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
27332 TAILCALL_ADDR_REGS.
27333 (aarch64_register_move_cost): Likewise.
27334 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
27335 TAILCALL_ADDR_REGS.
27336 (REG_CLASS_NAMES): Likewise.
27337 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
27338 TAILCALL_ADDR_REGS. Remove IP registers.
27339 * config/aarch64/aarch64.md (Ucs): Update register constraint.
27341 2018-02-01 Richard Biener <rguenther@suse.de>
27343 * domwalk.h (dom_walker::dom_walker): Add additional constructor
27344 for specifying RPO order and allow NULL for that.
27345 * domwalk.c (dom_walker::dom_walker): Likewise.
27346 (dom_walker::walk): Handle NULL RPO order.
27347 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
27349 (rewrite_update_dom_walker): Likewise.
27350 (mark_def_dom_walker): Likewise.
27352 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
27354 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
27355 (aarch64_maybe_expand_sve_subreg_move): Declare.
27356 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
27357 * config/aarch64/predicates.md (aarch64_any_register_operand): New
27359 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
27360 that are semantically a reverse operation.
27361 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
27362 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
27363 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
27365 (aarch64_can_change_mode_class): For big-endian, forbid changes
27366 between two SVE modes if they have different element sizes.
27368 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
27370 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
27371 the TImode handling for big-endian targets.
27373 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
27375 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
27376 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
27378 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
27379 Remove BSWAP handing for big-endian targets and use the form of
27380 LD1RQ appropariate for the mode.
27382 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
27384 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
27385 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
27386 duplicated element.
27388 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
27391 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
27392 check for operands that need to go through aarch64_sve_reload_be.
27394 2018-02-01 Jakub Jelinek <jakub@redhat.com>
27396 PR tree-optimization/81661
27397 PR tree-optimization/84117
27398 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
27399 * tree-eh.c: Include gimplify.h.
27400 (find_trapping_overflow, replace_trapping_overflow,
27401 rewrite_to_non_trapping_overflow): New functions.
27402 * tree-vect-loop.c: Include tree-eh.h.
27403 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
27404 * tree-data-ref.c: Include tree-eh.h.
27405 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
27407 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
27409 PR rtl-optimization/84123
27410 * combine.c (change_zero_ext): Check if hard register satisfies
27411 can_change_dest_mode before calling gen_lowpart_SUBREG.
27413 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
27416 * ira.c (ira_init_register_move_cost): Remove assert.
27418 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
27420 PR rtl-optimization/84071
27421 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
27422 * doc/tm.texi: Regenerate.
27424 2018-01-31 Richard Biener <rguenther@suse.de>
27426 PR tree-optimization/84132
27427 * tree-data-ref.c (analyze_miv_subscript): Properly
27428 check whether evolution_function_is_affine_multivariate_p
27429 before calling gcd_of_steps_may_divide_p.
27431 2018-01-31 Julia Koval <julia.koval@intel.com>
27434 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
27435 * config/i386/i386.md (rdpid_rex64) New.
27436 (rdpid): Make 32bit only.
27438 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
27441 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
27442 an IDENTIFIER_NODE for FUNCTION_TYPE's.
27444 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
27447 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
27449 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
27451 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
27453 PR rtl-optimization/84071
27454 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
27455 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
27457 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
27459 * config/arc/arc.c (arc_handle_aux_attribute): New function.
27460 (arc_attribute_table): Add 'aux' attribute.
27461 (arc_in_small_data_p): Consider aux like variables.
27462 (arc_is_aux_reg_p): New function.
27463 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
27464 (arc_get_aux_arg): New function.
27465 (prepare_move_operands): Handle aux-register access.
27466 (arc_handle_aux_attribute): New function.
27467 * doc/extend.texi (ARC Variable attributes): Add subsection.
27469 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
27471 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
27472 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
27473 (arc_attribute_table): Add 'uncached' attribute.
27474 (arc_print_operand): Print '.di' flag for uncached memory
27476 (arc_in_small_data_p): Do not consider for small data the uncached
27478 (arc_is_uncached_mem_p): New function.
27479 * config/arc/predicates.md (compact_store_memory_operand): Check
27480 for uncached memory accesses.
27481 (nonvol_nonimm_operand): Likewise.
27482 * doc/extend.texi (ARC Type Attribute): New subsection.
27484 2018-01-31 Jakub Jelinek <jakub@redhat.com>
27487 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
27488 falign-loops=): Add Optimization flag.
27490 2018-01-30 Jeff Law <law@redhat.com>
27493 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
27494 INT_REGISTERS_SAVED. Check it prior to calling
27495 get_scratch_register_on_entry.
27496 (ix86_adjust_stack_and_probe): Similarly.
27497 (ix86_emit_probe_stack_range): Similarly.
27498 (ix86_expand_prologue): Corresponding changes.
27500 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
27503 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
27504 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
27506 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
27509 * lra-constraints.c (curr_insn_transform): Process AND in the
27512 2018-01-30 Jakub Jelinek <jakub@redhat.com>
27514 PR rtl-optimization/83986
27515 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
27516 dependence against last_pending_memory_flush in addition to
27517 pending_jump_insns.
27519 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
27521 PR tree-optimization/81611
27522 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
27525 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
27528 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
27531 2018-01-30 Richard Biener <rguenther@suse.de>
27532 Jakub Jelinek <jakub@redhat.com>
27534 PR tree-optimization/84111
27535 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
27536 inner loops added during recursion, as they don't have up-to-date
27539 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
27542 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
27543 (can_inline_edge_by_limits_p): ... here.
27544 (can_early_inline_edge_p, check_callers,
27545 update_caller_keys, update_callee_keys, recursive_inlining,
27546 add_new_edges_to_heap, speculation_useful_p,
27547 inline_small_functions,
27548 inline_small_functions, flatten_function,
27549 inline_to_all_callers_1): Update.
27551 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
27553 * profile-count.c (profile_count::combine_with_ipa_count): Handle
27556 2018-01-30 Richard Biener <rguenther@suse.de>
27558 PR tree-optimization/83008
27559 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
27560 invariant and constant vector uses in stmts when they need
27561 more than one stmt.
27563 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
27566 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
27567 * configure: Regenerate.
27569 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
27571 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
27573 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
27574 Use gen_rtx_REG rather than gen_lowpart.
27576 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
27578 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
27579 rather than 0 when creating partial subregs.
27581 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
27583 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
27586 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
27589 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
27590 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
27591 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
27592 flags. This restores the settings used before the 2017-07-24.
27593 Turning off pre increment/decrement/modify allows IVOPTS to
27594 optimize DF/SF loops where the index is an int.
27596 2018-01-29 Richard Biener <rguenther@suse.de>
27597 Kelvin Nilsen <kelvin@gcc.gnu.org>
27600 * tree-vect-stmts.c (vectorizable_call): Don't call
27601 targetm.vectorize_builtin_md_vectorized_function if callee is
27604 2018-01-22 Carl Love <cel@us.ibm.com>
27606 * doc/extend.tex: Fix typo in second arg in
27607 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
27609 2018-01-29 Richard Biener <rguenther@suse.de>
27611 PR tree-optimization/84086
27612 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
27613 (flush_ssaname_freelist): When SSA names were released reset
27614 the SCEV hash table.
27616 2018-01-29 Richard Biener <rguenther@suse.de>
27618 PR tree-optimization/84057
27619 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
27620 removed paths when removing edges.
27622 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
27624 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
27625 -mfunction-return=@var{choice}.
27627 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
27629 PR diagnostic/84034
27630 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
27631 Handle CR like TAB.
27632 (layout::print_source_line): Likewise.
27633 (test_get_line_width_without_trailing_whitespace): Add test cases.
27635 2018-01-27 Jakub Jelinek <jakub@redhat.com>
27637 PR middle-end/84040
27638 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
27641 2018-01-26 Jim Wilson <jimw@sifive.com>
27643 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
27645 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
27648 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
27650 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
27651 and CMP + SUB-immediate -> SUBS.
27653 2018-01-26 Martin Sebor <msebor@redhat.com>
27655 PR tree-optimization/83896
27656 * tree-ssa-strlen.c (get_string_len): Rename...
27657 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
27658 Avoid assuming length is constant.
27659 (handle_char_store): Use HOST_WIDE_INT for string length.
27661 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
27664 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
27665 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
27667 2018-01-26 Richard Biener <rguenther@suse.de>
27669 PR rtl-optimization/84003
27670 * dse.c (record_store): Only record redundant stores when
27671 the earlier store aliases at least all accesses the later one does.
27673 2018-01-26 Jakub Jelinek <jakub@redhat.com>
27675 PR rtl-optimization/83985
27676 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
27677 REG_CFA_RESTORE insns.
27678 (delete_unmarked_insns): Don't ignore separate shrink wrapping
27679 REG_CFA_RESTORE insns here.
27682 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
27683 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
27685 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
27687 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
27688 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
27689 (arc_init): Likewise.
27690 (arc_override_options): Likewise.
27691 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
27693 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
27695 * config/arc/arc.h (TARGET_DBNZ): Define.
27696 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
27697 properly set the tune attribute.
27698 (dbnz): Use TARGET_DBNZ guard.
27699 * config/arc/arc.opt (mtune): Add core3 option.
27701 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
27703 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
27704 recognize new pic like addresses.
27705 (arc_delegitimize_address): Clean up.
27707 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
27709 * config/arc/arc-arches.def: Option mrf16 valid for all
27711 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
27712 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
27713 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
27714 * config/arc/arc-tables.opt: Regenerate.
27715 * config/arc/arc.c (arc_conditional_register_usage): Handle
27716 reduced register file case.
27717 (arc_file_start): Set must have build attributes.
27718 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
27719 mrf16 option value.
27720 * config/arc/arc.opt (mrf16): Add new option.
27721 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
27722 * config/arc/genmultilib.awk: Handle new mrf16 option.
27723 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
27724 * config/arc/t-multilib: Regenerate.
27725 * doc/invoke.texi (ARC Options): Document mrf16 option.
27727 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
27729 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
27730 * config/arc/arc.c (arc_handle_secure_attribute): New function.
27731 (arc_attribute_table): Add 'secure_call' attribute.
27732 (arc_print_operand): Print secure call operand.
27733 (arc_function_ok_for_sibcall): Don't optimize tail calls when
27735 (arc_is_secure_call_p): New function. * config/arc/arc.md
27736 (call_i): Add support for sjli instruction.
27737 (call_value_i): Likewise.
27738 * config/arc/constraints.md (Csc): New constraint.
27740 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
27741 John Eric Martin <John.Martin@emmicro-us.com>
27743 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
27744 * config/arc/arc.c (_arc_jli_section): New struct.
27745 (arc_jli_section): New type.
27746 (rc_jli_sections): New static variable.
27747 (arc_handle_jli_attribute): New function.
27748 (arc_attribute_table): Add jli_always and jli_fixed attribute.
27749 (arc_file_end): New function.
27750 (TARGET_ASM_FILE_END): Define.
27751 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
27752 (arc_add_jli_section): New function.
27753 (jli_call_scan): Likewise.
27754 (arc_reorg): Call jli_call_scan.
27755 (arc_output_addsi): Remove 'S' from printing asm operand.
27756 (arc_is_jli_call_p): New function.
27757 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
27759 (movhi_insn): Likewise.
27760 (movsi_insn): Likewise.
27761 (movsi_set_cc_insn): Likewise.
27762 (loadqi_update): Likewise.
27763 (load_zeroextendqisi_update): Likewise.
27764 (load_signextendqisi_update): Likewise.
27765 (loadhi_update): Likewise.
27766 (load_zeroextendhisi_update): Likewise.
27767 (load_signextendhisi_update): Likewise.
27768 (loadsi_update): Likewise.
27769 (loadsf_update): Likewise.
27770 (movsicc_insn): Likewise.
27771 (bset_insn): Likewise.
27772 (bxor_insn): Likewise.
27773 (bclr_insn): Likewise.
27774 (bmsk_insn): Likewise.
27775 (bicsi3_insn): Likewise.
27776 (cmpsi_cc_c_insn): Likewise.
27777 (movsi_ne): Likewise.
27778 (movsi_cond_exec): Likewise.
27779 (clrsbsi2): Likewise.
27780 (norm_f): Likewise.
27790 (call_i): Remove 'S' asm letter, add jli instruction.
27791 (call_value_i): Likewise.
27792 * config/arc/arc.op (mjli-always): New option.
27793 * config/arc/constraints.md (Cji): New constraint.
27794 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
27796 (subsf3_fpx): Likewise.
27797 (mulsf3_fpx): Likewise.
27798 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
27800 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
27801 function attrbutes.
27802 * doc/invoke.texi (ARC): Document mjli-always option.
27804 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
27806 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
27807 avoid addition with 0 and use incw and decw where possible.
27809 2018-01-26 Richard Biener <rguenther@suse.de>
27811 PR tree-optimization/81082
27812 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
27813 association if it requires casting to unsigned.
27814 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
27815 from fold_plusminus_mult_expr to catch important cases late when
27816 range info is available.
27818 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
27820 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
27821 * configure.ac (hidden_linkonce): New test.
27822 * configure: Regenerate.
27823 * config.in: Regenerate.
27825 2018-01-26 Julia Koval <julia.koval@intel.com>
27827 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
27828 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
27829 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
27830 _mm_mask_bitshuffle_epi64_mask): Fix type.
27831 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
27832 USI_FTYPE_V4DI_V4DI_USI): Remove.
27833 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
27834 __builtin_ia32_vpshufbitqmb256_mask,
27835 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
27836 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
27837 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
27839 2018-01-26 Alan Modra <amodra@gmail.com>
27842 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
27843 UNSPEC_VBPERMQ. Sort other unspecs.
27845 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
27847 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
27849 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
27851 PR middle-end/83055
27852 * predict.c (drop_profile): Do not push/pop cfun; update also
27854 (handle_missing_profiles): Fix logic looking for zero profiles.
27856 2018-01-25 Jakub Jelinek <jakub@redhat.com>
27858 PR middle-end/83977
27859 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
27860 on functions with #pragma omp declare simd or functions with simd
27862 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
27863 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
27864 Remove trailing \n from warning_at calls.
27866 2018-01-25 Tom de Vries <tom@codesourcery.com>
27869 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
27870 for neutered workers.
27872 2018-01-24 Joseph Myers <joseph@codesourcery.com>
27875 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
27876 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
27878 2018-01-24 Jeff Law <law@redhat.com>
27881 * i386.c (get_probe_interval): Move to earlier point.
27882 (ix86_compute_frame_layout): If -fstack-clash-protection and
27883 the frame is larger than the probe interval, then use pushes
27884 to save registers rather than reg->mem moves.
27885 (ix86_expand_prologue): Remove conditional for int_registers_saved
27888 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
27891 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
27892 min/max for never referenced object.
27894 2018-01-24 Jakub Jelinek <jakub@redhat.com>
27896 PR middle-end/83977
27897 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
27899 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
27900 attributes from DECL_ATTRIBUTES (decl) without affecting
27901 DECL_ATTRIBUTES (current_function_decl).
27902 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
27903 functions with non-NULL DECL_ABSTRACT_ORIGIN.
27905 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
27907 PR tree-optimization/83979
27908 * fold-const.c (fold_comparison): Use constant_boolean_node
27909 instead of boolean_{true,false}_node.
27911 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
27913 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
27916 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
27918 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
27919 Simplify the clause that sets the length attribute.
27920 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
27921 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
27922 clause that sets the length attribute.
27923 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
27925 2018-01-24 Tom de Vries <tom@codesourcery.com>
27928 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
27929 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
27930 Add strict parameter.
27931 (prevent_branch_around_nothing): Insert dummy insn between branch to
27932 label and label with no ptx insn inbetween.
27933 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
27935 2018-01-24 Tom de Vries <tom@codesourcery.com>
27938 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
27939 for neutered threads in warp.
27940 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
27942 2018-01-24 Richard Biener <rguenther@suse.de>
27944 PR tree-optimization/83176
27945 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
27948 2018-01-24 Richard Biener <rguenther@suse.de>
27950 PR tree-optimization/82819
27951 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
27952 code generating pluses that are no-ops in the target precision.
27954 2018-01-24 Richard Biener <rguenther@suse.de>
27956 PR middle-end/84000
27957 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
27959 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
27961 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
27962 to merge probabilities.
27963 * predict.c (probably_never_executed): Also mark as cold functions
27964 with global 0 profile and guessed local profile.
27965 * profile-count.c (profile_probability::combine_with_count): New
27967 * profile-count.h (profile_probability::operator*,
27968 profile_probability::operator*=, profile_probability::operator/,
27969 profile_probability::operator/=): Reduce precision to adjusted
27970 and set value to guessed on contradictory divisions.
27971 (profile_probability::combine_with_freq): Remove.
27972 (profile_probability::combine_wiht_count): Declare.
27973 (profile_count::force_nonzero):: Set to adjusted.
27974 (profile_count::probability_in):: Set quality to adjusted.
27975 * tree-ssa-tail-merge.c (replace_block_by): Use
27976 combine_with_count.
27978 2018-01-23 Andrew Waterman <andrew@sifive.com>
27979 Jim Wilson <jimw@sifive.com>
27981 * config/riscv/riscv.c (riscv_stack_boundary): New.
27982 (riscv_option_override): Set riscv_stack_boundary. Handle
27983 riscv_preferred_stack_boundary_arg.
27984 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
27985 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
27986 (STACK_BOUNDARY): Set to riscv_stack_boundary.
27987 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
27988 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
27989 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
27991 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
27994 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
27995 of struct ix86_frame.
27996 (ix86_expand_epilogue): Likewise. Add a local variable for
27997 the reg_save_offset field in struct ix86_frame.
27999 2018-01-23 Bin Cheng <bin.cheng@arm.com>
28001 PR tree-optimization/82604
28002 * tree-loop-distribution.c (enum partition_kind): New enum item
28003 PKIND_PARTIAL_MEMSET.
28004 (partition_builtin_p): Support above new enum item.
28005 (generate_code_for_partition): Ditto.
28006 (compute_access_range): Differentiate cases that equality can be
28007 proven at all loops, the innermost loops or no loops.
28008 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
28009 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
28010 (finalize_partitions, distribute_loop): Don't fuse partition of
28011 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
28012 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
28013 parloop is enabled.
28015 2018-01-23 Martin Liska <mliska@suse.cz>
28017 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
28018 order to ignore the predictor.
28019 (PRED_POLYMORPHIC_CALL): Likewise.
28020 (PRED_RECURSIVE_CALL): Likewise.
28022 2018-01-23 Martin Liska <mliska@suse.cz>
28024 * tree-profile.c (tree_profiling): Print function header to
28025 aware reader which function we are working on.
28026 * value-prof.c (gimple_find_values_to_profile): Do not print
28027 not interesting value histograms.
28029 2018-01-23 Martin Liska <mliska@suse.cz>
28031 * profile-count.h (enum profile_quality): Add
28032 profile_uninitialized as the first value. Do not number values
28033 as they are zero based.
28034 (profile_count::verify): Update sanity check.
28035 (profile_probability::verify): Likewise.
28037 2018-01-23 Nathan Sidwell <nathan@acm.org>
28039 * doc/invoke.texi (ffor-scope): Deprecate.
28041 2018-01-23 David Malcolm <dmalcolm@redhat.com>
28043 PR tree-optimization/83510
28044 * domwalk.c (set_all_edges_as_executable): New function.
28045 (dom_walker::dom_walker): Convert bool param
28046 "skip_unreachable_blocks" to enum reachability. Move setup of
28047 edge flags to set_all_edges_as_executable and only do it when
28048 reachability is REACHABLE_BLOCKS.
28049 * domwalk.h (enum dom_walker::reachability): New enum.
28050 (dom_walker::dom_walker): Convert bool param
28051 "skip_unreachable_blocks" to enum reachability.
28052 (set_all_edges_as_executable): New decl.
28053 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
28054 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
28056 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
28057 but converting true to REACHABLE_BLOCKS.
28058 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
28060 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
28061 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
28062 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
28064 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
28065 if check_all_array_refs will be called.
28067 2018-01-23 David Malcolm <dmalcolm@redhat.com>
28069 * tree.c (selftest::test_location_wrappers): Add more test
28072 2018-01-23 David Malcolm <dmalcolm@redhat.com>
28074 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
28075 (selftest::test_bit_in_range): Likewise.
28077 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
28080 * doc/sourcebuild.texi (vect_float): Say that the selector
28081 only describes the situation when -funsafe-math-optimizations is on.
28082 (vect_float_strict): Document.
28084 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
28086 PR tree-optimization/83965
28087 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
28088 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
28089 instead of checking only for a reduction.
28090 (vect_recog_widen_sum_pattern): Likewise.
28092 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
28094 * predict.c (probably_never_executed): Only use precise profile info.
28095 (compute_function_frequency): Skip after inlining hack since we now
28096 have quality checking.
28098 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
28100 * profile-count.h (profile_probability::very_unlikely,
28101 profile_probability::unlikely, profile_probability::even): Set
28102 precision to guessed.
28104 2018-01-23 Richard Biener <rguenther@suse.de>
28106 PR tree-optimization/83963
28107 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
28108 Properly terminate dominator walk when crossing the exit edge not
28109 when visiting its source block.
28111 2018-01-23 Jakub Jelinek <jakub@redhat.com>
28114 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
28115 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
28117 2018-01-22 Jakub Jelinek <jakub@redhat.com>
28119 PR tree-optimization/83957
28120 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
28121 semicolon after for body surrounded by braces.
28123 PR tree-optimization/83081
28124 * profile-count.h (profile_probability::split): New method.
28125 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
28126 Use profile_probability::split.
28127 (do_compare_rtx_and_jump): Fix adjustment of probabilities
28128 when splitting a single conditional jump into 2.
28130 2018-01-22 David Malcolm <dmalcolm@redhat.com>
28132 PR tree-optimization/69452
28133 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
28136 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
28138 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
28139 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
28140 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
28142 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
28144 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
28146 * config/rl78/rl78.md (movdi): New define_expand.
28147 * config/rl78/rl78.c (rl78_split_movdi): New function.
28149 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
28152 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
28154 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
28155 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
28156 128-bit to produce an UNSPEC move to get the double word with the
28157 signbit and then a shift directly to do signbit.
28158 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
28159 implementation with a new version that just does either a direct
28160 move or a regular move. Move memory interface to separate insns.
28161 Move insns so they are next to the expander.
28162 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
28163 with signbit move. Split big and little endian case.
28164 (signbit<mode>2_dm_mem_le): Likewise.
28165 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
28166 (signbit<mode>2_dm2): Likewise.
28168 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
28170 * config/rl78/rl78.md (anddi3): New define_expand.
28172 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
28174 * config/rl78/rl78.md (umindi3): New define_expand.
28176 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
28178 * config/rl78/rl78.md (smindi3): New define_expand.
28180 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
28182 * config/rl78/rl78.md (smaxdi3): New define_expand.
28184 2018-01-22 Carl Love <cel@us.ibm.com>
28186 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
28187 LVX_V1TI): Add macro expansion.
28188 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
28189 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
28190 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
28191 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
28192 Change check to determine if the instruction is a byte reversing
28193 entry. Fix typo in comment.
28194 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
28195 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
28196 Add def_builtin calls for new builtins.
28197 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
28198 Add define_insn expansion.
28200 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
28202 * config/rl78/rl78.md (umaxdi3): New define_expand.
28204 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
28206 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
28207 for non-QImode registers.
28209 2018-01-22 Richard Biener <rguenther@suse.de>
28211 PR tree-optimization/83963
28212 * graphite-scop-detection.c (scop_detection::get_sese): Delay
28213 including the loop exit block.
28214 (scop_detection::merge_sese): Likewise.
28215 (scop_detection::add_scop): Do it here instead.
28217 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
28219 * doc/sourcebuild.texi (arm_softfloat): Document.
28221 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
28224 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
28225 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
28226 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
28228 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
28229 David Edelsohn <dje.gcc@gmail.com>
28232 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
28233 Change "crset eq" to "crset 2".
28234 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
28235 (*call_indirect_aix<mode>_nospec): Likewise.
28236 (*call_value_indirect_aix<mode>_nospec): Likewise.
28237 (*call_indirect_elfv2<mode>_nospec): Likewise.
28238 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
28239 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
28240 change assembly output from . to $.
28241 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
28242 (indirect_jump<mode>_nospec): Change assembly output from . to $.
28243 (*tablejump<mode>_internal1_nospec): Likewise.
28245 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
28248 * config/sh/sh_optimize_sett_clrt.cc:
28249 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
28251 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
28253 PR tree-optimization/83940
28254 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
28255 offset_dt to vect_constant_def rather than vect_unknown_def_type.
28256 (vect_check_load_store_mask): Add a mask_dt_out parameter and
28257 use it to pass back the definition type.
28258 (vect_check_store_rhs): Likewise rhs_dt_out.
28259 (vect_build_gather_load_calls): Add a mask_dt argument and use
28260 it instead of a call to vect_is_simple_use.
28261 (vectorizable_store): Update calls to vect_check_load_store_mask
28262 and vect_check_store_rhs. Use the dt returned by the latter instead
28263 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
28264 instead of calls to vect_is_simple_use. Pass the scalar rather
28265 than the vector operand to vect_is_simple_use when handling
28266 second and subsequent copies of an rhs value.
28267 (vectorizable_load): Update calls to vect_check_load_store_mask
28268 and vect_build_gather_load_calls. Use the cached mask_dt and
28269 gs_info.offset_dt instead of calls to vect_is_simple_use.
28271 2018-01-20 Jakub Jelinek <jakub@redhat.com>
28273 PR middle-end/83945
28274 * tree-emutls.c: Include gimplify.h.
28275 (lower_emutls_2): New function.
28276 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
28277 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
28278 it before further processing.
28281 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
28282 UINTVAL (trueop1) instead of INTVAL (op1).
28284 2018-01-19 Jakub Jelinek <jakub@redhat.com>
28288 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
28289 INCOMING_FRAME_SP_OFFSET if not defined.
28290 (scan_trace): Add ENTRY argument. If true and
28291 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
28292 emit a note to adjust the CFA offset.
28293 (create_cfi_notes): Adjust scan_trace callers.
28294 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
28295 INCOMING_FRAME_SP_OFFSET in the CIE.
28296 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
28297 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
28299 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
28300 * doc/tm.texi: Regenerated.
28302 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
28304 PR rtl-optimization/83147
28305 * lra-constraints.c (remove_inheritance_pseudos): Use
28306 lra_substitute_pseudo_within_insn.
28308 2018-01-19 Tom de Vries <tom@codesourcery.com>
28309 Cesar Philippidis <cesar@codesourcery.com>
28312 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
28314 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
28317 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
28318 spaces for function labels.
28320 2018-01-19 Martin Liska <mliska@suse.cz>
28322 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
28323 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
28324 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
28325 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
28326 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
28327 (PRED_CONST_RETURN): Change from 69 to 65.
28328 (PRED_NULL_RETURN): Change from 91 to 71.
28329 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
28330 (PRED_LOOP_GUARD): Change from 66 to 73.
28332 2018-01-19 Martin Liska <mliska@suse.cz>
28334 * predict.c (predict_insn_def): Add new assert.
28335 (struct branch_predictor): Change type to signed integer.
28336 (test_prediction_value_range): Amend test to cover
28337 PROB_UNINITIALIZED.
28338 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
28339 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
28340 (PRED_LOOP_ITERATIONS_MAX): Likewise.
28341 (PRED_LOOP_IV_COMPARE): Likewise.
28342 * predict.h (PROB_UNINITIALIZED): Define new constant.
28344 2018-01-19 Martin Liska <mliska@suse.cz>
28346 * predict.c (dump_prediction): Add new format for
28347 analyze_brprob.py script which is enabled with -details
28349 * profile-count.h (precise_p): New function.
28351 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
28353 PR tree-optimization/83922
28354 * tree-vect-loop.c (vect_verify_full_masking): Return false if
28355 there are no statements that need masking.
28356 (vect_active_double_reduction_p): New function.
28357 (vect_analyze_loop_operations): Use it when handling phis that
28358 are not in the loop header.
28360 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
28362 PR tree-optimization/83914
28363 * tree-vect-loop.c (vectorizable_induction): Don't convert
28364 init_expr or apply the peeling adjustment for inductions
28365 that are nested within the vectorized loop.
28367 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
28369 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
28372 2018-01-18 Jakub Jelinek <jakub@redhat.com>
28376 * function.h (gimplify_parameters): Add gimple_seq * argument.
28377 * function.c: Include gimple.h and options.h.
28378 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
28379 for the added local temporaries if needed.
28380 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
28381 if there are any parameter cleanups, wrap whole body into a
28382 try/finally with the cleanups.
28384 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
28387 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
28388 Use GET_MODE_CLASS for scalar floating point.
28390 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
28394 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
28395 Fix call of call_cgraph_insertion_hooks.
28397 2018-01-18 Martin Sebor <msebor@redhat.com>
28399 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
28401 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
28404 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
28407 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
28410 * common.opt: (-ffile-prefix-map): New option.
28411 * opts.c (common_handle_option): Defer it.
28412 * opts-global.c (handle_common_deferred_options): Handle it.
28413 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
28414 * file-prefix-map.h: New file.
28415 (remap_debug_filename, add_debug_prefix_map): ...here.
28416 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
28417 * final.c (debug_prefix_map, add_debug_prefix_map
28418 remap_debug_filename): Move to...
28419 * file-prefix-map.c: New file.
28420 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
28421 generalize, get rid of alloca(), use strrchr() instead of strchr().
28422 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
28423 Implement in terms of add_prefix_map().
28424 (remap_macro_filename, remap_debug_filename): Implement in term of
28426 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
28427 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
28428 * dbxout.c: Include file-prefix-map.h.
28429 * varasm.c: Likewise.
28430 * vmsdbgout.c: Likewise.
28431 * xcoffout.c: Likewise.
28432 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
28433 * doc/cppopts.texi (-fmacro-prefix-map): Document.
28434 * doc/invoke.texi (-ffile-prefix-map): Document.
28435 (-fdebug-prefix-map): Update description.
28437 2018-01-18 Martin Liska <mliska@suse.cz>
28439 * config/i386/i386.c (indirect_thunk_name): Document that also
28441 (output_indirect_thunk): Document why both instructions
28442 (pause and lfence) are generated.
28444 2018-01-18 Richard Biener <rguenther@suse.de>
28446 PR tree-optimization/83887
28447 * graphite-scop-detection.c
28448 (scop_detection::get_nearest_dom_with_single_entry): Remove.
28449 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
28450 (scop_detection::merge_sese): Re-implement with a flood-fill
28451 algorithm that properly finds a SESE region if it exists.
28453 2018-01-18 Jakub Jelinek <jakub@redhat.com>
28456 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
28457 pointer_diff optimizations use view_convert instead of convert.
28459 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
28461 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
28462 Generate different code for -mno-speculate-indirect-jumps.
28463 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
28464 (*call_indirect_aix<mode>): Disable for
28465 -mno-speculate-indirect-jumps.
28466 (*call_indirect_aix<mode>_nospec): New define_insn.
28467 (*call_value_indirect_aix<mode>): Disable for
28468 -mno-speculate-indirect-jumps.
28469 (*call_value_indirect_aix<mode>_nospec): New define_insn.
28470 (*sibcall_nonlocal_sysv<mode>): Generate different code for
28471 -mno-speculate-indirect-jumps.
28472 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
28474 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
28476 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
28477 long double type, set the flags for noting the default long double
28478 type, even if we don't pass or return a long double type.
28480 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
28483 * ipa-inline.c (flatten_function): Do not overwrite final inlining
28486 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
28488 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
28489 support for merge[hl].
28490 (fold_mergehl_helper): New helper function.
28491 (tree-vector-builder.h): New #include for tree_vector_builder usage.
28492 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
28493 (altivec_vmrglw_direct): Add xxmrglw insn.
28495 2018-01-17 Andrew Waterman <andrew@sifive.com>
28497 * config/riscv/riscv.c (riscv_conditional_register_usage): If
28498 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
28500 2018-01-17 David Malcolm <dmalcolm@redhat.com>
28503 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
28504 call the lto_location_cache before reading the
28505 DECL_SOURCE_LOCATION of the types.
28507 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
28508 Richard Sandiford <richard.sandiford@linaro.org>
28510 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
28511 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
28512 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
28513 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
28514 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
28516 * config/aarch64/constraints.md (aarch64_movti_operand):
28518 * config/aarch64/predicates.md (Uti): Add new constraint.
28520 2018-01-17 Carl Love <cel@us.ibm.com>
28522 * config/rs6000/vsx.md (define_expand xl_len_r,
28523 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
28524 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
28526 (define_expand, define_insn): Move the shift left from the
28527 define_insn to the define_expand for lxvl and stxvl instructions.
28528 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
28529 and XL_LEN_R definitions to PURE.
28531 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
28533 * config/i386/i386.c (indirect_thunk_name): Declare regno
28534 as unsigned int. Compare regno with INVALID_REGNUM.
28535 (output_indirect_thunk): Ditto.
28536 (output_indirect_thunk_function): Ditto.
28537 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
28538 in the call to output_indirect_thunk_function.
28540 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
28542 PR middle-end/83884
28543 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
28544 rather than the size of inner_type to determine the stack slot size
28545 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
28547 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
28550 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
28553 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
28555 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
28556 endian Linux systems to optionally enable multilibs for selecting
28557 the long double type if the user configured an explicit type.
28558 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
28559 have no long double multilibs if not defined.
28560 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
28561 warn if the user used -mabi={ieee,ibm}longdouble and we built
28562 multilibs for long double.
28563 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
28564 appropriate multilib option.
28565 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
28567 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
28568 for building long double multilibs.
28569 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
28571 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
28573 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
28576 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
28578 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
28581 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
28584 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
28587 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
28589 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
28590 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
28592 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
28594 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
28595 different rtl trees depending on TARGET_64BIT.
28596 (rs6000_gen_lvx): Likewise.
28598 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
28600 * config/visium/visium.md (nop): Tweak comment.
28601 (hazard_nop): Likewise.
28603 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
28605 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
28606 -mspeculate-indirect-jumps.
28607 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
28608 for -mno-speculate-indirect-jumps.
28609 (*call_indirect_elfv2<mode>_nospec): New define_insn.
28610 (*call_value_indirect_elfv2<mode>): Disable for
28611 -mno-speculate-indirect-jumps.
28612 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
28613 (indirect_jump): Emit different RTL for
28614 -mno-speculate-indirect-jumps.
28615 (*indirect_jump<mode>): Disable for
28616 -mno-speculate-indirect-jumps.
28617 (*indirect_jump<mode>_nospec): New define_insn.
28618 (tablejump): Emit different RTL for
28619 -mno-speculate-indirect-jumps.
28620 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
28621 (tablejumpsi_nospec): New define_expand.
28622 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
28623 (tablejumpdi_nospec): New define_expand.
28624 (*tablejump<mode>_internal1): Disable for
28625 -mno-speculate-indirect-jumps.
28626 (*tablejump<mode>_internal1_nospec): New define_insn.
28627 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
28630 2018-01-16 Artyom Skrobov tyomitch@gmail.com
28632 * caller-save.c (insert_save): Drop unnecessary parameter. All
28635 2018-01-16 Jakub Jelinek <jakub@redhat.com>
28636 Richard Biener <rguenth@suse.de>
28639 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
28640 return early, inline manually is_gimple_sizepos. Make sure if we
28641 call gimplify_expr we don't end up with a gimple constant.
28642 * tree.c (variably_modified_type_p): Don't return true for
28643 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
28644 * gimplify.h (is_gimple_sizepos): Remove.
28646 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
28648 PR tree-optimization/83857
28649 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
28650 vectorizable_live_operation for pure SLP statements.
28651 (vectorizable_live_operation): Handle PHIs.
28653 2018-01-16 Richard Biener <rguenther@suse.de>
28655 PR tree-optimization/83867
28656 * tree-vect-stmts.c (vect_transform_stmt): Precompute
28657 nested_in_vect_loop_p since the scalar stmt may get invalidated.
28659 2018-01-16 Jakub Jelinek <jakub@redhat.com>
28662 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
28663 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
28664 If off is not INTEGER_CST, issue a may not be aligned warning
28665 rather than isn't aligned. Use isn%'t rather than isn't.
28666 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
28668 <case MULT_EXPR>: Improve the case when bottom and one of the
28669 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
28670 operand, in that case check if the other operand is multiple of
28671 bottom divided by the INTEGER_CST operand.
28673 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
28676 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
28677 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
28678 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
28679 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
28680 * config/pa/pa.c (pa_function_arg_advance): Likewise.
28681 (pa_function_arg, pa_arg_partial_bytes): Likewise.
28682 (pa_function_arg_size): New function.
28684 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
28686 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
28687 in a separate statement.
28689 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
28691 PR tree-optimization/83847
28692 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
28693 group gathers and scatters.
28695 2018-01-16 Jakub Jelinek <jakub@redhat.com>
28697 PR rtl-optimization/86620
28698 * params.def (max-sched-ready-insns): Bump minimum value to 1.
28700 PR rtl-optimization/83213
28701 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
28702 to last if both are JUMP_INSNs.
28704 PR tree-optimization/83843
28705 * gimple-ssa-store-merging.c
28706 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
28707 store_immediate_info for bswap/nop orig_stores.
28709 2018-01-15 Andrew Waterman <andrew@sifive.com>
28711 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
28713 <UDIV>: Increase cost if !TARGET_DIV.
28715 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
28717 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
28718 (define_attr "cr_logical_3op"): New.
28719 (cceq_ior_compare): Adjust.
28720 (cceq_ior_compare_complement): Adjust.
28721 (*cceq_rev_compare): Adjust.
28722 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
28723 (is_cracked_insn): Adjust.
28724 (insn_must_be_first_in_group): Adjust.
28725 * config/rs6000/40x.md: Adjust.
28726 * config/rs6000/440.md: Adjust.
28727 * config/rs6000/476.md: Adjust.
28728 * config/rs6000/601.md: Adjust.
28729 * config/rs6000/603.md: Adjust.
28730 * config/rs6000/6xx.md: Adjust.
28731 * config/rs6000/7450.md: Adjust.
28732 * config/rs6000/7xx.md: Adjust.
28733 * config/rs6000/8540.md: Adjust.
28734 * config/rs6000/cell.md: Adjust.
28735 * config/rs6000/e300c2c3.md: Adjust.
28736 * config/rs6000/e500mc.md: Adjust.
28737 * config/rs6000/e500mc64.md: Adjust.
28738 * config/rs6000/e5500.md: Adjust.
28739 * config/rs6000/e6500.md: Adjust.
28740 * config/rs6000/mpc.md: Adjust.
28741 * config/rs6000/power4.md: Adjust.
28742 * config/rs6000/power5.md: Adjust.
28743 * config/rs6000/power6.md: Adjust.
28744 * config/rs6000/power7.md: Adjust.
28745 * config/rs6000/power8.md: Adjust.
28746 * config/rs6000/power9.md: Adjust.
28747 * config/rs6000/rs64.md: Adjust.
28748 * config/rs6000/titan.md: Adjust.
28750 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
28752 * config/i386/predicates.md (indirect_branch_operand): Rewrite
28753 ix86_indirect_branch_register logic.
28755 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
28757 * config/i386/constraints.md (Bs): Update
28758 ix86_indirect_branch_register check. Don't check
28759 ix86_indirect_branch_register with GOT_memory_operand.
28761 * config/i386/predicates.md (GOT_memory_operand): Don't check
28762 ix86_indirect_branch_register here.
28763 (GOT32_symbol_operand): Likewise.
28765 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
28767 * config/i386/predicates.md (constant_call_address_operand):
28768 Rewrite ix86_indirect_branch_register logic.
28769 (sibcall_insn_operand): Likewise.
28771 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
28773 * config/i386/constraints.md (Bs): Replace
28774 ix86_indirect_branch_thunk_register with
28775 ix86_indirect_branch_register.
28777 * config/i386/i386.md (indirect_jump): Likewise.
28778 (tablejump): Likewise.
28779 (*sibcall_memory): Likewise.
28780 (*sibcall_value_memory): Likewise.
28781 Peepholes of indirect call and jump via memory: Likewise.
28782 * config/i386/i386.opt: Likewise.
28783 * config/i386/predicates.md (indirect_branch_operand): Likewise.
28784 (GOT_memory_operand): Likewise.
28785 (call_insn_operand): Likewise.
28786 (sibcall_insn_operand): Likewise.
28787 (GOT32_symbol_operand): Likewise.
28789 2018-01-15 Jakub Jelinek <jakub@redhat.com>
28791 PR middle-end/83837
28792 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
28793 type rather than type addr's type points to.
28794 (expand_omp_atomic_mutex): Likewise.
28795 (expand_omp_atomic): Likewise.
28797 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
28800 * config/i386/i386.c (output_indirect_thunk_function): Use
28801 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
28802 for __x86_return_thunk.
28804 2018-01-15 Richard Biener <rguenther@suse.de>
28806 PR middle-end/83850
28807 * expmed.c (extract_bit_field_1): Fix typo.
28809 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
28812 * config/arm/iterators.md (VF): New mode iterator.
28813 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
28814 Remove integer-related logic from pattern.
28815 (neon_vabd<mode>_3): Likewise.
28817 2018-01-15 Jakub Jelinek <jakub@redhat.com>
28819 PR middle-end/82694
28820 * common.opt (fstrict-overflow): No longer an alias.
28821 (fwrapv-pointer): New option.
28822 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
28823 also for pointer types based on flag_wrapv_pointer.
28824 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
28825 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
28826 opts->x_flag_wrapv got set.
28827 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
28828 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
28829 POINTER_TYPE_OVERFLOW_UNDEFINED.
28830 * match.pd: Likewise in address comparison pattern.
28831 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
28833 2018-01-15 Richard Biener <rguenther@suse.de>
28836 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
28837 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
28838 Reset type names to their identifier if their TYPE_DECL doesn't
28839 have linkage (and thus is used for ODR and devirt).
28840 (save_debug_info_for_decl): Remove.
28841 (save_debug_info_for_type): Likewise.
28842 (add_tree_to_fld_list): Adjust.
28843 * tree-pretty-print.c (dump_generic_node): Make dumping of
28844 type names more robust.
28846 2018-01-15 Richard Biener <rguenther@suse.de>
28848 * BASE-VER: Bump to 8.0.1.
28850 2018-01-14 Martin Sebor <msebor@redhat.com>
28853 * builtins.c (check_access): Avoid warning when the no-warning bit
28856 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
28858 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
28859 * ira-color (allocno_hard_regs_compare): Likewise.
28861 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
28864 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
28865 Use .pushsection/.popsection.
28867 2018-01-14 Martin Sebor <msebor@redhat.com>
28870 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
28872 2018-01-14 Jakub Jelinek <jakub@redhat.com>
28874 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
28875 entry from extra_headers.
28876 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
28877 extra_headers, make the list bitwise identical to the i?86-*-* one.
28879 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
28881 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
28882 -mcmodel=large with -mindirect-branch=thunk,
28883 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
28884 -mfunction-return=thunk-extern.
28885 * doc/invoke.texi: Document -mcmodel=large is incompatible with
28886 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
28887 -mfunction-return=thunk and -mfunction-return=thunk-extern.
28889 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
28891 * config/i386/i386.c (print_reg): Print the name of the full
28892 integer register without '%'.
28893 (ix86_print_operand): Handle 'V'.
28894 * doc/extend.texi: Document 'V' modifier.
28896 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
28898 * config/i386/constraints.md (Bs): Disallow memory operand for
28899 -mindirect-branch-register.
28901 * config/i386/predicates.md (indirect_branch_operand): Likewise.
28902 (GOT_memory_operand): Likewise.
28903 (call_insn_operand): Likewise.
28904 (sibcall_insn_operand): Likewise.
28905 (GOT32_symbol_operand): Likewise.
28906 * config/i386/i386.md (indirect_jump): Call convert_memory_address
28907 for -mindirect-branch-register.
28908 (tablejump): Likewise.
28909 (*sibcall_memory): Likewise.
28910 (*sibcall_value_memory): Likewise.
28911 Disallow peepholes of indirect call and jump via memory for
28912 -mindirect-branch-register.
28913 (*call_pop): Replace m with Bw.
28914 (*call_value_pop): Likewise.
28915 (*sibcall_pop_memory): Replace m with Bs.
28916 * config/i386/i386.opt (mindirect-branch-register): New option.
28917 * doc/invoke.texi: Document -mindirect-branch-register option.
28919 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
28921 * config/i386/i386-protos.h (ix86_output_function_return): New.
28922 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
28923 set function_return_type.
28924 (indirect_thunk_name): Add ret_p to indicate thunk for function
28926 (output_indirect_thunk_function): Pass false to
28927 indirect_thunk_name.
28928 (ix86_output_indirect_branch_via_reg): Likewise.
28929 (ix86_output_indirect_branch_via_push): Likewise.
28930 (output_indirect_thunk_function): Create alias for function
28931 return thunk if regno < 0.
28932 (ix86_output_function_return): New function.
28933 (ix86_handle_fndecl_attribute): Handle function_return.
28934 (ix86_attribute_table): Add function_return.
28935 * config/i386/i386.h (machine_function): Add
28936 function_return_type.
28937 * config/i386/i386.md (simple_return_internal): Use
28938 ix86_output_function_return.
28939 (simple_return_internal_long): Likewise.
28940 * config/i386/i386.opt (mfunction-return=): New option.
28941 (indirect_branch): Mention -mfunction-return=.
28942 * doc/extend.texi: Document function_return function attribute.
28943 * doc/invoke.texi: Document -mfunction-return= option.
28945 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
28947 * config/i386/i386-opts.h (indirect_branch): New.
28948 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
28949 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
28950 with local indirect jump when converting indirect call and jump.
28951 (ix86_set_indirect_branch_type): New.
28952 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
28953 (indirectlabelno): New.
28954 (indirect_thunk_needed): Likewise.
28955 (indirect_thunk_bnd_needed): Likewise.
28956 (indirect_thunks_used): Likewise.
28957 (indirect_thunks_bnd_used): Likewise.
28958 (INDIRECT_LABEL): Likewise.
28959 (indirect_thunk_name): Likewise.
28960 (output_indirect_thunk): Likewise.
28961 (output_indirect_thunk_function): Likewise.
28962 (ix86_output_indirect_branch_via_reg): Likewise.
28963 (ix86_output_indirect_branch_via_push): Likewise.
28964 (ix86_output_indirect_branch): Likewise.
28965 (ix86_output_indirect_jmp): Likewise.
28966 (ix86_code_end): Call output_indirect_thunk_function if needed.
28967 (ix86_output_call_insn): Call ix86_output_indirect_branch if
28969 (ix86_handle_fndecl_attribute): Handle indirect_branch.
28970 (ix86_attribute_table): Add indirect_branch.
28971 * config/i386/i386.h (machine_function): Add indirect_branch_type
28972 and has_local_indirect_jump.
28973 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
28975 (tablejump): Likewise.
28976 (*indirect_jump): Use ix86_output_indirect_jmp.
28977 (*tablejump_1): Likewise.
28978 (simple_return_indirect_internal): Likewise.
28979 * config/i386/i386.opt (mindirect-branch=): New option.
28980 (indirect_branch): New.
28983 (thunk-inline): Likewise.
28984 (thunk-extern): Likewise.
28985 * doc/extend.texi: Document indirect_branch function attribute.
28986 * doc/invoke.texi: Document -mindirect-branch= option.
28988 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
28991 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
28993 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
28995 * ipa-inline.c (want_inline_small_function_p): Return false if
28996 inlining has already failed with CIF_FINAL_ERROR.
28997 (update_caller_keys): Call want_inline_small_function_p before
28999 (update_callee_keys): Likewise.
29001 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
29003 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
29005 (rs6000_quadword_masked_address_p): Likewise.
29006 (quad_aligned_load_p): Likewise.
29007 (quad_aligned_store_p): Likewise.
29008 (const_load_sequence_p): Add comment to describe the outer-most loop.
29009 (mimic_memory_attributes_and_flags): New function.
29010 (rs6000_gen_stvx): Likewise.
29011 (replace_swapped_aligned_store): Likewise.
29012 (rs6000_gen_lvx): Likewise.
29013 (replace_swapped_aligned_load): Likewise.
29014 (replace_swapped_load_constant): Capitalize argument name in
29015 comment describing this function.
29016 (rs6000_analyze_swaps): Add a third pass to search for vector loads
29017 and stores that access quad-word aligned addresses and replace
29018 with stvx or lvx instructions when appropriate.
29019 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
29020 New function prototype.
29021 (rs6000_quadword_masked_address_p): Likewise.
29022 (rs6000_gen_lvx): Likewise.
29023 (rs6000_gen_stvx): Likewise.
29024 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
29025 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
29026 when memory address is aligned.
29027 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
29028 this split to select lvx instruction when memory address is aligned.
29029 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
29030 instruction when memory address is aligned.
29031 (*vsx_le_perm_load_v16qi): Likewise.
29032 (four unnamed splitters): Modify to select the stvx instruction
29033 when memory is aligned.
29035 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
29037 * predict.c (determine_unlikely_bbs): Handle correctly BBs
29038 which appears in the queue multiple times.
29040 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29041 Alan Hayward <alan.hayward@arm.com>
29042 David Sherwood <david.sherwood@arm.com>
29044 * tree-vectorizer.h (vec_lower_bound): New structure.
29045 (_loop_vec_info): Add check_nonzero and lower_bounds.
29046 (LOOP_VINFO_CHECK_NONZERO): New macro.
29047 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
29048 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
29049 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
29050 fields. Make seg_len the distance travelled, not including the
29052 (dr_direction_indicator): Declare.
29053 (dr_zero_step_indicator): Likewise.
29054 (dr_known_forward_stride_p): Likewise.
29055 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
29057 (runtime_alias_check_p): Allow runtime alias checks with
29059 (operator ==): Compare access_size and align.
29060 (prune_runtime_alias_test_list): Rework for new distinction between
29061 the access_size and seg_len.
29062 (create_intersect_range_checks_index): Likewise. Cope with polynomial
29064 (get_segment_min_max): New function.
29065 (create_intersect_range_checks): Use it.
29066 (dr_step_indicator): New function.
29067 (dr_direction_indicator): Likewise.
29068 (dr_zero_step_indicator): Likewise.
29069 (dr_known_forward_stride_p): Likewise.
29070 * tree-loop-distribution.c (data_ref_segment_size): Return
29071 DR_STEP * (niters - 1).
29072 (compute_alias_check_pairs): Update call to the dr_with_seg_len
29074 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
29075 (vect_preserves_scalar_order_p): New function, split out from...
29076 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
29077 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
29078 (vect_vfa_access_size): New function.
29079 (vect_vfa_align): Likewise.
29080 (vect_compile_time_alias): Take access_size_a and access_b arguments.
29081 (dump_lower_bound): New function.
29082 (vect_check_lower_bound): Likewise.
29083 (vect_small_gap_p): Likewise.
29084 (vectorizable_with_step_bound_p): Likewise.
29085 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
29086 depencies if the vectorization factor is 1. Convert the checks
29087 for nonzero steps into checks on the bounds of DR_STEP. Try using
29088 a bunds check for variable steps if the minimum required step is
29089 relatively small. Update calls to the dr_with_seg_len
29090 constructor and to vect_compile_time_alias.
29091 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
29093 (vect_loop_versioning): Call it.
29094 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
29096 (vect_estimate_min_profitable_iters): Account for any bounds checks.
29098 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29099 Alan Hayward <alan.hayward@arm.com>
29100 David Sherwood <david.sherwood@arm.com>
29102 * doc/sourcebuild.texi (vect_scatter_store): Document.
29103 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
29105 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
29107 * genopinit.c (main): Add supports_vec_scatter_store and
29108 supports_vec_scatter_store_cached to target_optabs.
29109 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
29110 IFN_MASK_SCATTER_STORE.
29111 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
29113 * internal-fn.h (internal_store_fn_p): Declare.
29114 (internal_fn_stored_value_index): Likewise.
29115 * internal-fn.c (scatter_store_direct): New macro.
29116 (expand_scatter_store_optab_fn): New function.
29117 (direct_scatter_store_optab_supported_p): New macro.
29118 (internal_store_fn_p): New function.
29119 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
29120 IFN_MASK_SCATTER_STORE.
29121 (internal_fn_mask_index): Likewise.
29122 (internal_fn_stored_value_index): New function.
29123 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
29124 for scatter stores.
29125 * optabs-query.h (supports_vec_scatter_store_p): Declare.
29126 * optabs-query.c (supports_vec_scatter_store_p): New function.
29127 * tree-vectorizer.h (vect_get_store_rhs): Declare.
29128 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
29129 true for scatter stores.
29130 (vect_gather_scatter_fn_p): Handle scatter stores too.
29131 (vect_check_gather_scatter): Consider using scatter stores if
29132 supports_vec_scatter_store_p.
29133 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
29134 scatter stores too.
29135 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
29136 internal_fn_stored_value_index.
29137 (check_load_store_masking): Handle scatter stores too.
29138 (vect_get_store_rhs): Make public.
29139 (vectorizable_call): Use internal_store_fn_p.
29140 (vectorizable_store): Handle scatter store internal functions.
29141 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
29142 when deciding whether the end of the group has been reached.
29143 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
29144 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
29145 (mask_scatter_store<mode>): New insns.
29147 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29148 Alan Hayward <alan.hayward@arm.com>
29149 David Sherwood <david.sherwood@arm.com>
29151 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
29152 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
29153 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
29155 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
29156 Use vect_truncate_gather_scatter_offset if we can't treat the
29157 operation as a normal gather load or scatter store.
29158 (get_group_load_store_type): Take the gather_scatter_info
29159 as argument. Try using a gather load or scatter store for
29160 single-element groups.
29161 (get_load_store_type): Update calls to get_group_load_store_type
29162 and vect_use_strided_gather_scatters_p.
29164 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29165 Alan Hayward <alan.hayward@arm.com>
29166 David Sherwood <david.sherwood@arm.com>
29168 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
29169 optional tree argument.
29170 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
29172 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
29173 but continue to use the current value as a fallback.
29174 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
29175 to compare the updates.
29176 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
29177 (get_load_store_type): Use it when handling a strided access.
29178 (vect_get_strided_load_store_ops): New function.
29179 (vect_get_data_ptr_increment): Likewise.
29180 (vectorizable_load): Handle strided gather loads. Always pass
29181 a step to vect_create_data_ref_ptr and bump_vector_ptr.
29183 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29184 Alan Hayward <alan.hayward@arm.com>
29185 David Sherwood <david.sherwood@arm.com>
29187 * doc/md.texi (gather_load@var{m}): Document.
29188 (mask_gather_load@var{m}): Likewise.
29189 * genopinit.c (main): Add supports_vec_gather_load and
29190 supports_vec_gather_load_cached to target_optabs.
29191 * optabs-tree.c (init_tree_optimization_optabs): Use
29192 ggc_cleared_alloc to allocate target_optabs.
29193 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
29194 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
29196 * internal-fn.h (internal_load_fn_p): Declare.
29197 (internal_gather_scatter_fn_p): Likewise.
29198 (internal_fn_mask_index): Likewise.
29199 (internal_gather_scatter_fn_supported_p): Likewise.
29200 * internal-fn.c (gather_load_direct): New macro.
29201 (expand_gather_load_optab_fn): New function.
29202 (direct_gather_load_optab_supported_p): New macro.
29203 (direct_internal_fn_optab): New function.
29204 (internal_load_fn_p): Likewise.
29205 (internal_gather_scatter_fn_p): Likewise.
29206 (internal_fn_mask_index): Likewise.
29207 (internal_gather_scatter_fn_supported_p): Likewise.
29208 * optabs-query.c (supports_at_least_one_mode_p): New function.
29209 (supports_vec_gather_load_p): Likewise.
29210 * optabs-query.h (supports_vec_gather_load_p): Declare.
29211 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
29212 and memory_type field.
29213 (NUM_PATTERNS): Bump to 15.
29214 * tree-vect-data-refs.c: Include internal-fn.h.
29215 (vect_gather_scatter_fn_p): New function.
29216 (vect_describe_gather_scatter_call): Likewise.
29217 (vect_check_gather_scatter): Try using internal functions for
29218 gather loads. Recognize existing calls to a gather load function.
29219 (vect_analyze_data_refs): Consider using gather loads if
29220 supports_vec_gather_load_p.
29221 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
29222 (vect_get_gather_scatter_offset_type): Likewise.
29223 (vect_convert_mask_for_vectype): Likewise.
29224 (vect_add_conversion_to_patterm): Likewise.
29225 (vect_try_gather_scatter_pattern): Likewise.
29226 (vect_recog_gather_scatter_pattern): New pattern recognizer.
29227 (vect_vect_recog_func_ptrs): Add it.
29228 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
29229 internal_fn_mask_index and internal_gather_scatter_fn_p.
29230 (check_load_store_masking): Take the gather_scatter_info as an
29231 argument and handle gather loads.
29232 (vect_get_gather_scatter_ops): New function.
29233 (vectorizable_call): Check internal_load_fn_p.
29234 (vectorizable_load): Likewise. Handle gather load internal
29236 (vectorizable_store): Update call to check_load_store_masking.
29237 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
29238 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
29239 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
29240 (aarch64_gather_scale_operand_d): New predicates.
29241 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
29242 (mask_gather_load<mode>): New insns.
29244 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29245 Alan Hayward <alan.hayward@arm.com>
29246 David Sherwood <david.sherwood@arm.com>
29248 * optabs.def (fold_left_plus_optab): New optab.
29249 * doc/md.texi (fold_left_plus_@var{m}): Document.
29250 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
29251 * internal-fn.c (fold_left_direct): Define.
29252 (expand_fold_left_optab_fn): Likewise.
29253 (direct_fold_left_optab_supported_p): Likewise.
29254 * fold-const-call.c (fold_const_fold_left): New function.
29255 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
29256 * tree-parloops.c (valid_reduction_p): New function.
29257 (gather_scalar_reductions): Use it.
29258 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
29259 (vect_finish_replace_stmt): Declare.
29260 * tree-vect-loop.c (fold_left_reduction_fn): New function.
29261 (needs_fold_left_reduction_p): New function, split out from...
29262 (vect_is_simple_reduction): ...here. Accept reductions that
29263 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
29264 (vect_force_simple_reduction): Also store the reduction type in
29265 the assignment's STMT_VINFO_REDUC_TYPE.
29266 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
29267 (merge_with_identity): New function.
29268 (vect_expand_fold_left): Likewise.
29269 (vectorize_fold_left_reduction): Likewise.
29270 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
29271 scalar phi in place for it. Check for target support and reject
29272 cases that would reassociate the operation. Defer the transform
29273 phase to vectorize_fold_left_reduction.
29274 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
29275 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
29276 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
29278 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29280 * tree-if-conv.c (predicate_mem_writes): Remove redundant
29281 call to ifc_temp_var.
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 * target.def (legitimize_address_displacement): Take the original
29288 offset as a poly_int.
29289 * targhooks.h (default_legitimize_address_displacement): Update
29291 * targhooks.c (default_legitimize_address_displacement): Likewise.
29292 * doc/tm.texi: Regenerate.
29293 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
29294 as an argument, moving assert of ad->disp == ad->disp_term to...
29295 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
29296 Try calling targetm.legitimize_address_displacement before expanding
29297 the address rather than afterwards, and adjust for the new interface.
29298 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
29299 Match the new hook interface. Handle SVE addresses.
29300 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
29301 new hook interface.
29303 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29305 * Makefile.in (OBJS): Add early-remat.o.
29306 * target.def (select_early_remat_modes): New hook.
29307 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
29308 * doc/tm.texi: Regenerate.
29309 * targhooks.h (default_select_early_remat_modes): Declare.
29310 * targhooks.c (default_select_early_remat_modes): New function.
29311 * timevar.def (TV_EARLY_REMAT): New timevar.
29312 * passes.def (pass_early_remat): New pass.
29313 * tree-pass.h (make_pass_early_remat): Declare.
29314 * early-remat.c: New file.
29315 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
29317 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
29319 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29320 Alan Hayward <alan.hayward@arm.com>
29321 David Sherwood <david.sherwood@arm.com>
29323 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
29324 vfm1 with a bound_epilog parameter.
29325 (vect_do_peeling): Update calls accordingly, and move the prologue
29326 call earlier in the function. Treat the base bound_epilog as 0 for
29327 fully-masked loops and retain vf - 1 for other loops. Add 1 to
29328 this base when peeling for gaps.
29329 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
29330 with fully-masked loops.
29331 (vect_estimate_min_profitable_iters): Handle the single peeled
29332 iteration in that case.
29334 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29335 Alan Hayward <alan.hayward@arm.com>
29336 David Sherwood <david.sherwood@arm.com>
29338 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
29339 single-element interleaving even if the size is not a power of 2.
29340 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
29341 accesses for single-element interleaving if the group size is
29344 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29345 Alan Hayward <alan.hayward@arm.com>
29346 David Sherwood <david.sherwood@arm.com>
29348 * doc/md.texi (fold_extract_last_@var{m}): Document.
29349 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
29350 * optabs.def (fold_extract_last_optab): New optab.
29351 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
29352 * internal-fn.c (fold_extract_direct): New macro.
29353 (expand_fold_extract_optab_fn): Likewise.
29354 (direct_fold_extract_optab_supported_p): Likewise.
29355 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
29356 * tree-vect-loop.c (vect_model_reduction_cost): Handle
29357 EXTRACT_LAST_REDUCTION.
29358 (get_initial_def_for_reduction): Do not create an initial vector
29359 for EXTRACT_LAST_REDUCTION reductions.
29360 (vectorizable_reduction): Leave the scalar phi in place for
29361 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
29362 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
29363 epilogue code for EXTRACT_LAST_REDUCTION and defer the
29364 transform phase to vectorizable_condition.
29365 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
29367 (vect_finish_stmt_generation): ...here.
29368 (vect_finish_replace_stmt): New function.
29369 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
29370 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
29372 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
29374 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29375 Alan Hayward <alan.hayward@arm.com>
29376 David Sherwood <david.sherwood@arm.com>
29378 * doc/md.texi (extract_last_@var{m}): Document.
29379 * optabs.def (extract_last_optab): New optab.
29380 * internal-fn.def (EXTRACT_LAST): New internal function.
29381 * internal-fn.c (cond_unary_direct): New macro.
29382 (expand_cond_unary_optab_fn): Likewise.
29383 (direct_cond_unary_optab_supported_p): Likewise.
29384 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
29385 loops using EXTRACT_LAST.
29386 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
29387 (extract_last_<mode>): ...this optab.
29388 (vec_extract<mode><Vel>): Update accordingly.
29390 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29391 Alan Hayward <alan.hayward@arm.com>
29392 David Sherwood <david.sherwood@arm.com>
29394 * target.def (empty_mask_is_expensive): New hook.
29395 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
29396 * doc/tm.texi: Regenerate.
29397 * targhooks.h (default_empty_mask_is_expensive): Declare.
29398 * targhooks.c (default_empty_mask_is_expensive): New function.
29399 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
29400 if the target says that empty masks are expensive.
29401 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
29403 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
29405 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29406 Alan Hayward <alan.hayward@arm.com>
29407 David Sherwood <david.sherwood@arm.com>
29409 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
29410 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
29411 (vect_use_loop_mask_for_alignment_p): New function.
29412 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
29413 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
29414 niters_skip argument. Make sure that the first niters_skip elements
29415 of the first iteration are inactive.
29416 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
29417 Update call to vect_set_loop_masks_directly.
29418 (get_misalign_in_elems): New function, split out from...
29419 (vect_gen_prolog_loop_niters): ...here.
29420 (vect_update_init_of_dr): Take a code argument that specifies whether
29421 the adjustment should be added or subtracted.
29422 (vect_update_init_of_drs): Likewise.
29423 (vect_prepare_for_masked_peels): New function.
29424 (vect_do_peeling): Skip prologue peeling if we're using a mask
29425 instead. Update call to vect_update_inits_of_drs.
29426 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
29428 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
29429 alignment. Do not include the number of peeled iterations in
29430 the minimum threshold in that case.
29431 (vectorizable_induction): Adjust the start value down by
29432 LOOP_VINFO_MASK_SKIP_NITERS iterations.
29433 (vect_transform_loop): Call vect_prepare_for_masked_peels.
29434 Take the number of skipped iterations into account when calculating
29436 * tree-vect-stmts.c (vect_gen_while_not): New function.
29438 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29439 Alan Hayward <alan.hayward@arm.com>
29440 David Sherwood <david.sherwood@arm.com>
29442 * doc/sourcebuild.texi (vect_fully_masked): Document.
29443 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
29444 default value to 0.
29445 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
29447 (vect_analyze_loop_2): ...here. Don't check the vectorization
29448 factor against the number of loop iterations if the loop is
29451 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29452 Alan Hayward <alan.hayward@arm.com>
29453 David Sherwood <david.sherwood@arm.com>
29455 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
29456 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
29457 (dump_groups): Update accordingly.
29458 (iv_use::mem_type): New member variable.
29459 (address_p): New function.
29460 (record_use): Add a mem_type argument and initialize the new
29462 (record_group_use): Add a mem_type argument. Use address_p.
29463 Remove obsolete null checks of base_object. Update call to record_use.
29464 (find_interesting_uses_op): Update call to record_group_use.
29465 (find_interesting_uses_cond): Likewise.
29466 (find_interesting_uses_address): Likewise.
29467 (get_mem_type_for_internal_fn): New function.
29468 (find_address_like_use): Likewise.
29469 (find_interesting_uses_stmt): Try find_address_like_use before
29470 calling find_interesting_uses_op.
29471 (addr_offset_valid_p): Use the iv mem_type field as the type
29472 of the addressed memory.
29473 (add_autoinc_candidates): Likewise.
29474 (get_address_cost): Likewise.
29475 (split_small_address_groups_p): Use address_p.
29476 (split_address_groups): Likewise.
29477 (add_iv_candidate_for_use): Likewise.
29478 (autoinc_possible_for_pair): Likewise.
29479 (rewrite_groups): Likewise.
29480 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
29481 (determine_group_iv_cost): Update after split of USE_ADDRESS.
29482 (get_alias_ptr_type_for_ptr_address): New function.
29483 (rewrite_use_address): Rewrite address uses in calls that were
29484 identified by find_address_like_use.
29486 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29487 Alan Hayward <alan.hayward@arm.com>
29488 David Sherwood <david.sherwood@arm.com>
29490 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
29492 * gimple-expr.h (is_gimple_addressable: Likewise.
29493 * gimple-expr.c (is_gimple_address): Likewise.
29494 * internal-fn.c (expand_call_mem_ref): New function.
29495 (expand_mask_load_optab_fn): Use it.
29496 (expand_mask_store_optab_fn): Likewise.
29498 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29499 Alan Hayward <alan.hayward@arm.com>
29500 David Sherwood <david.sherwood@arm.com>
29502 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
29503 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
29504 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
29505 (cond_umax@var{mode}): Document.
29506 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
29507 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
29508 (cond_umin_optab, cond_umax_optab): New optabs.
29509 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
29510 (COND_IOR, COND_XOR): New internal functions.
29511 * internal-fn.h (get_conditional_internal_fn): Declare.
29512 * internal-fn.c (cond_binary_direct): New macro.
29513 (expand_cond_binary_optab_fn): Likewise.
29514 (direct_cond_binary_optab_supported_p): Likewise.
29515 (get_conditional_internal_fn): New function.
29516 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
29517 Cope with reduction statements that are vectorized as calls rather
29519 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
29520 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
29521 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
29522 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
29523 (UNSPEC_COND_EOR): New unspecs.
29524 (optab): Add mappings for them.
29525 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
29526 (sve_int_op, sve_fp_op): New int attributes.
29528 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29529 Alan Hayward <alan.hayward@arm.com>
29530 David Sherwood <david.sherwood@arm.com>
29532 * optabs.def (while_ult_optab): New optab.
29533 * doc/md.texi (while_ult@var{m}@var{n}): Document.
29534 * internal-fn.def (WHILE_ULT): New internal function.
29535 * internal-fn.h (direct_internal_fn_supported_p): New override
29536 that takes two types as argument.
29537 * internal-fn.c (while_direct): New macro.
29538 (expand_while_optab_fn): New function.
29539 (convert_optab_supported_p): Likewise.
29540 (direct_while_optab_supported_p): New macro.
29541 * wide-int.h (wi::udiv_ceil): New function.
29542 * tree-vectorizer.h (rgroup_masks): New structure.
29543 (vec_loop_masks): New typedef.
29544 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
29545 and fully_masked_p.
29546 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
29547 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
29548 (vect_max_vf): New function.
29549 (slpeel_make_loop_iterate_ntimes): Delete.
29550 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
29551 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
29552 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
29553 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
29554 internal-fn.h, stor-layout.h and optabs-query.h.
29555 (vect_set_loop_mask): New function.
29556 (add_preheader_seq): Likewise.
29557 (add_header_seq): Likewise.
29558 (interleave_supported_p): Likewise.
29559 (vect_maybe_permute_loop_masks): Likewise.
29560 (vect_set_loop_masks_directly): Likewise.
29561 (vect_set_loop_condition_masked): Likewise.
29562 (vect_set_loop_condition_unmasked): New function, split out from
29563 slpeel_make_loop_iterate_ntimes.
29564 (slpeel_make_loop_iterate_ntimes): Rename to..
29565 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
29566 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
29567 (vect_do_peeling): Update call accordingly.
29568 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
29570 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
29571 mask_compare_type, can_fully_mask_p and fully_masked_p.
29572 (release_vec_loop_masks): New function.
29573 (_loop_vec_info): Use it to free the loop masks.
29574 (can_produce_all_loop_masks_p): New function.
29575 (vect_get_max_nscalars_per_iter): Likewise.
29576 (vect_verify_full_masking): Likewise.
29577 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
29578 retries, and free the mask rgroups before retrying. Check loop-wide
29579 reasons for disallowing fully-masked loops. Make the final decision
29580 about whether use a fully-masked loop or not.
29581 (vect_estimate_min_profitable_iters): Do not assume that peeling
29582 for the number of iterations will be needed for fully-masked loops.
29583 (vectorizable_reduction): Disable fully-masked loops.
29584 (vectorizable_live_operation): Likewise.
29585 (vect_halve_mask_nunits): New function.
29586 (vect_double_mask_nunits): Likewise.
29587 (vect_record_loop_mask): Likewise.
29588 (vect_get_loop_mask): Likewise.
29589 (vect_transform_loop): Handle the case in which the final loop
29590 iteration might handle a partial vector. Call vect_set_loop_condition
29591 instead of slpeel_make_loop_iterate_ntimes.
29592 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
29593 (check_load_store_masking): New function.
29594 (prepare_load_store_mask): Likewise.
29595 (vectorizable_store): Handle fully-masked loops.
29596 (vectorizable_load): Likewise.
29597 (supportable_widening_operation): Use vect_halve_mask_nunits for
29599 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
29600 (vect_gen_while): New function.
29601 * config/aarch64/aarch64.md (umax<mode>3): New expander.
29602 (aarch64_uqdec<mode>): New insn.
29604 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29605 Alan Hayward <alan.hayward@arm.com>
29606 David Sherwood <david.sherwood@arm.com>
29608 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
29609 (reduc_xor_scal_optab): New optabs.
29610 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
29611 (reduc_xor_scal_@var{m}): Document.
29612 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
29613 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
29614 internal functions.
29615 * fold-const-call.c (fold_const_call): Handle them.
29616 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
29617 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
29618 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
29619 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
29620 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
29621 (UNSPEC_XORV): New unspecs.
29622 (optab): Add entries for them.
29623 (BITWISEV): New int iterator.
29624 (bit_reduc_op): New int attributes.
29626 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29627 Alan Hayward <alan.hayward@arm.com>
29628 David Sherwood <david.sherwood@arm.com>
29630 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
29631 * internal-fn.def (VEC_SHL_INSERT): New internal function.
29632 * optabs.def (vec_shl_insert_optab): New optab.
29633 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
29634 (duplicate_and_interleave): Likewise.
29635 * tree-vect-loop.c: Include internal-fn.h.
29636 (neutral_op_for_slp_reduction): New function, split out from
29637 get_initial_defs_for_reduction.
29638 (get_initial_def_for_reduction): Handle option 2 for variable-length
29639 vectors by loading the neutral value into a vector and then shifting
29640 the initial value into element 0.
29641 (get_initial_defs_for_reduction): Replace the code argument with
29642 the neutral value calculated by neutral_op_for_slp_reduction.
29643 Use gimple_build_vector for constant-length vectors.
29644 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
29645 but the first group_size elements have a neutral value.
29646 Use duplicate_and_interleave otherwise.
29647 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
29648 Update call to get_initial_defs_for_reduction. Handle SLP
29649 reductions for variable-length vectors by creating one vector
29650 result for each scalar result, with the elements associated
29651 with other scalar results stubbed out with the neutral value.
29652 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
29653 Require IFN_VEC_SHL_INSERT for double reductions on
29654 variable-length vectors, or SLP reductions that have
29655 a neutral value. Require can_duplicate_and_interleave_p
29656 support for variable-length unchained SLP reductions if there
29657 is no neutral value, such as for MIN/MAX reductions. Also require
29658 the number of vector elements to be a multiple of the number of
29659 SLP statements when doing variable-length unchained SLP reductions.
29660 Update call to vect_create_epilog_for_reduction.
29661 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
29662 and remove initial values.
29663 (duplicate_and_interleave): Make public.
29664 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
29665 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
29667 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29668 Alan Hayward <alan.hayward@arm.com>
29669 David Sherwood <david.sherwood@arm.com>
29671 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
29672 (can_duplicate_and_interleave_p): New function.
29673 (vect_get_and_check_slp_defs): Take the vector of statements
29674 rather than just the current one. Remove excess parentheses.
29675 Restriction rejectinon of vect_constant_def and vect_external_def
29676 for variable-length vectors to boolean types, or types for which
29677 can_duplicate_and_interleave_p is false.
29678 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
29679 (duplicate_and_interleave): New function.
29680 (vect_get_constant_vectors): Use gimple_build_vector for
29681 constant-length vectors and suitable variable-length constant
29682 vectors. Use duplicate_and_interleave for other variable-length
29683 vectors. Don't defer the update when inserting new statements.
29685 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29686 Alan Hayward <alan.hayward@arm.com>
29687 David Sherwood <david.sherwood@arm.com>
29689 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
29690 min_profitable_iters doesn't go negative.
29692 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29693 Alan Hayward <alan.hayward@arm.com>
29694 David Sherwood <david.sherwood@arm.com>
29696 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
29697 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
29698 * optabs.def (vec_mask_load_lanes_optab): New optab.
29699 (vec_mask_store_lanes_optab): Likewise.
29700 * internal-fn.def (MASK_LOAD_LANES): New internal function.
29701 (MASK_STORE_LANES): Likewise.
29702 * internal-fn.c (mask_load_lanes_direct): New macro.
29703 (mask_store_lanes_direct): Likewise.
29704 (expand_mask_load_optab_fn): Handle masked operations.
29705 (expand_mask_load_lanes_optab_fn): New macro.
29706 (expand_mask_store_optab_fn): Handle masked operations.
29707 (expand_mask_store_lanes_optab_fn): New macro.
29708 (direct_mask_load_lanes_optab_supported_p): Likewise.
29709 (direct_mask_store_lanes_optab_supported_p): Likewise.
29710 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
29712 (vect_load_lanes_supported): Likewise.
29713 * tree-vect-data-refs.c (strip_conversion): New function.
29714 (can_group_stmts_p): Likewise.
29715 (vect_analyze_data_ref_accesses): Use it instead of checking
29716 for a pair of assignments.
29717 (vect_store_lanes_supported): Take a masked_p parameter.
29718 (vect_load_lanes_supported): Likewise.
29719 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
29720 vect_store_lanes_supported and vect_load_lanes_supported.
29721 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
29722 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
29723 parameter. Don't allow gaps for masked accesses.
29724 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
29725 and vect_load_lanes_supported.
29726 (get_load_store_type): Take a masked_p parameter and update
29727 call to get_group_load_store_type.
29728 (vectorizable_store): Update call to get_load_store_type.
29729 Handle IFN_MASK_STORE_LANES.
29730 (vectorizable_load): Update call to get_load_store_type.
29731 Handle IFN_MASK_LOAD_LANES.
29733 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29734 Alan Hayward <alan.hayward@arm.com>
29735 David Sherwood <david.sherwood@arm.com>
29737 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
29739 * config/aarch64/aarch64-protos.h
29740 (aarch64_sve_struct_memory_operand_p): Declare.
29741 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
29742 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
29743 (VPRED, vpred): Handle SVE structure modes.
29744 * config/aarch64/constraints.md (Utx): New constraint.
29745 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
29746 (aarch64_sve_struct_nonimmediate_operand): New predicates.
29747 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
29748 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
29749 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
29750 structure modes. Split into pieces after RA.
29751 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
29752 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
29754 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
29755 SVE structure modes.
29756 (aarch64_classify_address): Likewise.
29757 (sizetochar): Move earlier in file.
29758 (aarch64_print_operand): Handle SVE register lists.
29759 (aarch64_array_mode): New function.
29760 (aarch64_sve_struct_memory_operand_p): Likewise.
29761 (TARGET_ARRAY_MODE): Redefine.
29763 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29764 Alan Hayward <alan.hayward@arm.com>
29765 David Sherwood <david.sherwood@arm.com>
29767 * target.def (array_mode): New target hook.
29768 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
29769 * doc/tm.texi: Regenerate.
29770 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
29771 * hooks.c (hook_optmode_mode_uhwi_none): New function.
29772 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
29773 targetm.array_mode.
29774 * stor-layout.c (mode_for_array): Likewise. Support polynomial
29777 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29778 Alan Hayward <alan.hayward@arm.com>
29779 David Sherwood <david.sherwood@arm.com>
29781 * fold-const.c (fold_binary_loc): Check the argument types
29782 rather than the result type when testing for a vector operation.
29784 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29786 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
29787 * doc/tm.texi: Regenerate.
29789 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29790 Alan Hayward <alan.hayward@arm.com>
29791 David Sherwood <david.sherwood@arm.com>
29793 * doc/invoke.texi (-msve-vector-bits=): Document new option.
29794 (sve): Document new AArch64 extension.
29795 * doc/md.texi (w): Extend the description of the AArch64
29796 constraint to include SVE vectors.
29797 (Upl, Upa): Document new AArch64 predicate constraints.
29798 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
29800 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
29801 (msve-vector-bits=): New option.
29802 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
29803 SVE when these are disabled.
29804 (sve): New extension.
29805 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
29806 modes. Adjust their number of units based on aarch64_sve_vg.
29807 (MAX_BITSIZE_MODE_ANY_MODE): Define.
29808 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
29809 aarch64_addr_query_type.
29810 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
29811 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
29812 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
29813 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
29814 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
29815 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
29816 (aarch64_simd_imm_zero_p): Delete.
29817 (aarch64_check_zero_based_sve_index_immediate): Declare.
29818 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
29819 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
29820 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
29821 (aarch64_sve_float_mul_immediate_p): Likewise.
29822 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
29823 rather than an rtx.
29824 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
29825 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
29826 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
29827 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
29828 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
29829 (aarch64_regmode_natural_size): Likewise.
29830 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
29831 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
29833 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
29834 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
29835 for VG and the SVE predicate registers.
29836 (V_ALIASES): Add a "z"-prefixed alias.
29837 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
29838 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
29839 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
29840 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
29841 (REG_CLASS_NAMES): Add entries for them.
29842 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
29843 and the predicate registers.
29844 (aarch64_sve_vg): Declare.
29845 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
29846 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
29847 (REGMODE_NATURAL_SIZE): Define.
29848 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
29850 * config/aarch64/aarch64.c: Include cfgrtl.h.
29851 (simd_immediate_info): Add a constructor for series vectors,
29852 and an associated step field.
29853 (aarch64_sve_vg): New variable.
29854 (aarch64_dbx_register_number): Handle VG and the predicate registers.
29855 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
29856 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
29857 (VEC_ANY_DATA, VEC_STRUCT): New constants.
29858 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
29859 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
29860 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
29861 (aarch64_get_mask_mode): New functions.
29862 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
29863 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
29864 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
29865 predicate modes and predicate registers. Explicitly restrict
29866 GPRs to modes of 16 bytes or smaller. Only allow FP registers
29867 to store a vector mode if it is recognized by
29868 aarch64_classify_vector_mode.
29869 (aarch64_regmode_natural_size): New function.
29870 (aarch64_hard_regno_caller_save_mode): Return the original mode
29872 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
29873 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
29874 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
29875 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
29877 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
29878 does not overlap dest if the function is frame-related. Handle
29880 (aarch64_split_add_offset): New function.
29881 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
29882 them aarch64_add_offset.
29883 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
29884 and update call to aarch64_sub_sp.
29885 (aarch64_add_cfa_expression): New function.
29886 (aarch64_expand_prologue): Pass extra temporary registers to the
29887 functions above. Handle the case in which we need to emit new
29888 DW_CFA_expressions for registers that were originally saved
29889 relative to the stack pointer, but now have to be expressed
29890 relative to the frame pointer.
29891 (aarch64_output_mi_thunk): Pass extra temporary registers to the
29893 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
29894 IP0 and IP1 values for SVE frames.
29895 (aarch64_expand_vec_series): New function.
29896 (aarch64_expand_sve_widened_duplicate): Likewise.
29897 (aarch64_expand_sve_const_vector): Likewise.
29898 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
29899 Handle SVE constants. Use emit_move_insn to move a force_const_mem
29900 into the register, rather than emitting a SET directly.
29901 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
29902 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
29903 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
29904 (offset_9bit_signed_scaled_p): New functions.
29905 (aarch64_replicate_bitmask_imm): New function.
29906 (aarch64_bitmask_imm): Use it.
29907 (aarch64_cannot_force_const_mem): Reject expressions involving
29908 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
29909 (aarch64_classify_index): Handle SVE indices, by requiring
29910 a plain register index with a scale that matches the element size.
29911 (aarch64_classify_address): Handle SVE addresses. Assert that
29912 the mode of the address is VOIDmode or an integer mode.
29913 Update call to aarch64_classify_symbol.
29914 (aarch64_classify_symbolic_expression): Update call to
29915 aarch64_classify_symbol.
29916 (aarch64_const_vec_all_in_range_p): New function.
29917 (aarch64_print_vector_float_operand): Likewise.
29918 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
29919 "vN" for FP registers with SVE modes. Handle (const ...) vectors
29920 and the FP immediates 1.0 and 0.5.
29921 (aarch64_print_address_internal): Handle SVE addresses.
29922 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
29923 (aarch64_regno_regclass): Handle predicate registers.
29924 (aarch64_secondary_reload): Handle big-endian reloads of SVE
29926 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
29927 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
29928 (aarch64_convert_sve_vector_bits): New function.
29929 (aarch64_override_options): Use it to handle -msve-vector-bits=.
29930 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
29931 rather than an rtx.
29932 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
29933 Handle SVE vector and predicate modes. Accept VL-based constants
29934 that need only one temporary register, and VL offsets that require
29935 no temporary registers.
29936 (aarch64_conditional_register_usage): Mark the predicate registers
29937 as fixed if SVE isn't available.
29938 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
29939 Return true for SVE vector and predicate modes.
29940 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
29941 rather than an unsigned int. Handle SVE modes.
29942 (aarch64_preferred_simd_mode): Update call accordingly. Handle
29944 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
29946 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
29947 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
29948 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
29949 (aarch64_sve_float_mul_immediate_p): New functions.
29950 (aarch64_sve_valid_immediate): New function.
29951 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
29952 Explicitly reject structure modes. Check for INDEX constants.
29953 Handle PTRUE and PFALSE constants.
29954 (aarch64_check_zero_based_sve_index_immediate): New function.
29955 (aarch64_simd_imm_zero_p): Delete.
29956 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
29957 vector modes. Accept constants in the range of CNT[BHWD].
29958 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
29959 ask for an Advanced SIMD mode.
29960 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
29961 (aarch64_simd_vector_alignment): Handle SVE predicates.
29962 (aarch64_vectorize_preferred_vector_alignment): New function.
29963 (aarch64_simd_vector_alignment_reachable): Use it instead of
29965 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
29966 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
29968 (MAX_VECT_LEN): Delete.
29969 (expand_vec_perm_d): Add a vec_flags field.
29970 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
29971 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
29972 (aarch64_evpc_ext): Don't apply a big-endian lane correction
29974 (aarch64_evpc_rev): Rename to...
29975 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
29976 (aarch64_evpc_rev_global): New function.
29977 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
29978 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
29980 (aarch64_evpc_sve_tbl): New function.
29981 (aarch64_expand_vec_perm_const_1): Update after rename of
29982 aarch64_evpc_rev. Handle SVE permutes too, trying
29983 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
29984 than aarch64_evpc_tbl.
29985 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
29986 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
29987 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
29988 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
29989 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
29990 (aarch64_expand_sve_vcond): New functions.
29991 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
29992 of aarch64_vector_mode_p.
29993 (aarch64_dwarf_poly_indeterminate_value): New function.
29994 (aarch64_compute_pressure_classes): Likewise.
29995 (aarch64_can_change_mode_class): Likewise.
29996 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
29997 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
29998 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
29999 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
30000 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
30001 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
30002 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
30003 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
30005 (Dn, Dl, Dr): Accept const as well as const_vector.
30006 (Dz): Likewise. Compare against CONST0_RTX.
30007 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
30008 of "vector" where appropriate.
30009 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
30010 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
30011 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
30012 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
30013 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
30014 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
30015 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
30016 (v_int_equiv): Extend to SVE modes.
30017 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
30019 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
30020 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
30021 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
30022 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
30023 (SVE_COND_FP_CMP): New int iterators.
30024 (perm_hilo): Handle the new unpack unspecs.
30025 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
30027 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
30028 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
30029 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
30030 (aarch64_equality_operator, aarch64_constant_vector_operand)
30031 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
30032 (aarch64_sve_nonimmediate_operand): Likewise.
30033 (aarch64_sve_general_operand): Likewise.
30034 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
30035 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
30036 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
30037 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
30038 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
30039 (aarch64_sve_float_arith_immediate): Likewise.
30040 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
30041 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
30042 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
30043 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
30044 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
30045 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
30046 (aarch64_sve_float_arith_operand): Likewise.
30047 (aarch64_sve_float_arith_with_sub_operand): Likewise.
30048 (aarch64_sve_float_mul_operand): Likewise.
30049 (aarch64_sve_vec_perm_operand): Likewise.
30050 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
30051 (aarch64_mov_operand): Accept const_poly_int and const_vector.
30052 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
30053 as well as const_vector.
30054 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
30055 in file. Use CONST0_RTX and CONSTM1_RTX.
30056 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
30057 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
30058 Use aarch64_simd_imm_zero.
30059 * config/aarch64/aarch64-sve.md: New file.
30060 * config/aarch64/aarch64.md: Include it.
30061 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
30062 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
30063 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
30064 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
30065 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
30066 (sve): New attribute.
30067 (enabled): Disable instructions with the sve attribute unless
30069 (movqi, movhi): Pass CONST_POLY_INT operaneds through
30070 aarch64_expand_mov_immediate.
30071 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
30072 CNT[BHSD] immediates.
30073 (movti): Split CONST_POLY_INT moves into two halves.
30074 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
30075 Split additions that need a temporary here if the destination
30076 is the stack pointer.
30077 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
30078 (*add<mode>3_poly_1): New instruction.
30079 (set_clobber_cc): New expander.
30081 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30083 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
30084 parameter and use it instead of GET_MODE_SIZE (innermode). Use
30085 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
30086 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
30087 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
30088 Change innermode from fixed_mode_size to machine_mode.
30089 (simplify_subreg): Update call accordingly. Handle a constant-sized
30090 subreg of a variable-length CONST_VECTOR.
30092 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30093 Alan Hayward <alan.hayward@arm.com>
30094 David Sherwood <david.sherwood@arm.com>
30096 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
30097 (add_offset_to_base): New function, split out from...
30098 (create_mem_ref): ...here. When handling a scale other than 1,
30099 check first whether the address is valid without the offset.
30100 Add it into the base if so, leaving the index and scale as-is.
30102 2018-01-12 Jakub Jelinek <jakub@redhat.com>
30105 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
30106 fold_for_warn before checking if arg2 is INTEGER_CST.
30108 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
30110 * config/rs6000/predicates.md (load_multiple_operation): Delete.
30111 (store_multiple_operation): Delete.
30112 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
30113 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
30114 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
30115 guarded by TARGET_STRING.
30116 (rs6000_output_load_multiple): Delete.
30117 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
30118 OPTION_MASK_STRING / TARGET_STRING handling.
30119 (print_operand) <'N', 'O'>: Add comment that these are unused now.
30120 (const rs6000_opt_masks) <"string">: Change mask to 0.
30121 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
30122 (MASK_STRING): Delete.
30123 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
30125 (load_multiple): Delete.
30132 (store_multiple): Delete.
30139 (movmemsi_8reg): Delete.
30140 (corresponding unnamed define_insn): Delete.
30141 (movmemsi_6reg): Delete.
30142 (corresponding unnamed define_insn): Delete.
30143 (movmemsi_4reg): Delete.
30144 (corresponding unnamed define_insn): Delete.
30145 (movmemsi_2reg): Delete.
30146 (corresponding unnamed define_insn): Delete.
30147 (movmemsi_1reg): Delete.
30148 (corresponding unnamed define_insn): Delete.
30149 * config/rs6000/rs6000.opt (mno-string): New.
30150 (mstring): Replace by deprecation warning stub.
30151 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
30153 2018-01-12 Jakub Jelinek <jakub@redhat.com>
30155 * regrename.c (regrename_do_replace): If replacing the same
30156 reg multiple times, try to reuse last created gen_raw_REG.
30159 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
30160 main to workaround a bug in GDB.
30162 2018-01-12 Tom de Vries <tom@codesourcery.com>
30165 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
30167 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
30169 PR rtl-optimization/80481
30170 * ira-color.c (get_cap_member): New function.
30171 (allocnos_conflict_by_live_ranges_p): Use it.
30172 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
30173 (setup_slot_coalesced_allocno_live_ranges): Ditto.
30175 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
30178 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
30179 (*saddl_se_1): Ditto.
30180 (*ssubsi_1): Ditto.
30181 (*ssubl_se_1): Ditto.
30183 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
30185 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
30186 rather than wi::to_widest for DR_INITs.
30187 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
30188 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
30189 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
30191 (vect_analyze_group_access_1): Note that here.
30193 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
30195 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
30196 polynomial type sizes.
30198 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
30200 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
30201 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
30202 (gimple_add_tmp_var): Likewise.
30204 2018-01-12 Martin Liska <mliska@suse.cz>
30206 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
30207 (gimple_alloc_sizes): Likewise.
30208 (dump_gimple_statistics): Use PRIu64 in printf format.
30209 * gimple.h: Change uint64_t to int.
30211 2018-01-12 Martin Liska <mliska@suse.cz>
30213 * tree-core.h: Use uint64_t instead of int.
30214 * tree.c (tree_node_counts): Likewise.
30215 (tree_node_sizes): Likewise.
30216 (dump_tree_statistics): Use PRIu64 in printf format.
30218 2018-01-12 Martin Liska <mliska@suse.cz>
30220 * Makefile.in: As qsort_chk is implemented in vec.c, add
30221 vec.o to linkage of gencfn-macros.
30222 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
30223 passing the info to record_node_allocation_statistics.
30224 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
30226 * ggc-common.c (struct ggc_usage): Add operator== and use
30227 it in operator< and compare function.
30228 * mem-stats.h (struct mem_usage): Likewise.
30229 * vec.c (struct vec_usage): Remove operator< and compare
30230 function. Can be simply inherited.
30232 2018-01-12 Martin Jambor <mjambor@suse.cz>
30235 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
30236 * tree-ssa-math-opts.c: Include domwalk.h.
30237 (convert_mult_to_fma_1): New function.
30238 (fma_transformation_info): New type.
30239 (fma_deferring_state): Likewise.
30240 (cancel_fma_deferring): New function.
30241 (result_of_phi): Likewise.
30242 (last_fma_candidate_feeds_initial_phi): Likewise.
30243 (convert_mult_to_fma): Added deferring logic, split actual
30244 transformation to convert_mult_to_fma_1.
30245 (math_opts_dom_walker): New type.
30246 (math_opts_dom_walker::after_dom_children): New method, body moved
30247 here from pass_optimize_widening_mul::execute, added deferring logic
30249 (pass_optimize_widening_mul::execute): Moved most of code to
30250 math_opts_dom_walker::after_dom_children.
30251 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
30252 * config/i386/i386.c (ix86_option_override_internal): Added
30253 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
30255 2018-01-12 Richard Biener <rguenther@suse.de>
30258 * dwarf2out.c (gen_variable_die): Do not reset old_die for
30259 inline instance vars.
30261 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
30264 * config/rx/rx.c (rx_is_restricted_memory_address):
30265 Handle SUBREG case.
30267 2018-01-12 Richard Biener <rguenther@suse.de>
30269 PR tree-optimization/80846
30270 * target.def (split_reduction): New target hook.
30271 * targhooks.c (default_split_reduction): New function.
30272 * targhooks.h (default_split_reduction): Declare.
30273 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
30274 target requests first reduce vectors by combining low and high
30276 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
30277 (get_vectype_for_scalar_type_and_size): Export.
30278 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
30279 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
30280 * doc/tm.texi: Regenerate.
30281 * config/i386/i386.c (ix86_split_reduction): Implement
30282 TARGET_VECTORIZE_SPLIT_REDUCTION.
30284 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
30287 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
30288 in PIC mode except for TARGET_VXWORKS_RTP.
30289 * config/sparc/sparc.c: Include cfgrtl.h.
30290 (TARGET_INIT_PIC_REG): Define.
30291 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
30292 (sparc_pic_register_p): New predicate.
30293 (sparc_legitimate_address_p): Use it.
30294 (sparc_legitimize_pic_address): Likewise.
30295 (sparc_delegitimize_address): Likewise.
30296 (sparc_mode_dependent_address_p): Likewise.
30297 (gen_load_pcrel_sym): Remove 4th parameter.
30298 (load_got_register): Adjust call to above. Remove obsolete stuff.
30299 (sparc_expand_prologue): Do not call load_got_register here.
30300 (sparc_flat_expand_prologue): Likewise.
30301 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
30302 (sparc_use_pseudo_pic_reg): New function.
30303 (sparc_init_pic_reg): Likewise.
30304 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
30305 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
30307 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
30309 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
30310 Add item for branch_cost.
30312 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
30314 PR rtl-optimization/83565
30315 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
30316 not extend the result to a larger mode for rotate operations.
30317 (num_sign_bit_copies1): Likewise.
30319 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
30322 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
30324 Use values-Xc.o for -pedantic.
30325 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
30327 2018-01-12 Martin Liska <mliska@suse.cz>
30330 * ipa-devirt.c (final_warning_record::grow_type_warnings):
30332 (possible_polymorphic_call_targets): Use it.
30333 (ipa_devirt): Likewise.
30335 2018-01-12 Martin Liska <mliska@suse.cz>
30337 * profile-count.h (enum profile_quality): Use 0 as invalid
30338 enum value of profile_quality.
30340 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
30342 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
30343 -mext-string options.
30345 2018-01-12 Richard Biener <rguenther@suse.de>
30347 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
30348 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
30349 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
30351 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
30353 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
30355 * configure.ac (--with-long-double-format): Add support for the
30356 configuration option to change the default long double format on
30358 * config.gcc (powerpc*-linux*-*): Likewise.
30359 * configure: Regenerate.
30360 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
30361 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
30362 used without modification.
30364 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
30366 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
30367 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
30368 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
30369 MISC_BUILTIN_SPEC_BARRIER.
30370 (rs6000_init_builtins): Likewise.
30371 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
30373 (speculation_barrier): New define_insn.
30374 * doc/extend.texi: Document __builtin_speculation_barrier.
30376 2018-01-11 Jakub Jelinek <jakub@redhat.com>
30379 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
30380 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
30381 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
30383 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
30384 integral modes instead of "ss" and "sd".
30385 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
30386 vectors with 32-bit and 64-bit elements.
30387 (vecdupssescalarmodesuffix): New mode attribute.
30388 (vec_dup<mode>): Use it.
30390 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
30393 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
30394 frame if argument is passed on stack.
30396 2018-01-11 Jakub Jelinek <jakub@redhat.com>
30399 * ree.c (combine_reaching_defs): Optimize also
30400 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
30401 reg2=any_extend(exp); reg1=reg2;, formatting fix.
30403 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
30405 PR middle-end/83189
30406 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
30408 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
30410 PR middle-end/83718
30411 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
30412 after they are computed.
30414 2018-01-11 Bin Cheng <bin.cheng@arm.com>
30416 PR tree-optimization/83695
30417 * gimple-loop-linterchange.cc
30418 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
30419 reset cached scev information after interchange.
30420 (pass_linterchange::execute): Remove call to scev_reset_htab.
30422 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
30424 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
30425 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
30426 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
30427 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
30428 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
30429 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
30430 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
30431 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
30432 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
30433 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
30434 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
30435 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
30436 (V_lane_reg): Likewise.
30437 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
30439 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
30440 (vfmal_lane_low<mode>_intrinsic,
30441 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
30442 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
30443 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
30444 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
30445 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
30446 vfmsl_lane_high<mode>_intrinsic): New define_insns.
30448 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
30450 * config/arm/arm-cpus.in (fp16fml): New feature.
30451 (ALL_SIMD): Add fp16fml.
30452 (armv8.2-a): Add fp16fml as an option.
30453 (armv8.3-a): Likewise.
30454 (armv8.4-a): Add fp16fml as part of fp16.
30455 * config/arm/arm.h (TARGET_FP16FML): Define.
30456 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
30458 * config/arm/arm-modes.def (V2HF): Define.
30459 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
30460 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
30461 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
30462 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
30463 vfmsl_low, vfmsl_high): New set of builtins.
30464 * config/arm/iterators.md (PLUSMINUS): New code iterator.
30465 (vfml_op): New code attribute.
30466 (VFMLHALVES): New int iterator.
30467 (VFML, VFMLSEL): New mode attributes.
30468 (V_reg): Define mapping for V2HF.
30469 (V_hi, V_lo): New mode attributes.
30470 (VF_constraint): Likewise.
30471 (vfml_half, vfml_half_selector): New int attributes.
30472 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
30474 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
30475 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
30477 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
30478 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
30479 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
30480 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
30482 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
30483 Document new effective target and option set.
30485 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
30487 * config/arm/arm-cpus.in (armv8_4): New feature.
30488 (ARMv8_4a): New fgroup.
30489 (armv8.4-a): New arch.
30490 * config/arm/arm-tables.opt: Regenerate.
30491 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
30492 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
30493 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
30494 Add matching rules for -march=armv8.4-a and extensions.
30495 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
30497 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
30500 * config/rx/rx.md (BW): New mode attribute.
30501 (sync_lock_test_and_setsi): Add mode suffix to insn output.
30503 2018-01-11 Richard Biener <rguenther@suse.de>
30505 PR tree-optimization/83435
30506 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
30507 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
30508 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
30510 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
30511 Alan Hayward <alan.hayward@arm.com>
30512 David Sherwood <david.sherwood@arm.com>
30514 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
30516 (aarch64_classify_address): Initialize it. Track polynomial offsets.
30517 (aarch64_print_address_internal): Use it to check for a zero offset.
30519 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
30520 Alan Hayward <alan.hayward@arm.com>
30521 David Sherwood <david.sherwood@arm.com>
30523 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
30524 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
30525 Return a poly_int64 rather than a HOST_WIDE_INT.
30526 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
30527 rather than a HOST_WIDE_INT.
30528 * config/aarch64/aarch64.h (aarch64_frame): Protect with
30529 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
30530 hard_fp_offset, frame_size, initial_adjust, callee_offset and
30531 final_offset from HOST_WIDE_INT to poly_int64.
30532 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
30533 to_constant when getting the number of units in an Advanced SIMD
30535 (aarch64_builtin_vectorized_function): Check for a constant number
30537 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
30539 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
30540 attribute instead of GET_MODE_NUNITS.
30541 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
30542 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
30543 GET_MODE_SIZE for fixed-size registers.
30544 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
30545 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
30546 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
30547 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
30548 (aarch64_print_operand, aarch64_print_address_internal)
30549 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
30550 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
30551 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
30552 Handle polynomial GET_MODE_SIZE.
30553 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
30554 wider than SImode without modification.
30555 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
30556 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
30557 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
30558 passing and returning SVE modes.
30559 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
30560 rather than GEN_INT.
30561 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
30562 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
30563 (aarch64_allocate_and_probe_stack_space): Likewise.
30564 (aarch64_layout_frame): Cope with polynomial offsets.
30565 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
30566 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
30567 polynomial offsets.
30568 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
30569 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
30570 poly_int64 rather than a HOST_WIDE_INT.
30571 (aarch64_get_separate_components, aarch64_process_components)
30572 (aarch64_expand_prologue, aarch64_expand_epilogue)
30573 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
30574 (aarch64_anchor_offset): New function, split out from...
30575 (aarch64_legitimize_address): ...here.
30576 (aarch64_builtin_vectorization_cost): Handle polynomial
30577 TYPE_VECTOR_SUBPARTS.
30578 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
30580 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
30581 number of elements from the PARALLEL rather than the mode.
30582 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
30583 rather than GET_MODE_BITSIZE.
30584 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
30585 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
30586 (aarch64_expand_vec_perm_const_1): Handle polynomial
30587 d->perm.length () and d->perm elements.
30588 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
30589 Apply to_constant to d->perm elements.
30590 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
30591 polynomial CONST_VECTOR_NUNITS.
30592 (aarch64_move_pointer): Take amount as a poly_int64 rather
30594 (aarch64_progress_pointer): Avoid temporary variable.
30595 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
30596 the mode attribute instead of GET_MODE.
30598 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
30599 Alan Hayward <alan.hayward@arm.com>
30600 David Sherwood <david.sherwood@arm.com>
30602 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
30603 x exists before using it.
30604 (aarch64_add_constant_internal): Rename to...
30605 (aarch64_add_offset_1): ...this. Replace regnum with separate
30606 src and dest rtxes. Handle the case in which they're different,
30607 including when the offset is zero. Replace scratchreg with an rtx.
30608 Use 2 additions if there is no spare register into which we can
30609 move a 16-bit constant.
30610 (aarch64_add_constant): Delete.
30611 (aarch64_add_offset): Replace reg with separate src and dest
30612 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
30613 Use aarch64_add_offset_1.
30614 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
30615 an rtx rather than an int. Take the delta as a poly_int64
30616 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
30617 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
30618 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
30619 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
30620 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
30621 and aarch64_add_sp.
30622 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
30623 aarch64_add_constant.
30625 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
30627 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
30628 Use scalar_float_mode.
30630 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
30632 * config/aarch64/aarch64-simd.md
30633 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
30634 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
30635 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
30636 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
30637 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
30638 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
30639 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
30640 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
30641 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
30642 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
30644 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
30647 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
30648 targ_options->x_arm_arch_string is non NULL.
30650 2018-01-11 Tamar Christina <tamar.christina@arm.com>
30652 * config/aarch64/aarch64.h
30653 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
30655 2018-01-11 Sudakshina Das <sudi.das@arm.com>
30658 * expmed.c (emit_store_flag_force): Swap if const op0
30659 and change VOIDmode to mode of op0.
30661 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
30663 PR rtl-optimization/83761
30664 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
30665 than bytes to mode_for_size.
30667 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
30669 PR middle-end/83189
30670 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
30671 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
30674 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
30676 PR middle-end/83575
30677 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
30678 when in layout mode.
30679 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
30680 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
30683 2018-01-10 Michael Collison <michael.collison@arm.com>
30685 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
30686 * config/aarch64/aarch64-option-extension.def: Add
30687 AARCH64_OPT_EXTENSION of 'fp16fml'.
30688 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
30689 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
30690 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
30691 * config/aarch64/constraints.md (Ui7): New constraint.
30692 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
30693 (VFMLA_SEL_W): Ditto.
30696 (VFMLA16_LOW): New int iterator.
30697 (VFMLA16_HIGH): Ditto.
30698 (UNSPEC_FMLAL): New unspec.
30699 (UNSPEC_FMLSL): Ditto.
30700 (UNSPEC_FMLAL2): Ditto.
30701 (UNSPEC_FMLSL2): Ditto.
30702 (f16mac): New code attribute.
30703 * config/aarch64/aarch64-simd-builtins.def
30704 (aarch64_fmlal_lowv2sf): Ditto.
30705 (aarch64_fmlsl_lowv2sf): Ditto.
30706 (aarch64_fmlalq_lowv4sf): Ditto.
30707 (aarch64_fmlslq_lowv4sf): Ditto.
30708 (aarch64_fmlal_highv2sf): Ditto.
30709 (aarch64_fmlsl_highv2sf): Ditto.
30710 (aarch64_fmlalq_highv4sf): Ditto.
30711 (aarch64_fmlslq_highv4sf): Ditto.
30712 (aarch64_fmlal_lane_lowv2sf): Ditto.
30713 (aarch64_fmlsl_lane_lowv2sf): Ditto.
30714 (aarch64_fmlal_laneq_lowv2sf): Ditto.
30715 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
30716 (aarch64_fmlalq_lane_lowv4sf): Ditto.
30717 (aarch64_fmlsl_lane_lowv4sf): Ditto.
30718 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
30719 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
30720 (aarch64_fmlal_lane_highv2sf): Ditto.
30721 (aarch64_fmlsl_lane_highv2sf): Ditto.
30722 (aarch64_fmlal_laneq_highv2sf): Ditto.
30723 (aarch64_fmlsl_laneq_highv2sf): Ditto.
30724 (aarch64_fmlalq_lane_highv4sf): Ditto.
30725 (aarch64_fmlsl_lane_highv4sf): Ditto.
30726 (aarch64_fmlalq_laneq_highv4sf): Ditto.
30727 (aarch64_fmlsl_laneq_highv4sf): Ditto.
30728 * config/aarch64/aarch64-simd.md:
30729 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
30730 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
30731 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
30732 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
30733 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
30734 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
30735 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
30736 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
30737 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
30738 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
30739 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
30740 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
30741 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
30742 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
30743 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
30744 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
30745 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
30746 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
30747 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
30748 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
30749 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
30750 (vfmlsl_low_u32): Ditto.
30751 (vfmlalq_low_u32): Ditto.
30752 (vfmlslq_low_u32): Ditto.
30753 (vfmlal_high_u32): Ditto.
30754 (vfmlsl_high_u32): Ditto.
30755 (vfmlalq_high_u32): Ditto.
30756 (vfmlslq_high_u32): Ditto.
30757 (vfmlal_lane_low_u32): Ditto.
30758 (vfmlsl_lane_low_u32): Ditto.
30759 (vfmlal_laneq_low_u32): Ditto.
30760 (vfmlsl_laneq_low_u32): Ditto.
30761 (vfmlalq_lane_low_u32): Ditto.
30762 (vfmlslq_lane_low_u32): Ditto.
30763 (vfmlalq_laneq_low_u32): Ditto.
30764 (vfmlslq_laneq_low_u32): Ditto.
30765 (vfmlal_lane_high_u32): Ditto.
30766 (vfmlsl_lane_high_u32): Ditto.
30767 (vfmlal_laneq_high_u32): Ditto.
30768 (vfmlsl_laneq_high_u32): Ditto.
30769 (vfmlalq_lane_high_u32): Ditto.
30770 (vfmlslq_lane_high_u32): Ditto.
30771 (vfmlalq_laneq_high_u32): Ditto.
30772 (vfmlslq_laneq_high_u32): Ditto.
30773 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
30774 (AARCH64_FL_FOR_ARCH8_4): New.
30775 (AARCH64_ISA_F16FML): New ISA flag.
30776 (TARGET_F16FML): New feature flag for fp16fml.
30777 (doc/invoke.texi): Document new fp16fml option.
30779 2018-01-10 Michael Collison <michael.collison@arm.com>
30781 * config/aarch64/aarch64-builtins.c:
30782 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
30783 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
30784 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
30785 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
30786 (AARCH64_ISA_SHA3): New ISA flag.
30787 (TARGET_SHA3): New feature flag for sha3.
30788 * config/aarch64/iterators.md (sha512_op): New int attribute.
30789 (CRYPTO_SHA512): New int iterator.
30790 (UNSPEC_SHA512H): New unspec.
30791 (UNSPEC_SHA512H2): Ditto.
30792 (UNSPEC_SHA512SU0): Ditto.
30793 (UNSPEC_SHA512SU1): Ditto.
30794 * config/aarch64/aarch64-simd-builtins.def
30795 (aarch64_crypto_sha512hqv2di): New builtin.
30796 (aarch64_crypto_sha512h2qv2di): Ditto.
30797 (aarch64_crypto_sha512su0qv2di): Ditto.
30798 (aarch64_crypto_sha512su1qv2di): Ditto.
30799 (aarch64_eor3qv8hi): Ditto.
30800 (aarch64_rax1qv2di): Ditto.
30801 (aarch64_xarqv2di): Ditto.
30802 (aarch64_bcaxqv8hi): Ditto.
30803 * config/aarch64/aarch64-simd.md:
30804 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
30805 (aarch64_crypto_sha512su0qv2di): Ditto.
30806 (aarch64_crypto_sha512su1qv2di): Ditto.
30807 (aarch64_eor3qv8hi): Ditto.
30808 (aarch64_rax1qv2di): Ditto.
30809 (aarch64_xarqv2di): Ditto.
30810 (aarch64_bcaxqv8hi): Ditto.
30811 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
30812 (vsha512h2q_u64): Ditto.
30813 (vsha512su0q_u64): Ditto.
30814 (vsha512su1q_u64): Ditto.
30815 (veor3q_u16): Ditto.
30816 (vrax1q_u64): Ditto.
30817 (vxarq_u64): Ditto.
30818 (vbcaxq_u16): Ditto.
30819 * config/arm/types.md (crypto_sha512): New type attribute.
30820 (crypto_sha3): Ditto.
30821 (doc/invoke.texi): Document new sha3 option.
30823 2018-01-10 Michael Collison <michael.collison@arm.com>
30825 * config/aarch64/aarch64-builtins.c:
30826 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
30827 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
30828 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
30829 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
30830 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
30831 (AARCH64_ISA_SM4): New ISA flag.
30832 (TARGET_SM4): New feature flag for sm4.
30833 * config/aarch64/aarch64-simd-builtins.def
30834 (aarch64_sm3ss1qv4si): Ditto.
30835 (aarch64_sm3tt1aq4si): Ditto.
30836 (aarch64_sm3tt1bq4si): Ditto.
30837 (aarch64_sm3tt2aq4si): Ditto.
30838 (aarch64_sm3tt2bq4si): Ditto.
30839 (aarch64_sm3partw1qv4si): Ditto.
30840 (aarch64_sm3partw2qv4si): Ditto.
30841 (aarch64_sm4eqv4si): Ditto.
30842 (aarch64_sm4ekeyqv4si): Ditto.
30843 * config/aarch64/aarch64-simd.md:
30844 (aarch64_sm3ss1qv4si): Ditto.
30845 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
30846 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
30847 (aarch64_sm4eqv4si): Ditto.
30848 (aarch64_sm4ekeyqv4si): Ditto.
30849 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
30850 (sm3part_op): Ditto.
30851 (CRYPTO_SM3TT): Ditto.
30852 (CRYPTO_SM3PART): Ditto.
30853 (UNSPEC_SM3SS1): New unspec.
30854 (UNSPEC_SM3TT1A): Ditto.
30855 (UNSPEC_SM3TT1B): Ditto.
30856 (UNSPEC_SM3TT2A): Ditto.
30857 (UNSPEC_SM3TT2B): Ditto.
30858 (UNSPEC_SM3PARTW1): Ditto.
30859 (UNSPEC_SM3PARTW2): Ditto.
30860 (UNSPEC_SM4E): Ditto.
30861 (UNSPEC_SM4EKEY): Ditto.
30862 * config/aarch64/constraints.md (Ui2): New constraint.
30863 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
30864 * config/arm/types.md (crypto_sm3): New type attribute.
30865 (crypto_sm4): Ditto.
30866 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
30867 (vsm3tt1aq_u32): Ditto.
30868 (vsm3tt1bq_u32): Ditto.
30869 (vsm3tt2aq_u32): Ditto.
30870 (vsm3tt2bq_u32): Ditto.
30871 (vsm3partw1q_u32): Ditto.
30872 (vsm3partw2q_u32): Ditto.
30873 (vsm4eq_u32): Ditto.
30874 (vsm4ekeyq_u32): Ditto.
30875 (doc/invoke.texi): Document new sm4 option.
30877 2018-01-10 Michael Collison <michael.collison@arm.com>
30879 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
30880 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
30881 (AARCH64_FL_FOR_ARCH8_4): New.
30882 (AARCH64_FL_V8_4): New flag.
30883 (doc/invoke.texi): Document new armv8.4-a option.
30885 2018-01-10 Michael Collison <michael.collison@arm.com>
30887 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
30888 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
30889 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
30890 * config/aarch64/aarch64-option-extension.def: Add
30891 AARCH64_OPT_EXTENSION of 'sha2'.
30892 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
30893 (crypto): Disable sha2 and aes if crypto disabled.
30894 (crypto): Enable aes and sha2 if enabled.
30895 (simd): Disable sha2 and aes if simd disabled.
30896 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
30898 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
30899 (TARGET_SHA2): New feature flag for sha2.
30900 (TARGET_AES): New feature flag for aes.
30901 * config/aarch64/aarch64-simd.md:
30902 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
30903 conditional on TARGET_AES.
30904 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
30905 (aarch64_crypto_sha1hsi): Make pattern conditional
30907 (aarch64_crypto_sha1hv4si): Ditto.
30908 (aarch64_be_crypto_sha1hv4si): Ditto.
30909 (aarch64_crypto_sha1su1v4si): Ditto.
30910 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
30911 (aarch64_crypto_sha1su0v4si): Ditto.
30912 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
30913 (aarch64_crypto_sha256su0v4si): Ditto.
30914 (aarch64_crypto_sha256su1v4si): Ditto.
30915 (doc/invoke.texi): Document new aes and sha2 options.
30917 2018-01-10 Martin Sebor <msebor@redhat.com>
30919 PR tree-optimization/83781
30920 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
30923 2018-01-11 Martin Sebor <msebor@gmail.com>
30924 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
30926 PR tree-optimization/83501
30927 PR tree-optimization/81703
30929 * tree-ssa-strlen.c (get_string_cst): Rename...
30930 (get_string_len): ...to this. Handle global constants.
30931 (handle_char_store): Adjust.
30933 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
30934 Jim Wilson <jimw@sifive.com>
30936 * config/riscv/riscv-protos.h (riscv_output_return): New.
30937 * config/riscv/riscv.c (struct machine_function): New naked_p field.
30938 (riscv_attribute_table, riscv_output_return),
30939 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
30940 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
30941 (riscv_compute_frame_info): Only compute frame->mask if not a naked
30943 (riscv_expand_prologue): Add early return for naked function.
30944 (riscv_expand_epilogue): Likewise.
30945 (riscv_function_ok_for_sibcall): Return false for naked function.
30946 (riscv_set_current_function): New.
30947 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
30948 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
30949 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
30950 * doc/extend.texi (RISC-V Function Attributes): New.
30952 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
30954 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
30955 check for 128-bit long double before checking TCmode.
30956 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
30957 128-bit long doubles before checking TFmode or TCmode.
30958 (FLOAT128_IBM_P): Likewise.
30960 2018-01-10 Martin Sebor <msebor@redhat.com>
30962 PR tree-optimization/83671
30963 * builtins.c (c_strlen): Unconditionally return zero for the empty
30965 Use -Warray-bounds for warnings.
30966 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
30967 for non-constant array indices with COMPONENT_REF, arrays of
30968 arrays, and pointers to arrays.
30969 (gimple_fold_builtin_strlen): Determine and set length range for
30970 non-constant character arrays.
30972 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
30974 PR middle-end/81897
30975 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
30978 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
30980 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
30982 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
30985 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
30986 VECTOR_MEM_ALTIVEC_OR_VSX_P.
30987 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
30988 indexed_or_indirect_operand predicate.
30989 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
30990 (*vsx_le_perm_load_v8hi): Likewise.
30991 (*vsx_le_perm_load_v16qi): Likewise.
30992 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
30993 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
30994 (*vsx_le_perm_store_v8hi): Likewise.
30995 (*vsx_le_perm_store_v16qi): Likewise.
30996 (eight unnamed splitters): Likewise.
30998 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
31000 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
31001 * config/rs6000/emmintrin.h: Likewise.
31002 * config/rs6000/mmintrin.h: Likewise.
31003 * config/rs6000/xmmintrin.h: Likewise.
31005 2018-01-10 David Malcolm <dmalcolm@redhat.com>
31008 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
31010 * tree.c (tree_nop_conversion): Return true for location wrapper
31012 (maybe_wrap_with_location): New function.
31013 (selftest::check_strip_nops): New function.
31014 (selftest::test_location_wrappers): New function.
31015 (selftest::tree_c_tests): Call it.
31016 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
31017 (maybe_wrap_with_location): New decl.
31018 (EXPR_LOCATION_WRAPPER_P): New macro.
31019 (location_wrapper_p): New inline function.
31020 (tree_strip_any_location_wrapper): New inline function.
31022 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
31025 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
31026 stack_realign_offset for the largest alignment of stack slot
31028 (ix86_find_max_used_stack_alignment): New function.
31029 (ix86_finalize_stack_frame_flags): Use it. Set
31030 max_used_stack_alignment if we don't realign stack.
31031 * config/i386/i386.h (machine_function): Add
31032 max_used_stack_alignment.
31034 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
31036 * config/arm/arm.opt (-mbranch-cost): New option.
31037 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
31040 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
31043 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
31044 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
31046 2018-01-10 Richard Biener <rguenther@suse.de>
31049 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
31050 early out so it also covers the case where we have a non-NULL
31053 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
31055 PR tree-optimization/83753
31056 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
31057 for non-strided grouped accesses if the number of elements is 1.
31059 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
31062 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
31063 * i386.h (TARGET_USE_GATHER): Define.
31064 * x86-tune.def (X86_TUNE_USE_GATHER): New.
31066 2018-01-10 Martin Liska <mliska@suse.cz>
31069 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
31070 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
31072 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
31073 CLEANUP_NO_PARTITIONING is not set.
31075 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
31077 * doc/rtl.texi: Remove documentation of (const ...) wrappers
31078 for vectors, as a partial revert of r254296.
31079 * rtl.h (const_vec_p): Delete.
31080 (const_vec_duplicate_p): Don't test for vector CONSTs.
31081 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
31082 * expmed.c (make_tree): Likewise.
31085 * common.md (E, F): Use CONSTANT_P instead of checking for
31087 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
31088 checking for CONST_VECTOR.
31090 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
31092 PR middle-end/83575
31093 * predict.c (force_edge_cold): Handle in more sane way edges
31094 with no prediction.
31096 2018-01-09 Carl Love <cel@us.ibm.com>
31098 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
31100 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
31101 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
31102 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
31103 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
31104 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
31105 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
31106 * config/rs6000/rs6000-protos.h: Add extern defition for
31107 rs6000_generate_float2_double_code.
31108 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
31110 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
31111 (float2_v2df): Add define_expand.
31113 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
31116 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
31117 op_mode in the force_to_mode call.
31119 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
31121 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
31122 instead of checking each element individually.
31123 (aarch64_evpc_uzp): Likewise.
31124 (aarch64_evpc_zip): Likewise.
31125 (aarch64_evpc_ext): Likewise.
31126 (aarch64_evpc_rev): Likewise.
31127 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
31128 instead of checking each element individually. Return true without
31130 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
31131 whether all selected elements come from the same input, instead of
31132 checking each element individually. Remove calls to gen_rtx_REG,
31133 start_sequence and end_sequence and instead assert that no rtl is
31136 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
31138 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
31139 order of HIGH and CONST checks.
31141 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
31143 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
31144 if the destination isn't an SSA_NAME.
31146 2018-01-09 Richard Biener <rguenther@suse.de>
31148 PR tree-optimization/83668
31149 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
31151 (canonicalize_loop_form): ... here, renamed from ...
31152 (canonicalize_loop_closed_ssa_form): ... this and amended to
31153 swap successor edges for loop exit blocks to make us use
31154 the RPO order we need for initial schedule generation.
31156 2018-01-09 Joseph Myers <joseph@codesourcery.com>
31158 PR tree-optimization/64811
31159 * match.pd: When optimizing comparisons with Inf, avoid
31160 introducing or losing exceptions from comparisons with NaN.
31162 2018-01-09 Martin Liska <mliska@suse.cz>
31165 * asan.c (shadow_mem_size): Add gcc_assert.
31167 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
31169 Don't save registers in main().
31172 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
31173 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
31174 * config/avr/avr.c (avr_set_current_function): Don't error if
31175 naked, OS_task or OS_main are specified at the same time.
31176 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
31178 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
31180 * common/config/avr/avr-common.c (avr_option_optimization_table):
31181 Switch on -mmain-is-OS_task for optimizing compilations.
31183 2018-01-09 Richard Biener <rguenther@suse.de>
31185 PR tree-optimization/83572
31186 * graphite.c: Include cfganal.h.
31187 (graphite_transform_loops): Connect infinite loops to exit
31188 and remove fake edges at the end.
31190 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
31192 * ipa-inline.c (edge_badness): Revert accidental checkin.
31194 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
31197 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
31198 symbols; not inline clones.
31200 2018-01-09 Jakub Jelinek <jakub@redhat.com>
31203 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
31204 hard registers. Formatting fixes.
31206 PR preprocessor/83722
31207 * gcc.c (try_generate_repro): Pass
31208 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
31209 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
31212 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
31213 Kito Cheng <kito.cheng@gmail.com>
31215 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
31216 (riscv_leaf_function_p): Delete.
31217 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
31219 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
31221 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
31223 (do_ifelse): New function.
31224 (do_isel): New function.
31225 (do_sub3): New function.
31226 (do_add3): New function.
31227 (do_load_mask_compare): New function.
31228 (do_overlap_load_compare): New function.
31229 (expand_compare_loop): New function.
31230 (expand_block_compare): Call expand_compare_loop() when appropriate.
31231 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
31232 option description.
31233 (-mblock-compare-inline-loop-limit): New option.
31235 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
31238 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
31239 Reverse order of second and third operands in first alternative.
31240 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
31241 of first and second elements in UNSPEC_VPERMR vector.
31242 (altivec_expand_vec_perm_le): Likewise.
31244 2018-01-08 Jeff Law <law@redhat.com>
31246 PR rtl-optimizatin/81308
31247 * tree-switch-conversion.c (cfg_altered): New file scoped static.
31248 (process_switch): If group_case_labels makes a change, then set
31250 (pass_convert_switch::execute): If a switch is converted, then
31251 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
31253 PR rtl-optimization/81308
31254 * recog.c (split_all_insns): Conditionally cleanup the CFG after
31257 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
31259 PR target/83663 - Revert r255946
31260 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
31261 generation for cases where splatting a value is not useful.
31262 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
31263 across a vec_duplicate and a paradoxical subreg forming a vector
31264 mode to a vec_concat.
31266 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
31268 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
31269 -march=armv8.3-a variants.
31270 * config/arm/t-multilib: Likewise.
31271 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
31273 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
31275 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
31277 (cceq_ior_compare_complement): Give it a name so I can use it, and
31278 change boolean_or_operator predicate to boolean_operator so it can
31279 be used to generate a crand.
31280 (eqne): New code iterator.
31281 (bd/bd_neg): New code_attrs.
31282 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
31283 a single define_insn.
31284 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
31285 decrement (bdnzt/bdnzf/bdzt/bdzf).
31286 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
31287 with the new names of the branch decrement patterns, and added the
31288 names of the branch decrement conditional patterns.
31290 2018-01-08 Richard Biener <rguenther@suse.de>
31292 PR tree-optimization/83563
31293 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
31296 2018-01-08 Richard Biener <rguenther@suse.de>
31298 PR middle-end/83713
31299 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
31301 2018-01-08 Richard Biener <rguenther@suse.de>
31303 PR tree-optimization/83685
31304 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
31305 references to abnormals.
31307 2018-01-08 Richard Biener <rguenther@suse.de>
31310 * dwarf2out.c (output_indirect_strings): Handle empty
31311 skeleton_debug_str_hash.
31312 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
31314 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
31316 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
31317 (emit_store_direct): Likewise.
31318 (arc_trampoline_adjust_address): Likewise.
31319 (arc_asm_trampoline_template): New function.
31320 (arc_initialize_trampoline): Use asm_trampoline_template.
31321 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
31322 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
31323 * config/arc/arc.md (flush_icache): Delete pattern.
31325 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
31327 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
31328 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
31331 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
31334 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
31335 by not USED_FOR_TARGET.
31336 (make_pass_resolve_sw_modes): Likewise.
31338 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
31340 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
31343 2018-01-08 Richard Biener <rguenther@suse.de>
31345 PR middle-end/83580
31346 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
31348 2018-01-08 Richard Biener <rguenther@suse.de>
31350 PR middle-end/83517
31351 * match.pd ((t * 2) / 2) -> t): Add missing :c.
31353 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
31355 PR middle-end/81897
31356 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
31357 basic blocks with a small number of successors.
31358 (convert_control_dep_chain_into_preds): Improve handling of
31360 (dump_predicates): Split apart into...
31361 (dump_pred_chain): ...here...
31362 (dump_pred_info): ...and here.
31363 (can_one_predicate_be_invalidated_p): Add debugging printfs.
31364 (can_chain_union_be_invalidated_p): Improve check for invalidation
31366 (uninit_uses_cannot_happen): Avoid unnecessary if
31367 convert_control_dep_chain_into_preds yielded nothing.
31369 2018-01-06 Martin Sebor <msebor@redhat.com>
31371 PR tree-optimization/83640
31372 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
31373 subtracting negative offset from size.
31374 (builtin_access::overlap): Adjust offset bounds of the access to fall
31375 within the size of the object if possible.
31377 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
31379 PR rtl-optimization/83699
31380 * expmed.c (extract_bit_field_1): Restrict the vector usage of
31381 extract_bit_field_as_subreg to cases in which the extracted
31382 value is also a vector.
31384 * lra-constraints.c (process_alt_operands): Test for the equivalence
31385 substitutions when detecting a possible reload cycle.
31387 2018-01-06 Jakub Jelinek <jakub@redhat.com>
31390 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
31391 by default if flag_selective_schedling{,2}. Formatting fixes.
31393 PR rtl-optimization/83682
31394 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
31395 if it has non-VECTOR_MODE element mode.
31396 (vec_duplicate_p): Likewise.
31398 PR middle-end/83694
31399 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
31400 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
31402 2018-01-05 Jakub Jelinek <jakub@redhat.com>
31405 * config/i386/i386-builtin.def
31406 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
31407 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
31408 Require also OPTION_MASK_ISA_AVX512F in addition to
31409 OPTION_MASK_ISA_GFNI.
31410 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
31411 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
31412 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
31413 to OPTION_MASK_ISA_GFNI.
31414 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
31415 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
31416 OPTION_MASK_ISA_AVX512BW.
31417 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
31418 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
31419 addition to OPTION_MASK_ISA_GFNI.
31420 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
31421 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
31422 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
31423 to OPTION_MASK_ISA_GFNI.
31424 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
31425 a requirement for all ISAs rather than any of them with a few
31427 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
31429 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
31430 bitmasks to be enabled with 3 exceptions, instead of requiring any
31431 enabled ISA with lots of exceptions.
31432 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
31433 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
31434 Change avx512bw in isa attribute to avx512f.
31435 * config/i386/sgxintrin.h: Add license boilerplate.
31436 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
31437 to __AVX512F__ and __AVX512VL to __AVX512VL__.
31438 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
31439 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
31441 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
31442 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
31443 temporarily sse2 rather than sse if not enabled already.
31446 * config/i386/sse.md (VI248_VLBW): Rename to ...
31447 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
31448 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
31449 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
31450 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
31451 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
31452 mode iterator instead of VI248_VLBW.
31454 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
31456 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
31457 (record_modified): Skip clobbers; add debug output.
31458 (param_change_prob): Use sreal frequencies.
31460 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
31462 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
31463 punt for user-aligned variables.
31465 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
31467 * tree-chrec.c (chrec_contains_symbols): Return true for
31470 2018-01-05 Sudakshina Das <sudi.das@arm.com>
31473 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
31474 of (x|y) == x for BICS pattern.
31476 2018-01-05 Jakub Jelinek <jakub@redhat.com>
31478 PR tree-optimization/83605
31479 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
31480 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
31483 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
31485 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
31486 * config/epiphany/rtems.h: New file.
31488 2018-01-04 Jakub Jelinek <jakub@redhat.com>
31489 Uros Bizjak <ubizjak@gmail.com>
31492 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
31493 QIreg_operand instead of register_operand predicate.
31494 * config/i386/i386.c (ix86_rop_should_change_byte_p,
31495 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
31496 comments instead of -fmitigate[-_]rop.
31498 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
31501 * cgraphunit.c (symbol_table::compile): Switch to text_section
31502 before calling assembly_start debug hook.
31503 * run-rtl-passes.c (run_rtl_passes): Likewise.
31506 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
31508 * tree-vrp.c (extract_range_from_binary_expr_1): Check
31509 range_int_cst_p rather than !symbolic_range_p before calling
31510 extract_range_from_multiplicative_op_1.
31512 2018-01-04 Jeff Law <law@redhat.com>
31514 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
31515 redundant test in assertion.
31517 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
31519 * doc/rtl.texi: Document machine_mode wrapper classes.
31521 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
31523 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
31524 using tree_to_uhwi.
31526 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
31528 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
31529 the VEC_PERM_EXPR fold to fail.
31531 2018-01-04 Jakub Jelinek <jakub@redhat.com>
31534 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
31535 to switched_sections.
31537 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
31540 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
31541 test for d.testing.
31543 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
31546 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
31547 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
31549 2018-01-04 Jakub Jelinek <jakub@redhat.com>
31552 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
31553 is BLKmode and bitpos not zero or mode change is needed.
31555 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
31558 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
31561 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
31564 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
31565 instead of MULT rtx. Update all corresponding splitters.
31566 (*saddl_se): Ditto.
31567 (*ssub<modesuffix>): Ditto.
31568 (*ssubl_se): Ditto.
31569 (*cmp_sadd_di): Update split patterns.
31570 (*cmp_sadd_si): Ditto.
31571 (*cmp_sadd_sidi): Ditto.
31572 (*cmp_ssub_di): Ditto.
31573 (*cmp_ssub_si): Ditto.
31574 (*cmp_ssub_sidi): Ditto.
31575 * config/alpha/predicates.md (const23_operand): New predicate.
31576 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
31577 Look for ASHIFT, not MULT inner operand.
31578 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
31580 2018-01-04 Martin Liska <mliska@suse.cz>
31582 PR gcov-profile/83669
31583 * gcov.c (output_intermediate_file): Add version to intermediate
31585 * doc/gcov.texi: Document new field 'version' in intermediate
31586 file format. Fix location of '-k' option of gcov command.
31588 2018-01-04 Martin Liska <mliska@suse.cz>
31591 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
31593 2018-01-04 Jakub Jelinek <jakub@redhat.com>
31595 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
31597 2018-01-03 Martin Sebor <msebor@redhat.com>
31599 PR tree-optimization/83655
31600 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
31601 checking calls with invalid arguments.
31603 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31605 * tree-vect-stmts.c (vect_get_store_rhs): New function.
31606 (vectorizable_mask_load_store): Delete.
31607 (vectorizable_call): Return false for masked loads and stores.
31608 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
31609 instead of gimple_assign_rhs1.
31610 (vectorizable_load): Handle IFN_MASK_LOAD.
31611 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
31613 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31615 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
31617 (vectorizable_mask_load_store): ...here.
31618 (vectorizable_load): ...and here.
31620 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31622 * tree-vect-stmts.c (vect_build_all_ones_mask)
31623 (vect_build_zero_merge_argument): New functions, split out from...
31624 (vectorizable_load): ...here.
31626 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31628 * tree-vect-stmts.c (vect_check_store_rhs): New function,
31630 (vectorizable_mask_load_store): ...here.
31631 (vectorizable_store): ...and here.
31633 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31635 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
31637 (vectorizable_mask_load_store): ...here.
31639 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31641 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
31642 (vect_model_store_cost): Take a vec_load_store_type instead of a
31644 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
31645 (vect_model_store_cost): Take a vec_load_store_type instead of a
31647 (vectorizable_mask_load_store): Update accordingly.
31648 (vectorizable_store): Likewise.
31649 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
31651 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31653 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
31654 IFN_MASK_LOAD calls here rather than...
31655 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
31657 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31658 Alan Hayward <alan.hayward@arm.com>
31659 David Sherwood <david.sherwood@arm.com>
31661 * expmed.c (extract_bit_field_1): For vector extracts,
31662 fall back to extract_bit_field_as_subreg if vec_extract
31665 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31666 Alan Hayward <alan.hayward@arm.com>
31667 David Sherwood <david.sherwood@arm.com>
31669 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
31670 they are variable or constant sized.
31671 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
31672 slots for constant-sized data.
31674 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31675 Alan Hayward <alan.hayward@arm.com>
31676 David Sherwood <david.sherwood@arm.com>
31678 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
31679 handling COND_EXPRs with boolean comparisons, try to find a better
31680 basis for the mask type than the boolean itself.
31682 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31684 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
31685 is calculated and how it can be overridden.
31686 * genmodes.c (max_bitsize_mode_any_mode): New variable.
31687 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
31689 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
31692 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31693 Alan Hayward <alan.hayward@arm.com>
31694 David Sherwood <david.sherwood@arm.com>
31696 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
31697 Remove the mode argument.
31698 (aarch64_simd_valid_immediate): Remove the mode and inverse
31700 * config/aarch64/iterators.md (bitsize): New iterator.
31701 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
31702 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
31703 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
31704 aarch64_simd_valid_immediate.
31705 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
31706 (aarch64_reg_or_bic_imm): Likewise.
31707 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
31708 with an insn_type enum and msl with a modifier_type enum.
31709 Replace element_width with a scalar_mode. Change the shift
31710 to unsigned int. Add constructors for scalar_float_mode and
31711 scalar_int_mode elements.
31712 (aarch64_vect_float_const_representable_p): Delete.
31713 (aarch64_can_const_movi_rtx_p)
31714 (aarch64_simd_scalar_immediate_valid_for_move)
31715 (aarch64_simd_make_constant): Update call to
31716 aarch64_simd_valid_immediate.
31717 (aarch64_advsimd_valid_immediate_hs): New function.
31718 (aarch64_advsimd_valid_immediate): Likewise.
31719 (aarch64_simd_valid_immediate): Remove mode and inverse
31720 arguments. Rewrite to use the above. Use const_vec_duplicate_p
31721 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
31722 and aarch64_float_const_representable_p on the result.
31723 (aarch64_output_simd_mov_immediate): Remove mode argument.
31724 Update call to aarch64_simd_valid_immediate and use of
31725 simd_immediate_info.
31726 (aarch64_output_scalar_simd_mov_immediate): Update call
31729 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31730 Alan Hayward <alan.hayward@arm.com>
31731 David Sherwood <david.sherwood@arm.com>
31733 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
31734 (mode_nunits): Likewise CONST_MODE_NUNITS.
31735 * machmode.def (ADJUST_NUNITS): Document.
31736 * genmodes.c (mode_data::need_nunits_adj): New field.
31737 (blank_mode): Update accordingly.
31738 (adj_nunits): New variable.
31739 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
31741 (emit_mode_size_inline): Set need_bytesize_adj for all modes
31742 listed in adj_nunits.
31743 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
31744 listed in adj_nunits. Don't emit case statements for such modes.
31745 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
31746 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
31747 nothing if adj_nunits is nonnull.
31748 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
31749 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
31750 (emit_mode_fbit): Update use of print_maybe_const_decl.
31751 (emit_move_size): Likewise. Treat the array as non-const
31753 (emit_mode_adjustments): Handle adj_nunits.
31755 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31757 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
31758 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
31759 (VECTOR_MODES): Use it.
31760 (make_vector_modes): Take the prefix as an argument.
31762 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31763 Alan Hayward <alan.hayward@arm.com>
31764 David Sherwood <david.sherwood@arm.com>
31766 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
31767 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
31768 for MODE_VECTOR_BOOL.
31769 * machmode.def (VECTOR_BOOL_MODE): Document.
31770 * genmodes.c (VECTOR_BOOL_MODE): New macro.
31771 (make_vector_bool_mode): New function.
31772 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
31774 * lto-streamer-in.c (lto_input_mode_table): Likewise.
31775 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
31777 * stor-layout.c (int_mode_for_mode): Likewise.
31778 * tree.c (build_vector_type_for_mode): Likewise.
31779 * varasm.c (output_constant_pool_2): Likewise.
31780 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
31781 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
31782 for MODE_VECTOR_BOOL.
31783 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
31784 of mode class checks.
31785 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
31786 instead of a list of mode class checks.
31787 (expand_vector_scalar_condition): Likewise.
31788 (type_for_widest_vector_mode): Handle BImode as an inner mode.
31790 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31791 Alan Hayward <alan.hayward@arm.com>
31792 David Sherwood <david.sherwood@arm.com>
31794 * machmode.h (mode_size): Change from unsigned short to
31796 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
31797 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
31798 or if measurement_type is not polynomial.
31799 (fixed_size_mode::includes_p): Check for constant-sized modes.
31800 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
31801 return a poly_uint16 rather than an unsigned short.
31802 (emit_mode_size): Change the type of mode_size from unsigned short
31803 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
31804 (emit_mode_adjustments): Cope with polynomial vector sizes.
31805 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
31807 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
31809 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
31810 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
31811 * caller-save.c (setup_save_areas): Likewise.
31812 (replace_reg_with_saved_mem): Likewise.
31813 * calls.c (emit_library_call_value_1): Likewise.
31814 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
31815 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
31816 (gen_lowpart_for_combine): Likewise.
31817 * convert.c (convert_to_integer_1): Likewise.
31818 * cse.c (equiv_constant, cse_insn): Likewise.
31819 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
31820 (cselib_subst_to_values): Likewise.
31821 * dce.c (word_dce_process_block): Likewise.
31822 * df-problems.c (df_word_lr_mark_ref): Likewise.
31823 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
31824 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
31825 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
31826 (rtl_for_decl_location): Likewise.
31827 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
31828 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
31829 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
31830 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
31831 (expand_expr_real_1): Likewise.
31832 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
31833 (pad_below): Likewise.
31834 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
31835 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
31836 * ira.c (get_subreg_tracking_sizes): Likewise.
31837 * ira-build.c (ira_create_allocno_objects): Likewise.
31838 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
31839 (ira_sort_regnos_for_alter_reg): Likewise.
31840 * ira-costs.c (record_operand_costs): Likewise.
31841 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
31842 (resolve_simple_move): Likewise.
31843 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
31844 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
31845 (lra_constraints): Likewise.
31846 (CONST_POOL_OK_P): Reject variable-sized modes.
31847 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
31848 (add_pseudo_to_slot, lra_spill): Likewise.
31849 * omp-low.c (omp_clause_aligned_alignment): Likewise.
31850 * optabs-query.c (get_best_extraction_insn): Likewise.
31851 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
31852 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
31853 (expand_mult_highpart, valid_multiword_target_p): Likewise.
31854 * recog.c (offsettable_address_addr_space_p): Likewise.
31855 * regcprop.c (maybe_mode_change): Likewise.
31856 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
31857 * regrename.c (build_def_use): Likewise.
31858 * regstat.c (dump_reg_info): Likewise.
31859 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
31860 (find_reloads, find_reloads_subreg_address): Likewise.
31861 * reload1.c (eliminate_regs_1): Likewise.
31862 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
31863 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
31864 (simplify_binary_operation_1, simplify_subreg): Likewise.
31865 * targhooks.c (default_function_arg_padding): Likewise.
31866 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
31867 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
31868 (verify_gimple_assign_ternary): Likewise.
31869 * tree-inline.c (estimate_move_cost): Likewise.
31870 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
31871 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
31872 (get_address_cost_ainc): Likewise.
31873 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
31874 (vect_supportable_dr_alignment): Likewise.
31875 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
31876 (vectorizable_reduction): Likewise.
31877 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
31878 (vectorizable_operation, vectorizable_load): Likewise.
31879 * tree.c (build_same_sized_truth_vector_type): Likewise.
31880 * valtrack.c (cleanup_auto_inc_dec): Likewise.
31881 * var-tracking.c (emit_note_insn_var_location): Likewise.
31882 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
31883 (ADDR_VEC_ALIGN): Likewise.
31885 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31886 Alan Hayward <alan.hayward@arm.com>
31887 David Sherwood <david.sherwood@arm.com>
31889 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
31891 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
31892 or if measurement_type is polynomial.
31893 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
31894 * combine.c (make_extraction): Likewise.
31895 * dse.c (find_shift_sequence): Likewise.
31896 * dwarf2out.c (mem_loc_descriptor): Likewise.
31897 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
31898 (extract_bit_field, extract_low_bits): Likewise.
31899 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
31900 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
31901 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
31902 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
31903 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
31904 * reload.c (find_reloads): Likewise.
31905 * reload1.c (alter_reg): Likewise.
31906 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
31907 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
31908 * tree-if-conv.c (predicate_mem_writes): Likewise.
31909 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
31910 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
31911 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
31912 * valtrack.c (dead_debug_insert_temp): Likewise.
31913 * varasm.c (mergeable_constant_section): Likewise.
31914 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
31916 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31917 Alan Hayward <alan.hayward@arm.com>
31918 David Sherwood <david.sherwood@arm.com>
31920 * expr.c (expand_assignment): Cope with polynomial mode sizes
31921 when assigning to a CONCAT.
31923 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31924 Alan Hayward <alan.hayward@arm.com>
31925 David Sherwood <david.sherwood@arm.com>
31927 * machmode.h (mode_precision): Change from unsigned short to
31929 (mode_to_precision): Return a poly_uint16 rather than an unsigned
31931 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
31932 or if measurement_type is not polynomial.
31933 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
31934 in which the mode is already known to be a scalar_int_mode.
31935 * genmodes.c (emit_mode_precision): Change the type of mode_precision
31936 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
31938 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
31939 for GET_MODE_PRECISION.
31940 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
31941 for GET_MODE_PRECISION.
31942 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
31944 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
31945 (expand_field_assignment, make_extraction): Likewise.
31946 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
31947 (get_last_value): Likewise.
31948 * convert.c (convert_to_integer_1): Likewise.
31949 * cse.c (cse_insn): Likewise.
31950 * expr.c (expand_expr_real_1): Likewise.
31951 * lra-constraints.c (simplify_operand_subreg): Likewise.
31952 * optabs-query.c (can_atomic_load_p): Likewise.
31953 * optabs.c (expand_atomic_load): Likewise.
31954 (expand_atomic_store): Likewise.
31955 * ree.c (combine_reaching_defs): Likewise.
31956 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
31957 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
31958 * tree.h (type_has_mode_precision_p): Likewise.
31959 * ubsan.c (instrument_si_overflow): Likewise.
31961 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31962 Alan Hayward <alan.hayward@arm.com>
31963 David Sherwood <david.sherwood@arm.com>
31965 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
31966 polynomial numbers of units.
31967 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
31968 (valid_vector_subparts_p): New function.
31969 (build_vector_type): Remove temporary shim and take the number
31970 of units as a poly_uint64 rather than an int.
31971 (build_opaque_vector_type): Take the number of units as a
31972 poly_uint64 rather than an int.
31973 * tree.c (build_vector_from_ctor): Handle polynomial
31974 TYPE_VECTOR_SUBPARTS.
31975 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
31976 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
31977 (build_vector_from_val): If the number of units is variable,
31978 use build_vec_duplicate_cst for constant operands and
31979 VEC_DUPLICATE_EXPR otherwise.
31980 (make_vector_type): Remove temporary is_constant ().
31981 (build_vector_type, build_opaque_vector_type): Take the number of
31982 units as a poly_uint64 rather than an int.
31983 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
31985 * cfgexpand.c (expand_debug_expr): Likewise.
31986 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
31987 (store_constructor, expand_expr_real_1): Likewise.
31988 (const_scalar_mask_from_tree): Likewise.
31989 * fold-const-call.c (fold_const_reduction): Likewise.
31990 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
31991 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
31992 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
31993 (fold_relational_const): Likewise.
31994 (native_interpret_vector): Likewise. Change the size from an
31995 int to an unsigned int.
31996 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
31997 TYPE_VECTOR_SUBPARTS.
31998 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
31999 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
32000 duplicating a non-constant operand into a variable-length vector.
32001 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
32002 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
32003 * ipa-icf.c (sem_variable::equals): Likewise.
32004 * match.pd: Likewise.
32005 * omp-simd-clone.c (simd_clone_subparts): Likewise.
32006 * print-tree.c (print_node): Likewise.
32007 * stor-layout.c (layout_type): Likewise.
32008 * targhooks.c (default_builtin_vectorization_cost): Likewise.
32009 * tree-cfg.c (verify_gimple_comparison): Likewise.
32010 (verify_gimple_assign_binary): Likewise.
32011 (verify_gimple_assign_ternary): Likewise.
32012 (verify_gimple_assign_single): Likewise.
32013 * tree-pretty-print.c (dump_generic_node): Likewise.
32014 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
32015 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
32016 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
32017 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
32018 (vect_shift_permute_load_chain): Likewise.
32019 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
32020 (expand_vector_condition, optimize_vector_constructor): Likewise.
32021 (lower_vec_perm, get_compute_type): Likewise.
32022 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
32023 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
32024 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
32025 (vect_recog_mask_conversion_pattern): Likewise.
32026 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
32027 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
32028 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
32029 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
32030 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
32031 (vectorizable_shift, vectorizable_operation, vectorizable_store)
32032 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
32033 (supportable_widening_operation): Likewise.
32034 (supportable_narrowing_operation): Likewise.
32035 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
32037 * varasm.c (output_constant): Likewise.
32039 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32040 Alan Hayward <alan.hayward@arm.com>
32041 David Sherwood <david.sherwood@arm.com>
32043 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
32044 so that both the length == 3 and length != 3 cases set up their
32045 own permute vectors. Add comments explaining why we know the
32046 number of elements is constant.
32047 (vect_permute_load_chain): Likewise.
32049 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32050 Alan Hayward <alan.hayward@arm.com>
32051 David Sherwood <david.sherwood@arm.com>
32053 * machmode.h (mode_nunits): Change from unsigned char to
32055 (ONLY_FIXED_SIZE_MODES): New macro.
32056 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
32057 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
32058 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
32060 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
32061 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
32062 or if measurement_type is not polynomial.
32063 * genmodes.c (ZERO_COEFFS): New macro.
32064 (emit_mode_nunits_inline): Make mode_nunits_inline return a
32066 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
32067 Use ZERO_COEFFS when emitting initializers.
32068 * data-streamer.h (bp_pack_poly_value): New function.
32069 (bp_unpack_poly_value): Likewise.
32070 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
32071 for GET_MODE_NUNITS.
32072 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
32073 for GET_MODE_NUNITS.
32074 * tree.c (make_vector_type): Remove temporary shim and make
32075 the real function take the number of units as a poly_uint64
32076 rather than an int.
32077 (build_vector_type_for_mode): Handle polynomial nunits.
32078 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
32079 * emit-rtl.c (const_vec_series_p_1): Likewise.
32080 (gen_rtx_CONST_VECTOR): Likewise.
32081 * fold-const.c (test_vec_duplicate_folding): Likewise.
32082 * genrecog.c (validate_pattern): Likewise.
32083 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
32084 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
32085 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
32086 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
32087 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
32088 * rtlanal.c (subreg_get_info): Likewise.
32089 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
32090 (vect_grouped_load_supported): Likewise.
32091 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
32092 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
32093 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
32094 (simplify_const_unary_operation, simplify_binary_operation_1)
32095 (simplify_const_binary_operation, simplify_ternary_operation)
32096 (test_vector_ops_duplicate, test_vector_ops): Likewise.
32097 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
32098 instead of CONST_VECTOR_NUNITS.
32099 * varasm.c (output_constant_pool_2): Likewise.
32100 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
32101 explicit-encoded elements in the XVEC for variable-length vectors.
32103 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32105 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
32107 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32108 Alan Hayward <alan.hayward@arm.com>
32109 David Sherwood <david.sherwood@arm.com>
32111 * coretypes.h (fixed_size_mode): Declare.
32112 (fixed_size_mode_pod): New typedef.
32113 * builtins.h (target_builtins::x_apply_args_mode)
32114 (target_builtins::x_apply_result_mode): Change type to
32115 fixed_size_mode_pod.
32116 * builtins.c (apply_args_size, apply_result_size, result_vector)
32117 (expand_builtin_apply_args_1, expand_builtin_apply)
32118 (expand_builtin_return): Update accordingly.
32120 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32122 * cse.c (hash_rtx_cb): Hash only the encoded elements.
32123 * cselib.c (cselib_hash_rtx): Likewise.
32124 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
32125 CONST_VECTOR encoding.
32127 2018-01-03 Jakub Jelinek <jakub@redhat.com>
32128 Jeff Law <law@redhat.com>
32131 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
32132 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
32133 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
32134 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
32137 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
32138 explicitly probe *sp in a noreturn function if there were any callee
32139 register saves or frame pointer is needed.
32141 2018-01-03 Jakub Jelinek <jakub@redhat.com>
32144 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
32145 BLKmode for ternary, binary or unary expressions.
32148 * var-tracking.c (delete_vta_debug_insn): New inline function.
32149 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
32150 insns from get_insns () to NULL instead of each bb separately.
32151 Use delete_vta_debug_insn. No longer static.
32152 (vt_debug_insns_local, variable_tracking_main_1): Adjust
32153 delete_vta_debug_insns callers.
32154 * rtl.h (delete_vta_debug_insns): Declare.
32155 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
32156 instead of variable_tracking_main.
32158 2018-01-03 Martin Sebor <msebor@redhat.com>
32160 PR tree-optimization/83603
32161 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
32162 arguments past the endof the argument list in functions declared
32163 without a prototype.
32164 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
32165 Avoid checking when arguments are null.
32167 2018-01-03 Martin Sebor <msebor@redhat.com>
32170 * doc/extend.texi (attribute const): Fix a typo.
32171 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
32172 issuing -Wsuggest-attribute for void functions.
32174 2018-01-03 Martin Sebor <msebor@redhat.com>
32176 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
32177 offset_int::from instead of wide_int::to_shwi.
32178 (maybe_diag_overlap): Remove assertion.
32179 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
32180 * gimple-ssa-sprintf.c (format_directive): Same.
32181 (parse_directive): Same.
32182 (sprintf_dom_walker::compute_format_length): Same.
32183 (try_substitute_return_value): Same.
32185 2018-01-03 Jeff Law <law@redhat.com>
32187 PR middle-end/83654
32188 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
32189 non-constant residual for zero at runtime and avoid probing in
32190 that case. Reorganize code for trailing problem to mirror handling
32193 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
32195 PR tree-optimization/83501
32196 * tree-ssa-strlen.c (get_string_cst): New.
32197 (handle_char_store): Call get_string_cst.
32199 2018-01-03 Martin Liska <mliska@suse.cz>
32201 PR tree-optimization/83593
32202 * tree-ssa-strlen.c: Include tree-cfg.h.
32203 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
32204 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
32205 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
32207 (strlen_dom_walker::before_dom_children): Call
32208 gimple_purge_dead_eh_edges. Dump tranformation with details
32210 (strlen_dom_walker::before_dom_children): Update call by adding
32211 new argument cleanup_eh.
32212 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
32214 2018-01-03 Martin Liska <mliska@suse.cz>
32217 * cif-code.def (VARIADIC_THUNK): New enum value.
32218 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
32221 2018-01-03 Jan Beulich <jbeulich@suse.com>
32223 * sse.md (mov<mode>_internal): Tighten condition for when to use
32224 vmovdqu<ssescalarsize> for TI and OI modes.
32226 2018-01-03 Jakub Jelinek <jakub@redhat.com>
32228 Update copyright years.
32230 2018-01-03 Martin Liska <mliska@suse.cz>
32233 * ipa-visibility.c (function_and_variable_visibility): Skip
32234 functions with noipa attribure.
32236 2018-01-03 Jakub Jelinek <jakub@redhat.com>
32238 * gcc.c (process_command): Update copyright notice dates.
32239 * gcov-dump.c (print_version): Ditto.
32240 * gcov.c (print_version): Ditto.
32241 * gcov-tool.c (print_version): Ditto.
32242 * gengtype.c (create_file): Ditto.
32243 * doc/cpp.texi: Bump @copying's copyright year.
32244 * doc/cppinternals.texi: Ditto.
32245 * doc/gcc.texi: Ditto.
32246 * doc/gccint.texi: Ditto.
32247 * doc/gcov.texi: Ditto.
32248 * doc/install.texi: Ditto.
32249 * doc/invoke.texi: Ditto.
32251 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32253 * vector-builder.h (vector_builder::m_full_nelts): Change from
32254 unsigned int to poly_uint64.
32255 (vector_builder::full_nelts): Update prototype accordingly.
32256 (vector_builder::new_vector): Likewise.
32257 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
32258 (vector_builder::operator ==): Likewise.
32259 (vector_builder::finalize): Likewise.
32260 * int-vector-builder.h (int_vector_builder::int_vector_builder):
32261 Take the number of elements as a poly_uint64 rather than an
32263 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
32264 from unsigned int to poly_uint64.
32265 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
32266 (vec_perm_indices::new_vector): Likewise.
32267 (vec_perm_indices::length): Likewise.
32268 (vec_perm_indices::nelts_per_input): Likewise.
32269 (vec_perm_indices::input_nelts): Likewise.
32270 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
32271 number of elements per input as a poly_uint64 rather than an
32272 unsigned int. Use the original encoding for variable-length
32273 vectors, rather than clamping each individual element.
32274 For the second and subsequent elements in each pattern,
32275 clamp the step and base before clamping their sum.
32276 (vec_perm_indices::series_p): Handle polynomial element counts.
32277 (vec_perm_indices::all_in_range_p): Likewise.
32278 (vec_perm_indices_to_tree): Likewise.
32279 (vec_perm_indices_to_rtx): Likewise.
32280 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
32281 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
32282 (tree_vector_builder::new_binary_operation): Handle polynomial
32283 element counts. Return false if we need to know the number
32284 of elements at compile time.
32285 * fold-const.c (fold_vec_perm): Punt if the number of elements
32286 isn't known at compile time.
32288 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32290 * vec-perm-indices.h (vec_perm_builder): Change element type
32291 from HOST_WIDE_INT to poly_int64.
32292 (vec_perm_indices::element_type): Update accordingly.
32293 (vec_perm_indices::clamp): Handle polynomial element_types.
32294 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
32295 (vec_perm_indices::all_in_range_p): Likewise.
32296 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
32298 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
32299 polynomial vec_perm_indices element types.
32300 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
32301 * fold-const.c (fold_vec_perm): Likewise.
32302 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
32303 * tree-vect-generic.c (lower_vec_perm): Likewise.
32304 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
32305 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
32306 element type to HOST_WIDE_INT.
32308 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32309 Alan Hayward <alan.hayward@arm.com>
32310 David Sherwood <david.sherwood@arm.com>
32312 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
32313 rather than an int. Use plus_constant.
32314 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
32315 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
32317 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32318 Alan Hayward <alan.hayward@arm.com>
32319 David Sherwood <david.sherwood@arm.com>
32321 * calls.c (emit_call_1, expand_call): Change struct_value_size from
32322 a HOST_WIDE_INT to a poly_int64.
32324 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32325 Alan Hayward <alan.hayward@arm.com>
32326 David Sherwood <david.sherwood@arm.com>
32328 * calls.c (load_register_parameters): Cope with polynomial
32329 mode sizes. Require a constant size for BLKmode parameters
32330 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
32331 forces a parameter to be padded at the lsb end in order to
32332 fill a complete number of words, require the parameter size
32333 to be ordered wrt UNITS_PER_WORD.
32335 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32336 Alan Hayward <alan.hayward@arm.com>
32337 David Sherwood <david.sherwood@arm.com>
32339 * reload1.c (spill_stack_slot_width): Change element type
32340 from unsigned int to poly_uint64_pod.
32341 (alter_reg): Treat mode sizes as polynomial.
32343 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32344 Alan Hayward <alan.hayward@arm.com>
32345 David Sherwood <david.sherwood@arm.com>
32347 * reload.c (complex_word_subreg_p): New function.
32348 (reload_inner_reg_of_subreg, push_reload): Use it.
32350 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32351 Alan Hayward <alan.hayward@arm.com>
32352 David Sherwood <david.sherwood@arm.com>
32354 * lra-constraints.c (process_alt_operands): Reject matched
32355 operands whose sizes aren't ordered.
32356 (match_reload): Refer to this check here.
32358 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32359 Alan Hayward <alan.hayward@arm.com>
32360 David Sherwood <david.sherwood@arm.com>
32362 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
32363 that the mode size is in the set {1, 2, 4, 8, 16}.
32365 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32366 Alan Hayward <alan.hayward@arm.com>
32367 David Sherwood <david.sherwood@arm.com>
32369 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
32370 Use plus_constant instead of gen_rtx_PLUS.
32372 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32373 Alan Hayward <alan.hayward@arm.com>
32374 David Sherwood <david.sherwood@arm.com>
32376 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
32377 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
32378 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
32379 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
32380 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
32381 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
32382 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
32383 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
32384 * config/i386/i386.c (ix86_push_rounding): ...this new function.
32385 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
32387 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
32388 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
32389 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
32390 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
32391 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
32392 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
32393 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
32394 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
32395 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
32396 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
32398 * expr.c (emit_move_resolve_push): Treat the input and result
32399 of PUSH_ROUNDING as a poly_int64.
32400 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
32401 (emit_push_insn): Likewise.
32402 * lra-eliminations.c (mark_not_eliminable): Likewise.
32403 * recog.c (push_operand): Likewise.
32404 * reload1.c (elimination_effects): Likewise.
32405 * rtlanal.c (nonzero_bits1): Likewise.
32406 * calls.c (store_one_arg): Likewise. Require the padding to be
32407 known at compile time.
32409 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32410 Alan Hayward <alan.hayward@arm.com>
32411 David Sherwood <david.sherwood@arm.com>
32413 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
32414 Use plus_constant instead of gen_rtx_PLUS.
32416 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32417 Alan Hayward <alan.hayward@arm.com>
32418 David Sherwood <david.sherwood@arm.com>
32420 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
32421 rather than an int.
32423 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32424 Alan Hayward <alan.hayward@arm.com>
32425 David Sherwood <david.sherwood@arm.com>
32427 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
32428 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
32429 via stack temporaries. Treat the mode size as polynomial too.
32431 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32432 Alan Hayward <alan.hayward@arm.com>
32433 David Sherwood <david.sherwood@arm.com>
32435 * expr.c (expand_expr_real_2): When handling conversions involving
32436 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
32437 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
32438 as a poly_uint64 too.
32440 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32441 Alan Hayward <alan.hayward@arm.com>
32442 David Sherwood <david.sherwood@arm.com>
32444 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
32446 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32447 Alan Hayward <alan.hayward@arm.com>
32448 David Sherwood <david.sherwood@arm.com>
32450 * combine.c (can_change_dest_mode): Handle polynomial
32451 REGMODE_NATURAL_SIZE.
32452 * expmed.c (store_bit_field_1): Likewise.
32453 * expr.c (store_constructor): Likewise.
32454 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
32455 and polynomial REGMODE_NATURAL_SIZE.
32456 (gen_lowpart_common): Likewise.
32457 * reginfo.c (record_subregs_of_mode): Likewise.
32458 * rtlanal.c (read_modify_subreg_p): Likewise.
32460 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32461 Alan Hayward <alan.hayward@arm.com>
32462 David Sherwood <david.sherwood@arm.com>
32464 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
32465 numbers of elements.
32467 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32468 Alan Hayward <alan.hayward@arm.com>
32469 David Sherwood <david.sherwood@arm.com>
32471 * match.pd: Cope with polynomial numbers of vector elements.
32473 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32474 Alan Hayward <alan.hayward@arm.com>
32475 David Sherwood <david.sherwood@arm.com>
32477 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
32478 in a POINTER_PLUS_EXPR.
32480 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32481 Alan Hayward <alan.hayward@arm.com>
32482 David Sherwood <david.sherwood@arm.com>
32484 * omp-simd-clone.c (simd_clone_subparts): New function.
32485 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
32486 (ipa_simd_modify_function_body): Likewise.
32488 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32489 Alan Hayward <alan.hayward@arm.com>
32490 David Sherwood <david.sherwood@arm.com>
32492 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
32493 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
32494 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
32495 (expand_vector_condition, vector_element): Likewise.
32496 (subparts_gt): New function.
32497 (get_compute_type): Use subparts_gt.
32498 (count_type_subparts): Delete.
32499 (expand_vector_operations_1): Use subparts_gt instead of
32500 count_type_subparts.
32502 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32503 Alan Hayward <alan.hayward@arm.com>
32504 David Sherwood <david.sherwood@arm.com>
32506 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
32507 (vect_compile_time_alias): ...this new function. Do the calculation
32508 on poly_ints rather than trees.
32509 (vect_prune_runtime_alias_test_list): Update call accordingly.
32511 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32512 Alan Hayward <alan.hayward@arm.com>
32513 David Sherwood <david.sherwood@arm.com>
32515 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
32517 (vect_schedule_slp_instance): Likewise.
32519 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32520 Alan Hayward <alan.hayward@arm.com>
32521 David Sherwood <david.sherwood@arm.com>
32523 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
32524 constant and extern definitions for variable-length vectors.
32525 (vect_get_constant_vectors): Note that the number of units
32526 is known to be constant.
32528 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32529 Alan Hayward <alan.hayward@arm.com>
32530 David Sherwood <david.sherwood@arm.com>
32532 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
32533 of units as polynomial. Choose between WIDE and NARROW based
32536 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32537 Alan Hayward <alan.hayward@arm.com>
32538 David Sherwood <david.sherwood@arm.com>
32540 * tree-vect-stmts.c (simd_clone_subparts): New function.
32541 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
32543 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32544 Alan Hayward <alan.hayward@arm.com>
32545 David Sherwood <david.sherwood@arm.com>
32547 * tree-vect-stmts.c (vectorizable_call): Treat the number of
32548 vectors as polynomial. Use build_index_vector for
32549 IFN_GOMP_SIMD_LANE.
32551 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32552 Alan Hayward <alan.hayward@arm.com>
32553 David Sherwood <david.sherwood@arm.com>
32555 * tree-vect-stmts.c (get_load_store_type): Treat the number of
32556 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
32557 for variable-length vectors.
32558 (vectorizable_mask_load_store): Treat the number of units as
32559 polynomial, asserting that it is constant if the condition has
32560 already been enforced.
32561 (vectorizable_store, vectorizable_load): Likewise.
32563 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32564 Alan Hayward <alan.hayward@arm.com>
32565 David Sherwood <david.sherwood@arm.com>
32567 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
32568 of units as polynomial. Punt if we can't tell at compile time
32569 which vector contains the final result.
32571 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32572 Alan Hayward <alan.hayward@arm.com>
32573 David Sherwood <david.sherwood@arm.com>
32575 * tree-vect-loop.c (vectorizable_induction): Treat the number
32576 of units as polynomial. Punt on SLP inductions. Use an integer
32577 VEC_SERIES_EXPR for variable-length integer reductions. Use a
32578 cast of such a series for variable-length floating-point
32581 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32582 Alan Hayward <alan.hayward@arm.com>
32583 David Sherwood <david.sherwood@arm.com>
32585 * tree.h (build_index_vector): Declare.
32586 * tree.c (build_index_vector): New function.
32587 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
32588 of units as polynomial, forcibly converting it to a constant if
32589 vectorizable_reduction has already enforced the condition.
32590 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
32591 to create a {1,2,3,...} vector.
32592 (vectorizable_reduction): Treat the number of units as polynomial.
32593 Choose vectype_in based on the largest scalar element size rather
32594 than the smallest number of units. Enforce the restrictions
32597 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32598 Alan Hayward <alan.hayward@arm.com>
32599 David Sherwood <david.sherwood@arm.com>
32601 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
32602 number of units as polynomial.
32604 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32605 Alan Hayward <alan.hayward@arm.com>
32606 David Sherwood <david.sherwood@arm.com>
32608 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
32609 * target.def (autovectorize_vector_sizes): Return the vector sizes
32610 by pointer, using vector_sizes rather than a bitmask.
32611 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
32612 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
32613 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
32615 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
32616 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
32617 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
32618 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
32619 * omp-general.c (omp_max_vf): Likewise.
32620 * omp-low.c (omp_clause_aligned_alignment): Likewise.
32621 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
32622 * tree-vect-loop.c (vect_analyze_loop): Likewise.
32623 * tree-vect-slp.c (vect_slp_bb): Likewise.
32624 * doc/tm.texi: Regenerate.
32625 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
32627 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
32628 the vector size as a poly_uint64 rather than an unsigned int.
32629 (current_vector_size): Change from an unsigned int to a poly_uint64.
32630 (get_vectype_for_scalar_type): Update accordingly.
32631 * tree.h (build_truth_vector_type): Take the size and number of
32632 units as a poly_uint64 rather than an unsigned int.
32633 (build_vector_type): Add a temporary overload that takes
32634 the number of units as a poly_uint64 rather than an unsigned int.
32635 * tree.c (make_vector_type): Likewise.
32636 (build_truth_vector_type): Take the number of units as a poly_uint64
32637 rather than an unsigned int.
32639 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32640 Alan Hayward <alan.hayward@arm.com>
32641 David Sherwood <david.sherwood@arm.com>
32643 * target.def (get_mask_mode): Take the number of units and length
32644 as poly_uint64s rather than unsigned ints.
32645 * targhooks.h (default_get_mask_mode): Update accordingly.
32646 * targhooks.c (default_get_mask_mode): Likewise.
32647 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
32648 * doc/tm.texi: Regenerate.
32650 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32651 Alan Hayward <alan.hayward@arm.com>
32652 David Sherwood <david.sherwood@arm.com>
32654 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
32655 * omp-general.c (omp_max_vf): Likewise.
32656 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
32657 (expand_omp_simd): Handle polynomial safelen.
32658 * omp-low.c (omplow_simd_context): Add a default constructor.
32659 (omplow_simd_context::max_vf): Change from int to poly_uint64.
32660 (lower_rec_simd_input_clauses): Update accordingly.
32661 (lower_rec_input_clauses): Likewise.
32663 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32664 Alan Hayward <alan.hayward@arm.com>
32665 David Sherwood <david.sherwood@arm.com>
32667 * tree-vectorizer.h (vect_nunits_for_cost): New function.
32668 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
32669 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
32670 (vect_analyze_slp_cost): Likewise.
32671 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
32672 (vect_model_load_cost): Likewise.
32674 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32675 Alan Hayward <alan.hayward@arm.com>
32676 David Sherwood <david.sherwood@arm.com>
32678 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
32679 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
32680 from an unsigned int * to a poly_uint64_pod *.
32681 (calculate_unrolling_factor): New function.
32682 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
32684 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32685 Alan Hayward <alan.hayward@arm.com>
32686 David Sherwood <david.sherwood@arm.com>
32688 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
32689 from an unsigned int to a poly_uint64.
32690 (_loop_vec_info::slp_unrolling_factor): Likewise.
32691 (_loop_vec_info::vectorization_factor): Change from an int
32693 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
32694 (vect_get_num_vectors): New function.
32695 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
32696 (vect_get_num_copies): Use vect_get_num_vectors.
32697 (vect_analyze_data_ref_dependences): Change max_vf from an int *
32698 to an unsigned int *.
32699 (vect_analyze_data_refs): Change min_vf from an int * to a
32701 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
32702 than an unsigned HOST_WIDE_INT.
32703 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
32704 (vect_analyze_data_ref_dependence): Change max_vf from an int *
32705 to an unsigned int *.
32706 (vect_analyze_data_ref_dependences): Likewise.
32707 (vect_compute_data_ref_alignment): Handle polynomial vf.
32708 (vect_enhance_data_refs_alignment): Likewise.
32709 (vect_prune_runtime_alias_test_list): Likewise.
32710 (vect_shift_permute_load_chain): Likewise.
32711 (vect_supportable_dr_alignment): Likewise.
32712 (dependence_distance_ge_vf): Take the vectorization factor as a
32713 poly_uint64 rather than an unsigned HOST_WIDE_INT.
32714 (vect_analyze_data_refs): Change min_vf from an int * to a
32716 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
32717 vfm1 as a poly_uint64 rather than an int. Make the same change
32718 for the returned bound_scalar.
32719 (vect_gen_vector_loop_niters): Handle polynomial vf.
32720 (vect_do_peeling): Likewise. Update call to
32721 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
32722 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
32724 * tree-vect-loop.c (vect_determine_vectorization_factor)
32725 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
32726 (vect_get_known_peeling_cost): Likewise.
32727 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
32728 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
32729 (vect_transform_loop): Likewise. Use the lowest possible VF when
32730 updating the upper bounds of the loop.
32731 (vect_min_worthwhile_factor): Make static. Return an unsigned int
32732 rather than an int.
32733 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
32734 polynomial unroll factors.
32735 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
32736 (vect_make_slp_decision): Likewise.
32737 (vect_supported_load_permutation_p): Likewise, and polynomial
32739 (vect_analyze_slp_cost): Handle polynomial vf.
32740 (vect_slp_analyze_node_operations): Likewise.
32741 (vect_slp_analyze_bb_1): Likewise.
32742 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
32743 than an unsigned HOST_WIDE_INT.
32744 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
32745 (vectorizable_load): Handle polynomial vf.
32746 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
32748 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
32750 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32751 Alan Hayward <alan.hayward@arm.com>
32752 David Sherwood <david.sherwood@arm.com>
32754 * match.pd: Handle bit operations involving three constants
32755 and try to fold one pair.
32757 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32759 * tree-vect-loop-manip.c: Include gimple-fold.h.
32760 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
32761 niters_maybe_zero parameters. Handle other cases besides a step of 1.
32762 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
32763 Add a path that uses a step of VF instead of 1, but disable it
32765 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
32766 and niters_no_overflow parameters. Update calls to
32767 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
32768 Create a new SSA name if the latter choses to use a ste other
32769 than zero, and return it via niters_vector_mult_vf_var.
32770 * tree-vect-loop.c (vect_transform_loop): Update calls to
32771 vect_do_peeling, vect_gen_vector_loop_niters and
32772 slpeel_make_loop_iterate_ntimes.
32773 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
32774 (vect_gen_vector_loop_niters): Update declarations after above changes.
32776 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
32778 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
32779 128-bit round to integer instructions.
32780 (ceil<mode>2): Likewise.
32781 (btrunc<mode>2): Likewise.
32782 (round<mode>2): Likewise.
32784 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
32786 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
32787 unaligned VSX load/store on P8/P9.
32788 (expand_block_clear): Allow the use of unaligned VSX
32789 load/store on P8/P9.
32791 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
32793 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
32795 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
32796 swap associated with both a load and a store.
32798 2018-01-02 Andrew Waterman <andrew@sifive.com>
32800 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
32801 * config/riscv/riscv.md (clear_cache): Use it.
32803 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
32805 * web.c: Remove out-of-date comment.
32807 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32809 * expr.c (fixup_args_size_notes): Check that any existing
32810 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
32811 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
32812 (emit_single_push_insn): ...here.
32814 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32816 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
32817 (const_vector_encoded_nelts): New function.
32818 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
32819 (const_vector_int_elt, const_vector_elt): Declare.
32820 * emit-rtl.c (const_vector_int_elt_1): New function.
32821 (const_vector_elt): Likewise.
32822 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
32823 of CONST_VECTOR_ELT.
32825 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32827 * expr.c: Include rtx-vector-builder.h.
32828 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
32829 directly on the tree encoding.
32830 (const_vector_from_tree): Likewise.
32831 * optabs.c: Include rtx-vector-builder.h.
32832 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
32833 sequence of "u" values.
32834 * vec-perm-indices.c: Include rtx-vector-builder.h.
32835 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
32836 directly on the vec_perm_indices encoding.
32838 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32840 * doc/rtl.texi (const_vector): Describe new encoding scheme.
32841 * Makefile.in (OBJS): Add rtx-vector-builder.o.
32842 * rtx-vector-builder.h: New file.
32843 * rtx-vector-builder.c: Likewise.
32844 * rtl.h (rtx_def::u2): Add a const_vector field.
32845 (CONST_VECTOR_NPATTERNS): New macro.
32846 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
32847 (CONST_VECTOR_DUPLICATE_P): Likewise.
32848 (CONST_VECTOR_STEPPED_P): Likewise.
32849 (CONST_VECTOR_ENCODED_ELT): Likewise.
32850 (const_vec_duplicate_p): Check for a duplicated vector encoding.
32851 (unwrap_const_vec_duplicate): Likewise.
32852 (const_vec_series_p): Check for a non-duplicated vector encoding.
32853 Say that the function only returns true for integer vectors.
32854 * emit-rtl.c: Include rtx-vector-builder.h.
32855 (gen_const_vec_duplicate_1): Delete.
32856 (gen_const_vector): Call gen_const_vec_duplicate instead of
32857 gen_const_vec_duplicate_1.
32858 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
32859 (gen_const_vec_duplicate): Use rtx_vector_builder.
32860 (gen_const_vec_series): Likewise.
32861 (gen_rtx_CONST_VECTOR): Likewise.
32862 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
32863 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
32864 Build a new vector rather than modifying a CONST_VECTOR in-place.
32865 (handle_special_swappables): Update call accordingly.
32866 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
32867 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
32868 Build a new vector rather than modifying a CONST_VECTOR in-place.
32869 (handle_special_swappables): Update call accordingly.
32871 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32873 * simplify-rtx.c (simplify_const_binary_operation): Use
32874 CONST_VECTOR_ELT instead of XVECEXP.
32876 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32878 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
32879 the selector elements to be different from the data elements
32880 if the selector is a VECTOR_CST.
32881 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
32882 ssizetype for the selector.
32884 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32886 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
32887 before testing each element individually.
32888 * tree-vect-generic.c (lower_vec_perm): Likewise.
32890 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32892 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
32893 * selftest-run-tests.c (selftest::run_tests): Call it.
32894 * vector-builder.h (vector_builder::operator ==): New function.
32895 (vector_builder::operator !=): Likewise.
32896 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
32897 (vec_perm_indices::all_from_input_p): New function.
32898 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
32899 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
32900 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
32901 instead of reading the VECTOR_CST directly. Detect whether both
32902 vector inputs are the same before constructing the vec_perm_indices,
32903 and update the number of inputs argument accordingly. Use the
32904 utility functions added above. Only construct sel2 if we need to.
32906 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32908 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
32909 the broadcast of the low byte.
32910 (expand_mult_highpart): Use an explicit encoding for the permutes.
32911 * optabs-query.c (can_mult_highpart_p): Likewise.
32912 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
32913 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
32914 (vectorizable_bswap): Likewise.
32915 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
32916 explicit encoding for the power-of-2 permutes.
32917 (vect_permute_store_chain): Likewise.
32918 (vect_grouped_load_supported): Likewise.
32919 (vect_permute_load_chain): Likewise.
32921 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32923 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
32924 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
32925 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
32926 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
32927 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
32928 (vect_gen_perm_mask_any): Likewise.
32930 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32932 * int-vector-builder.h: New file.
32933 * vec-perm-indices.h: Include int-vector-builder.h.
32934 (vec_perm_indices): Redefine as an int_vector_builder.
32935 (auto_vec_perm_indices): Delete.
32936 (vec_perm_builder): Redefine as a stand-alone class.
32937 (vec_perm_indices::vec_perm_indices): New function.
32938 (vec_perm_indices::clamp): Likewise.
32939 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
32940 (vec_perm_indices::new_vector): New function.
32941 (vec_perm_indices::new_expanded_vector): Update for new
32942 vec_perm_indices class.
32943 (vec_perm_indices::rotate_inputs): New function.
32944 (vec_perm_indices::all_in_range_p): Operate directly on the
32945 encoded form, without computing elided elements.
32946 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
32947 encoding. Update for new vec_perm_indices class.
32948 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
32949 the given vec_perm_builder.
32950 (expand_vec_perm_var): Update vec_perm_builder constructor.
32951 (expand_mult_highpart): Use vec_perm_builder instead of
32952 auto_vec_perm_indices.
32953 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
32954 vec_perm_indices instead of auto_vec_perm_indices. Use a single
32955 or double series encoding as appropriate.
32956 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
32957 vec_perm_indices instead of auto_vec_perm_indices.
32958 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
32959 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
32960 (vect_permute_store_chain): Likewise.
32961 (vect_grouped_load_supported): Likewise.
32962 (vect_permute_load_chain): Likewise.
32963 (vect_shift_permute_load_chain): Likewise.
32964 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
32965 (vect_transform_slp_perm_load): Likewise.
32966 (vect_schedule_slp_instance): Likewise.
32967 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
32968 (vectorizable_mask_load_store): Likewise.
32969 (vectorizable_bswap): Likewise.
32970 (vectorizable_store): Likewise.
32971 (vectorizable_load): Likewise.
32972 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
32973 vec_perm_indices instead of auto_vec_perm_indices. Use
32974 tree_to_vec_perm_builder to read the vector from a tree.
32975 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
32976 vec_perm_builder instead of a vec_perm_indices.
32977 (have_whole_vector_shift): Use vec_perm_builder and
32978 vec_perm_indices instead of auto_vec_perm_indices. Leave the
32979 truncation to calc_vec_perm_mask_for_shift.
32980 (vect_create_epilog_for_reduction): Likewise.
32981 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
32982 from auto_vec_perm_indices to vec_perm_indices.
32983 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
32984 instead of changing individual elements.
32985 (aarch64_vectorize_vec_perm_const): Use new_vector to install
32986 the vector in d.perm.
32987 * config/arm/arm.c (expand_vec_perm_d::perm): Change
32988 from auto_vec_perm_indices to vec_perm_indices.
32989 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
32990 instead of changing individual elements.
32991 (arm_vectorize_vec_perm_const): Use new_vector to install
32992 the vector in d.perm.
32993 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
32994 Update vec_perm_builder constructor.
32995 (rs6000_expand_interleave): Likewise.
32996 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
32997 (rs6000_expand_interleave): Likewise.
32999 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
33001 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
33002 to qimode could truncate the indices.
33003 * optabs.c (expand_vec_perm_var): Likewise.
33005 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
33007 * Makefile.in (OBJS): Add vec-perm-indices.o.
33008 * vec-perm-indices.h: New file.
33009 * vec-perm-indices.c: Likewise.
33010 * target.h (vec_perm_indices): Replace with a forward class
33012 (auto_vec_perm_indices): Move to vec-perm-indices.h.
33013 * optabs.h: Include vec-perm-indices.h.
33014 (expand_vec_perm): Delete.
33015 (selector_fits_mode_p, expand_vec_perm_var): Declare.
33016 (expand_vec_perm_const): Declare.
33017 * target.def (vec_perm_const_ok): Replace with...
33018 (vec_perm_const): ...this new hook.
33019 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
33020 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
33021 * doc/tm.texi: Regenerate.
33022 * optabs.def (vec_perm_const): Delete.
33023 * doc/md.texi (vec_perm_const): Likewise.
33024 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
33025 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
33026 expand_vec_perm for constant permutation vectors. Assert that
33027 the mode of variable permutation vectors is the integer equivalent
33028 of the mode that is being permuted.
33029 * optabs-query.h (selector_fits_mode_p): Declare.
33030 * optabs-query.c: Include vec-perm-indices.h.
33031 (selector_fits_mode_p): New function.
33032 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
33033 is defined, instead of checking whether the vec_perm_const_optab
33034 exists. Use targetm.vectorize.vec_perm_const instead of
33035 targetm.vectorize.vec_perm_const_ok. Check whether the indices
33036 fit in the vector mode before using a variable permute.
33037 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
33038 vec_perm_indices instead of an rtx.
33039 (expand_vec_perm): Replace with...
33040 (expand_vec_perm_const): ...this new function. Take the selector
33041 as a vec_perm_indices rather than an rtx. Also take the mode of
33042 the selector. Update call to shift_amt_for_vec_perm_mask.
33043 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
33044 Use vec_perm_indices::new_expanded_vector to expand the original
33045 selector into bytes. Check whether the indices fit in the vector
33046 mode before using a variable permute.
33047 (expand_vec_perm_var): Make global.
33048 (expand_mult_highpart): Use expand_vec_perm_const.
33049 * fold-const.c: Includes vec-perm-indices.h.
33050 * tree-ssa-forwprop.c: Likewise.
33051 * tree-vect-data-refs.c: Likewise.
33052 * tree-vect-generic.c: Likewise.
33053 * tree-vect-loop.c: Likewise.
33054 * tree-vect-slp.c: Likewise.
33055 * tree-vect-stmts.c: Likewise.
33056 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
33058 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
33059 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
33060 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
33061 (aarch64_vectorize_vec_perm_const): ...this new function.
33062 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
33063 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
33064 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
33065 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
33066 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
33067 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
33068 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
33070 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
33071 check for NEON modes.
33072 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
33073 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
33074 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
33075 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
33077 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
33078 the old VEC_PERM_CONST conditions.
33079 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
33080 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
33081 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
33082 (ia64_vectorize_vec_perm_const_ok): Merge into...
33083 (ia64_vectorize_vec_perm_const): ...this new function.
33084 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
33085 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
33086 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
33087 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
33088 * config/mips/mips.c (mips_expand_vec_perm_const)
33089 (mips_vectorize_vec_perm_const_ok): Merge into...
33090 (mips_vectorize_vec_perm_const): ...this new function.
33091 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
33092 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
33093 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
33094 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
33095 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
33096 (rs6000_expand_vec_perm_const): Delete.
33097 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
33099 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
33100 (altivec_expand_vec_perm_const_le): Take each operand individually.
33101 Operate on constant selectors rather than rtxes.
33102 (altivec_expand_vec_perm_const): Likewise. Update call to
33103 altivec_expand_vec_perm_const_le.
33104 (rs6000_expand_vec_perm_const): Delete.
33105 (rs6000_vectorize_vec_perm_const_ok): Delete.
33106 (rs6000_vectorize_vec_perm_const): New function.
33107 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
33108 an element count and rtx array.
33109 (rs6000_expand_extract_even): Update call accordingly.
33110 (rs6000_expand_interleave): Likewise.
33111 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
33112 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
33113 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
33114 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
33115 (rs6000_expand_vec_perm_const): Delete.
33116 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
33117 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
33118 (altivec_expand_vec_perm_const_le): Take each operand individually.
33119 Operate on constant selectors rather than rtxes.
33120 (altivec_expand_vec_perm_const): Likewise. Update call to
33121 altivec_expand_vec_perm_const_le.
33122 (rs6000_expand_vec_perm_const): Delete.
33123 (rs6000_vectorize_vec_perm_const_ok): Delete.
33124 (rs6000_vectorize_vec_perm_const): New function. Remove stray
33125 reference to the SPE evmerge intructions.
33126 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
33127 an element count and rtx array.
33128 (rs6000_expand_extract_even): Update call accordingly.
33129 (rs6000_expand_interleave): Likewise.
33130 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
33131 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
33133 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
33135 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
33137 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
33138 vector mode and that that mode matches the mode of the data
33140 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
33141 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
33142 directly using expand_vec_perm_1 when forcing selectors into
33144 (expand_vec_perm_var): New function, split out from expand_vec_perm.
33146 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
33148 * optabs-query.h (can_vec_perm_p): Delete.
33149 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
33150 * optabs-query.c (can_vec_perm_p): Split into...
33151 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
33152 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
33153 particular selector is valid.
33154 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
33155 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
33156 (vect_grouped_load_supported): Likewise.
33157 (vect_shift_permute_load_chain): Likewise.
33158 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
33159 (vect_transform_slp_perm_load): Likewise.
33160 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
33161 (vectorizable_bswap): Likewise.
33162 (vect_gen_perm_mask_checked): Likewise.
33163 * fold-const.c (fold_ternary_loc): Likewise. Don't take
33164 implementations of variable permutation vectors into account
33165 when deciding which selector to use.
33166 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
33167 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
33168 with a false third argument.
33169 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
33170 to test whether the constant selector is valid and can_vec_perm_var_p
33171 to test whether a variable selector is valid.
33173 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
33175 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
33176 * optabs-query.c (can_vec_perm_p): Likewise.
33177 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
33178 instead of vec_perm_indices.
33179 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
33180 (vect_gen_perm_mask_checked): Likewise,
33181 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
33182 (vect_gen_perm_mask_checked): Likewise,
33184 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
33186 * optabs-query.h (qimode_for_vec_perm): Declare.
33187 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
33188 (qimode_for_vec_perm): ...this new function.
33189 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
33191 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
33193 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
33194 does not have a conditional at the top.
33196 2018-01-02 Richard Biener <rguenther@suse.de>
33198 * ipa-inline.c (big_speedup_p): Fix expression.
33200 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
33203 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
33206 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
33210 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
33211 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
33212 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
33213 cond_taken_branch_cost 3->4.
33215 2018-01-01 Jakub Jelinek <jakub@redhat.com>
33217 PR tree-optimization/83581
33218 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
33219 TODO_cleanup_cfg if any changes have been made.
33221 PR middle-end/83608
33222 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
33223 convert_modes if target mode has the right side, but different mode
33226 PR middle-end/83609
33227 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
33228 last argument when extracting from CONCAT. If either from_real or
33229 from_imag is NULL, use expansion through memory. If result is not
33230 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
33231 the parts directly to inner mode, if even that fails, use expansion
33234 PR middle-end/83623
33235 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
33236 check for bswap in mode rather than HImode and use that in expand_unop
33239 Copyright (C) 2018 Free Software Foundation, Inc.
33241 Copying and distribution of this file, with or without modification,
33242 are permitted in any medium without royalty provided the copyright
33243 notice and this notice are preserved.