[LLVMdev] On large vectors
Renato Golin
renato.golin at linaro.org
Wed Feb 6 09:34:39 PST 2013
On 6 February 2013 17:03, Nadav Rotem <nrotem at apple.com> wrote:
> I can see why freakishly large vectors would produce bad code. The type
> <50 x float> would be widened to the next power of two, and then split over
> and over again until it fits into registers. So, any <50 x float> would
> take 16 XMM registers, that will be spilled. The situation with integer
> types is even worse because you can truncate or extend from one type to
> another.
>
In that sense, an inner loop with sequential access would be vectorized
into much better code than having a <50 x float>.
Whether this is something LLVM could do with <50 x float> or should always
be up to the front-end developer, I don't know. It doesn't seem
particularly hard to do it in the vectorizer, but it's also probably won't
be high on the TODO list for a while.
cheers,
--renato
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130206/f720fdc4/attachment.html>
More information about the llvm-dev
mailing list