https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116901
--- Comment #7 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The trunk branch has been updated by Richard Sandiford <rsand...@gcc.gnu.org>: https://gcc.gnu.org/g:e406994e31262b45d0daf0b9e9218fc49bd233e2 commit r15-7986-ge406994e31262b45d0daf0b9e9218fc49bd233e2 Author: Richard Sandiford <richard.sandif...@arm.com> Date: Wed Mar 12 09:40:11 2025 +0000 aarch64: Make latency account for synthetic VEC_PERM_EXPRs [PR116901] Another problem in pr110625_[24].c was that the latency calculations were ignoring VEC_PERM_EXPRs that had no associated stmt_vec_info. Such VEC_PERM_EXPRs are common and expected for SLP these days. After this change, the number of general ops in the testcases seems to be accurate apart from one remaining detail: we assume that the extension in a permuted extending load is free, even though the extension happens after the permutation. Fixing that would require more information from the vectoriser and so isn't GCC 15 material. It also should cease to be a problem if we do end up moving the permutation to its own node, rather than keeping it as part of the load. gcc/ PR target/116901 * config/aarch64/aarch64.cc (aarch64_vector_costs::count_ops): Allow stmt_info to be null. (aarch64_vector_costs::add_stmt_cost): Call count_ops even if stmt_info is null.