]> git.ipfire.org Git - thirdparty/gcc.git/commit
Use vectype from SLP node for vect_get_{load,store}_cost if possible
authorRichard Biener <rguenther@suse.de>
Tue, 13 May 2025 07:50:36 +0000 (09:50 +0200)
committerRichard Biener <rguenther@suse.de>
Wed, 14 May 2025 16:48:56 +0000 (18:48 +0200)
commitb4b4ee28ce60f4f85b7955fb1df249d67d26286d
treea744e91376289ee339c3d786af287f66470a23fb
parent991adf8b18c3fa03eff6cfbf396d9a15ef17f93c
Use vectype from SLP node for vect_get_{load,store}_cost if possible

The vect_get_{load,store}_cost API is used from both vectorizable_*
where we've done SLP analysis and from alignment peeling analysis
with is done before this and thus only stmt_vec_infos are available.
The following patch makes sure we pick the vector type relevant
for costing from the SLP node when available.

* tree-vect-stmts.cc (vect_get_store_cost): Compute vectype based
on whether we got SLP node or stmt_vec_info and use the full
record_stmt_cost API.
(vect_get_load_cost): Likewise.
gcc/tree-vect-stmts.cc