mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
Update various Loop optimization passes to cope with the possibility that
LoopSimplify form may not be available. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86175 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -2528,6 +2528,10 @@ bool LoopStrengthReduce::runOnLoop(Loop *L, LPPassManager &LPM) {
|
||||
SE = &getAnalysis<ScalarEvolution>();
|
||||
Changed = false;
|
||||
|
||||
// If LoopSimplify form is not available, stay out of trouble.
|
||||
if (!L->getLoopPreheader() || !L->getLoopLatch())
|
||||
return false;
|
||||
|
||||
if (!IU->IVUsesByStride.empty()) {
|
||||
DEBUG(errs() << "\nLSR on \"" << L->getHeader()->getParent()->getName()
|
||||
<< "\" ";
|
||||
|
Reference in New Issue
Block a user