How to convince the vectorizer to issue vector instructions for this loop

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi All,
This is my first time turning to the gcc mailing lists. I apologize if I have chosen the wrong one.

I have a member function that is multiplying one array of complex numbers (stored as 2 arrays) by 3 other arrays of complex numbers (stored similarly) and outputting the results of those 3 sets of multiplications into different arrays. The arrays are all 64-byte aligned (even the ones in the shared_ptrs,) the array lengths are all powers of 2 and larger than 16, and I don’t do any aliasing. I have done my best to tell the compiler this via __restrict__, __builtin_assume_aligned, __builtin_unreachable, and assert. I know the code is vectorizable because clang did it off the bat, though the __builtin_assume_aligned does make it generate aligned load instructions instead of unaligned…
Anyways, the code is here:
https://godbolt.org/z/sd1KoYabf

So, my question is: What am I missing that will make the autovectorizer issue vector instructions instead of scalar?

Thank you all for your time, sorry to bug you with what I am sure is a relatively simple question.
Cheers,
James




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux