[PATCH] D45469: [SLP] Use getExtractWithExtendCost() to compute the scalar cost of extractelement/ext pair
Alexey Bataev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 13 11:18:46 PDT 2018
ABataev added inline comments.
================
Comment at: lib/Transforms/Vectorize/SLPVectorizer.cpp:2201
+ all_of(Ext->users(),
+ [](User *U) { return isa<GetElementPtrInst>(U); })) {
+ // Use getExtractWithExtendCost() to calculate the cost of
----------------
ABataev wrote:
> I think you can use just `GetElementPtr::classof` here as a predicate. Also, it would be good to have negative test(s) for the situation where this should not work.
No, I meant that instead of lambda you can just use `GetElementPtrInst::classof`
```
llvm::all_of(Ext->users(), GetElementPtrInst::classof)
```
Repository:
rL LLVM
https://reviews.llvm.org/D45469
More information about the llvm-commits
mailing list