[PATCH] D110146: [IR] Add the constructor of ShuffleVector for one-input-vector.
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 21 05:11:15 PDT 2021
spatel accepted this revision.
spatel added a comment.
This revision is now accepted and ready to land.
LGTM - thanks!
================
Comment at: llvm/include/llvm/IR/Instructions.h:2021
+ ShuffleVectorInst(Value *V1, Value *Mask, const Twine &NameStr = "",
+ Instruction *InsertBefor = nullptr);
+ ShuffleVectorInst(Value *V1, Value *Mask, const Twine &NameStr,
----------------
Cutting the "e" off of "Before" might have been a hack to make this fit in 80-columns for the original code, but it would be nice to spell it correctly now in all of these declarations. :)
================
Comment at: llvm/lib/IR/Instructions.cpp:1910
+static Value *createPlaceholderOfShuffleVector(Value *V) {
+ assert(V && "Cannot create placeholder of nullptr V");
----------------
We call this a "unary shuffle" in the IRBuilder code comments, so "createOperandForUnaryShuffle" might make it clearer that this is the same functionality for the raw constructors.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D110146/new/
https://reviews.llvm.org/D110146
More information about the llvm-commits
mailing list