[PATCH] D14185: Extend SLP Vectorizer to deal with aggregates
hfinkel@anl.gov via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 10 17:32:26 PST 2015
hfinkel added a subscriber: hfinkel.
================
Comment at: lib/Transforms/Vectorize/SLPVectorizer.cpp:278
@@ -299,1 +277,3 @@
+static bool matchExtractIndex(Instruction *E, unsigned i, unsigned Opcode) {
+ if (Opcode==Instruction::ExtractElement) {
ConstantInt *CI = dyn_cast<ConstantInt>(E->getOperand(1));
----------------
Add spaces around ==.
================
Comment at: lib/Transforms/Vectorize/SLPVectorizer.cpp:284
@@ +283,3 @@
+ ExtractValueInst *EI = cast<ExtractValueInst>(E);
+ assert(EI->getNumIndices()==1);
+ return *EI->idx_begin()==i;
----------------
You assert this here, but where is it checked?
================
Comment at: lib/Transforms/Vectorize/SLPVectorizer.cpp:285
@@ -303,1 +284,3 @@
+ assert(EI->getNumIndices()==1);
+ return *EI->idx_begin()==i;
}
----------------
Same here: spaces around ==.
================
Comment at: lib/Transforms/Vectorize/SLPVectorizer.cpp:1514
@@ +1513,3 @@
+ unsigned NElts;
+ if( Opcode == Instruction::ExtractValue) {
+ const DataLayout &DL = E0->getModule()->getDataLayout();
----------------
Adjust spaces: if (Opcode ==
================
Comment at: lib/Transforms/Vectorize/SLPVectorizer.cpp:1519
@@ +1518,3 @@
+ return false;
+ // Check for load can be rewritten as load of vector
+ LoadInst *LI = dyn_cast<LoadInst>(Vec);
----------------
for -> if
================
Comment at: lib/Transforms/Vectorize/SLPVectorizer.cpp:4281
@@ +4280,3 @@
+ SmallVector<Value *, 16> BuildVectorOpds;
+ if (!findBuildAggregate(LastInsertValue, BuildVector, BuildVectorOpds)) {
+ continue;
----------------
Don't need {} here.
http://reviews.llvm.org/D14185
More information about the llvm-commits
mailing list