[PATCH] D22867: [LV] Untangle the concepts of uniform and scalar
Adam Nemet via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 28 20:57:56 PDT 2016
anemet added a comment.
Very nice clean-up, Matt!
I liked it in the old description that it listed the functional changes. These are gone now (I am assuming you will be using the description for the commit log).
I still want to think a little bit about the functionality changes but would be good if you could take care of the one thing below.
================
Comment at: lib/Transforms/Vectorize/LoopVectorize.cpp:1480-1490
@@ -1482,2 +1479,13 @@
}
+ /// Returns true if the target machine can represent \p V as a masked gather
+ /// or scatter operation.
+ bool isLegalGatherOrScatter(Value *V) {
+ auto *LI = dyn_cast<LoadInst>(V);
+ auto *SI = dyn_cast<StoreInst>(V);
+ if (!LI && !SI)
+ return false;
+ auto *Ptr = LI ? LI->getPointerOperand() : SI->getPointerOperand();
+ auto *Ty = cast<PointerType>(Ptr->getType())->getElementType();
+ return (LI && isLegalMaskedGather(Ty)) || (SI && isLegalMaskedScatter(Ty));
+ }
----------------
Moving this inside Legal seems orthogonal to this patch, if so please split this part out and commit.
https://reviews.llvm.org/D22867
More information about the llvm-commits
mailing list