[llvm-dev] What is "splat" in BUILD_VECTOR?

Sanjay Patel via llvm-dev llvm-dev at lists.llvm.org
Sun May 7 07:52:34 PDT 2017


AFAIK, the first use of "splat" in this vector instruction sense comes from
PowerPC's Altivec extension:
https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.1.0/com.ibm.zos.v2r1.cbcpx01/bif_vec_splat.htm

It's possible there were other instruction sets that used the term before
this, but that's my first sighting of vector splat. Given that PPC was an
early (first?) LLVM backend, it makes sense that the code here adopted that
terminology. In x86 AVX, it's called a "broadcast" instruction, but we
still mostly use "splat".

Splat is derived from "splatter". For vector functionality, we're
visualizing a scalar object being thrown into a vector register and
breaking into identical pieces for each element of the vector. Disregard
conservation of mass, etc. :)

On Sun, May 7, 2017 at 8:09 AM, Perry E. Metzger via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

> On Sat, 6 May 2017 20:11:17 -0700 Kyle Butt via llvm-dev
> <llvm-dev at lists.llvm.org> wrote:
> > Splat means to take a single value and build a vector out of
> > identical copies of that value. 4 ->  [4,4,4,4]
> >
> > I'm not sure where the term came from.
>
> I was wondering this myself.
>
> Would it be possible (in the spirit of the other discussion) to put
> a clean explanation of this into http://llvm.org/docs/Lexicon.html ?
> (That was where I first looked for an answer.)
>
> Perry
> --
> Perry E. Metzger                perry at piermont.com
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170507/a93e4c16/attachment.html>


More information about the llvm-dev mailing list