Page MenuHomePhabricator

[IRBuilder] A method for creating a vector from scalar values
AbandonedPublic

Authored by chfast on Apr 30 2015, 6:48 AM.

Details

Summary

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

Event Timeline

chfast updated this revision to Diff 24703.Apr 30 2015, 6:48 AM
chfast retitled this revision from to [IRBuilder] A method for creating a vector from scalar values.
chfast updated this object.
chfast edited the test plan for this revision. (Show Details)
chfast added a subscriber: Unknown Object (MLST).
sanjoy accepted this revision.Jun 29 2015, 2:27 PM
sanjoy edited edge metadata.

LGTM with one minor comment inline.

include/llvm/IR/IRBuilder.h
1617

Mild preference: assert(!Elts.empty() ....

This revision is now accepted and ready to land.Jun 29 2015, 2:27 PM

Thanks for the review.
Is the name "VectorPack" ok?

Thanks for the review.
Is the name "VectorPack" ok?

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.

chfast abandoned this revision.Sep 12 2016, 3:37 PM