diff options
Diffstat (limited to 'llvm/lib/Target/ARM/ARMParallelDSP.cpp')
-rw-r--r-- | llvm/lib/Target/ARM/ARMParallelDSP.cpp | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/llvm/lib/Target/ARM/ARMParallelDSP.cpp b/llvm/lib/Target/ARM/ARMParallelDSP.cpp index 9b770dde261..901753713f6 100644 --- a/llvm/lib/Target/ARM/ARMParallelDSP.cpp +++ b/llvm/lib/Target/ARM/ARMParallelDSP.cpp @@ -201,6 +201,12 @@ namespace { return false; } + // We need a preheader as getIncomingValueForBlock assumes there is one. + if (!TheLoop->getLoopPreheader()) { + LLVM_DEBUG(dbgs() << "No preheader found, bailing out\n"); + return false; + } + Function &F = *Header->getParent(); M = F.getParent(); DL = &M->getDataLayout(); @@ -220,6 +226,12 @@ namespace { return false; } + if (!ST->isLittle()) { + LLVM_DEBUG(dbgs() << "Only supporting little endian: not running pass " + "ARMParallelDSP\n"); + return false; + } + LoopAccessInfo LAI(L, SE, TLI, AA, DT, LI); LLVM_DEBUG(dbgs() << "\n== Parallel DSP pass ==\n"); @@ -454,12 +466,6 @@ static void MatchReductions(Function &F, Loop *TheLoop, BasicBlock *Header, F.getFnAttribute("no-nans-fp-math").getValueAsString() == "true"; const BasicBlock *Latch = TheLoop->getLoopLatch(); - // We need a preheader as getIncomingValueForBlock assumes there is one. - if (!TheLoop->getLoopPreheader()) { - LLVM_DEBUG(dbgs() << "No preheader found, bailing out\n"); - return; - } - for (PHINode &Phi : Header->phis()) { const auto *Ty = Phi.getType(); if (!Ty->isIntegerTy(32) && !Ty->isIntegerTy(64)) |