diff options
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopUtils.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/LoopUtils.cpp | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/llvm/lib/Transforms/Utils/LoopUtils.cpp b/llvm/lib/Transforms/Utils/LoopUtils.cpp index 84c0855..185af86 100644 --- a/llvm/lib/Transforms/Utils/LoopUtils.cpp +++ b/llvm/lib/Transforms/Utils/LoopUtils.cpp @@ -1336,7 +1336,8 @@ Value *llvm::createSimpleReduction(VectorBuilder &VBuilder, Value *Src, const RecurrenceDescriptor &Desc) { RecurKind Kind = Desc.getRecurrenceKind(); assert(!RecurrenceDescriptor::isAnyOfRecurrenceKind(Kind) && - "AnyOf reduction is not supported."); + !RecurrenceDescriptor::isFindLastIVRecurrenceKind(Kind) && + "AnyOf or FindLastIV reductions are not supported."); Intrinsic::ID Id = getReductionIntrinsicID(Kind); auto *SrcTy = cast<VectorType>(Src->getType()); Type *SrcEltTy = SrcTy->getElementType(); @@ -1345,24 +1346,6 @@ Value *llvm::createSimpleReduction(VectorBuilder &VBuilder, Value *Src, return VBuilder.createSimpleReduction(Id, SrcTy, Ops); } -Value *llvm::createReduction(IRBuilderBase &B, - const RecurrenceDescriptor &Desc, Value *Src, - PHINode *OrigPhi) { - // TODO: Support in-order reductions based on the recurrence descriptor. - // All ops in the reduction inherit fast-math-flags from the recurrence - // descriptor. - IRBuilderBase::FastMathFlagGuard FMFGuard(B); - B.setFastMathFlags(Desc.getFastMathFlags()); - - RecurKind RK = Desc.getRecurrenceKind(); - if (RecurrenceDescriptor::isAnyOfRecurrenceKind(RK)) - return createAnyOfReduction(B, Src, Desc, OrigPhi); - if (RecurrenceDescriptor::isFindLastIVRecurrenceKind(RK)) - return createFindLastIVReduction(B, Src, Desc); - - return createSimpleReduction(B, Src, RK); -} - Value *llvm::createOrderedReduction(IRBuilderBase &B, const RecurrenceDescriptor &Desc, Value *Src, Value *Start) { |