[PATCH] D37076: [LICM] Allow sinking when foldable in loop
Balaram Makam via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 25 08:12:49 PDT 2017
bmakam added inline comments.
================
Comment at: lib/Transforms/Scalar/LICM.cpp:713
+ const GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(I);
+ if (GEP && isa<LoadInst>(UserI) && (I->getParent() == UserI->getParent())) {
+ SmallVector<const Value *, 4> Indices;
----------------
Do we need to check I->getParent() == UserI->getParent()? We already check if CurLoop->contains(UserI) right?
https://reviews.llvm.org/D37076
More information about the llvm-commits
mailing list