Re: [PATCH] tree-optimization/113552 - fix num_call accounting in simd clone vectorization

2024-01-23 Thread Jakub Jelinek
On Tue, Jan 23, 2024 at 01:40:15PM +0100, Richard Biener wrote: > It's never going to be 3 vs 2 but 3 * 2^n vs. 3 * 2^m so floor or > ceil doesn't matter. In fact we could have just using > some inverse of exact_log2 (n->simdclone->simdlen). That is, > it's only simdlen that's varying in this

Re: [PATCH] tree-optimization/113552 - fix num_call accounting in simd clone vectorization

2024-01-23 Thread Richard Biener
On Tue, 23 Jan 2024, Jakub Jelinek wrote: > On Tue, Jan 23, 2024 at 01:03:46PM +0100, Richard Biener wrote: > > On Tue, 23 Jan 2024, Jakub Jelinek wrote: > > > > > On Tue, Jan 23, 2024 at 12:56:52PM +0100, Richard Biener wrote: > > > > The following avoids using exact_log2 on the number of SIMD

Re: [PATCH] tree-optimization/113552 - fix num_call accounting in simd clone vectorization

2024-01-23 Thread Jakub Jelinek
On Tue, Jan 23, 2024 at 01:03:46PM +0100, Richard Biener wrote: > On Tue, 23 Jan 2024, Jakub Jelinek wrote: > > > On Tue, Jan 23, 2024 at 12:56:52PM +0100, Richard Biener wrote: > > > The following avoids using exact_log2 on the number of SIMD clone calls > > > to be emitted when vectorizing

Re: [PATCH] tree-optimization/113552 - fix num_call accounting in simd clone vectorization

2024-01-23 Thread Richard Biener
On Tue, 23 Jan 2024, Jakub Jelinek wrote: > On Tue, Jan 23, 2024 at 12:56:52PM +0100, Richard Biener wrote: > > 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

Re: [PATCH] tree-optimization/113552 - fix num_call accounting in simd clone vectorization

2024-01-23 Thread Jakub Jelinek
On Tue, Jan 23, 2024 at 12:56:52PM +0100, Richard Biener wrote: > 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

[PATCH] tree-optimization/113552 - fix num_call accounting in simd clone vectorization

2024-01-23 Thread Richard Biener
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