[PATCH] D101076: [SVE][LoopVectorize] Add support for scalable vectorization of first-order recurrences
Sander de Smalen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 26 09:37:14 PDT 2021
sdesmalen added inline comments.
================
Comment at: llvm/include/llvm/IR/IRBuilder.h:2514-2515
+ // Return a vector splice intrinsic if using scalable vectors, otherwise
+ // return a shufflevector. If the immediate is positive, a vector is extracted
+ // from the concat of V1 & V2, starting at Imm. If the immediate is negative,
+ // we extract -Imm elements from V1 and the remaining elements from V2.
----------------
a vector is extracted from concat(V1, V2), starting at Imm.
================
Comment at: llvm/lib/IR/IRBuilder.cpp:1032
+ const Twine &Name) {
+ auto Ty = cast<VectorType>(V1->getType());
+ assert(Ty == V2->getType() && "Splice expects matching operand types!");
----------------
This variable isn't particularly useful. Maybe just write:
assert(isa<VectorType>(V1->getType()) && "Unexpected type");
================
Comment at: llvm/lib/IR/IRBuilder.cpp:1045
+ unsigned NumElts =
+ cast<FixedVectorType>(Ty)->getElementCount().getKnownMinValue();
+ if ((-Imm > NumElts) || (Imm >= NumElts)) {
----------------
`cast<FixedVectorType>(Ty)->getNumElements();`
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D101076/new/
https://reviews.llvm.org/D101076
More information about the llvm-commits
mailing list