]> git.ipfire.org Git - thirdparty/gcc.git/commit
tree-optimization/113552 - fix num_call accounting in simd clone vectorization
authorRichard Biener <rguenther@suse.de>
Tue, 23 Jan 2024 11:53:04 +0000 (12:53 +0100)
committerRichard Biener <rguenther@suse.de>
Tue, 23 Jan 2024 13:09:30 +0000 (14:09 +0100)
commitd5d43dc399bb0f15084827c59a025189c630afdd
treee5cadca11fcc6105f3a63d0a260707326e86518f
parentac98aa7828b5eb94f12d06a275b95581a34392e4
tree-optimization/113552 - fix num_call accounting in simd clone vectorization

The following avoids using exact_log2 on the number of SIMD clone calls
to be emitted when vectorizing calls since that can easily be not
a power of two in which case it will return -1.  For different simd
clones the number of calls will differ by a multiply with a power of two
only so using floor_log2 is good enough here.

PR tree-optimization/113552
* tree-vect-stmts.cc (vectorizable_simd_clone_call): Use
floor_log2 instead of exact_log2 on the number of calls.
gcc/tree-vect-stmts.cc