]> git.ipfire.org Git - thirdparty/gcc.git/commit
Avoid passing vectype != NULL when costing scalar IL
authorRichard Biener <rguenther@suse.de>
Tue, 29 Jul 2025 07:20:42 +0000 (09:20 +0200)
committerRichard Biener <rguenther@suse.de>
Thu, 31 Jul 2025 06:31:17 +0000 (08:31 +0200)
commitfb59c5719c17a04ecfd58b5e566eccd6d2ac583a
tree64c493c411d303abb31754a7b0a48e76fef88936
parentda88f9bd9e30eb743132734d71c62ebb9c42b11e
Avoid passing vectype != NULL when costing scalar IL

The following makes sure to not leak a set vectype on a stmt when
doing scalar IL costing as this can confuse vector cost models
which do not look at m_costing_for_scalar most of the time.

* tree-vectorizer.h (vector_costs::costing_for_scalar): New
accessor.
(add_stmt_cost): For scalar costing force vectype to NULL.
Verify we do not pass in a SLP node.
gcc/tree-vectorizer.h