IRBuilder::CreateVectorPack method takes an array of values of the same scalar type and packs them into a vector with series of instertelement instructions.
Diff Detail
Diff Detail
Event Timeline
Comment Actions
LGTM with one minor comment inline.
include/llvm/IR/IRBuilder.h | ||
---|---|---|
1617 | Mild preference: assert(!Elts.empty() .... |
Comment Actions
I was initially going to suggest CreateVectorLiteral but what you're creating need not be a literal so that is misleading. So I'm fine with CreateVectorPack, but I suppose you could wait a little bit to see if someone else has a better idea.
Mild preference: assert(!Elts.empty() ....