[PATCH] D70068: [SLP] Enhance SLPVectorizer to vectorize vector aggregate
Alexey Bataev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 11 07:27:26 PST 2019
ABataev added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:2879-2880
+ if (auto *VT = dyn_cast<VectorType>(EltTy)) {
+ if (VT->isScalable())
+ return 0;
+ EltTy = VT->getElementType();
----------------
Why do we have this check?
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:6762
static bool findBuildAggregate(InsertValueInst *IV,
- SmallVectorImpl<Value *> &BuildVectorOpds) {
+ TargetTransformInfo *TTI,
+ SmallVectorImpl<Value *> &BuildVectorOpds,
----------------
Not formatted
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:6772-6774
+ for (auto OpdIt = TmpBuildVectorOpds.rbegin();
+ OpdIt != TmpBuildVectorOpds.rend(); OpdIt++)
+ BuildVectorOpds.push_back(*OpdIt);
----------------
Just `BuildVectorOpds.append(TmpBuildVectorOpds.rbegin(), TmpBuildVectorOpds.rend());`
================
Comment at: llvm/test/Transforms/SLPVectorizer/X86/pr42022.ll:4
+
+%struct.Vector4 = type { float, float, float, float }
+
----------------
anton-afanasyev wrote:
> RKSimon wrote:
> > Regenerate with update_test_checks.py ?
> Should it really be autogenerated? I don't like test autogeneration for excessiveness and false positives while testing. Here we just checking vector `<4 x float>` is generated. Is autogeneration really standard for tests now?
It is common practice to use auto checks and demonstrate the difference then.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70068/new/
https://reviews.llvm.org/D70068
More information about the llvm-commits
mailing list