[PATCH] [IRBuilder] A method for creating a vector from scalar values
Sanjoy Das
sanjoy at playingwithpointers.com
Mon Jun 29 14:27:24 PDT 2015
LGTM with one minor comment inline.
================
Comment at: include/llvm/IR/IRBuilder.h:1617
@@ +1616,3 @@
+ Value *CreateVectorPack(ArrayRef<Value *> Elts, const Twine &Name = "") {
+ assert(Elts.size() > 0 && "Cannot pack an empty vector");
+ auto *VectorTy = VectorType::get(Elts.front()->getType(), Elts.size());
----------------
Mild preference: `assert(!Elts.empty() ...`.
http://reviews.llvm.org/D9372
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list