diff options
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Transforms/Scalar/LICM.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/Transforms/Scalar/LICM.cpp b/llvm/lib/Transforms/Scalar/LICM.cpp index 9efc3d217e4..17ac6b83993 100644 --- a/llvm/lib/Transforms/Scalar/LICM.cpp +++ b/llvm/lib/Transforms/Scalar/LICM.cpp @@ -1217,13 +1217,13 @@ bool llvm::canSinkOrHoistInst(Instruction &I, AAResults *AA, DominatorTree *DT, assert(!LI->isUnordered() && "Expected unordered load"); return false; } - } + } - auto *Source = MSSA->getSkipSelfWalker()->getClobberingMemoryAccess(SI); - (*LicmMssaOptCounter)++; - // If there are no clobbering Defs in the loop, store is safe to hoist. - return MSSA->isLiveOnEntryDef(Source) || - !CurLoop->contains(Source->getBlock()); + auto *Source = MSSA->getSkipSelfWalker()->getClobberingMemoryAccess(SI); + (*LicmMssaOptCounter)++; + // If there are no clobbering Defs in the loop, store is safe to hoist. + return MSSA->isLiveOnEntryDef(Source) || + !CurLoop->contains(Source->getBlock()); } } |