diff options
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopUtils.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/LoopUtils.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Utils/LoopUtils.cpp b/llvm/lib/Transforms/Utils/LoopUtils.cpp index 2e76852..f57d95e 100644 --- a/llvm/lib/Transforms/Utils/LoopUtils.cpp +++ b/llvm/lib/Transforms/Utils/LoopUtils.cpp @@ -1233,11 +1233,11 @@ Value *llvm::createAnyOfReduction(IRBuilderBase &Builder, Value *Src, } Value *llvm::createFindLastIVReduction(IRBuilderBase &Builder, Value *Src, + Value *Start, const RecurrenceDescriptor &Desc) { assert(RecurrenceDescriptor::isFindLastIVRecurrenceKind( Desc.getRecurrenceKind()) && "Unexpected reduction kind"); - Value *StartVal = Desc.getRecurrenceStartValue(); Value *Sentinel = Desc.getSentinelValue(); Value *MaxRdx = Src->getType()->isVectorTy() ? Builder.CreateIntMaxReduce(Src, true) @@ -1246,7 +1246,7 @@ Value *llvm::createFindLastIVReduction(IRBuilderBase &Builder, Value *Src, // reduction is sentinel value. Value *Cmp = Builder.CreateCmp(CmpInst::ICMP_NE, MaxRdx, Sentinel, "rdx.select.cmp"); - return Builder.CreateSelect(Cmp, MaxRdx, StartVal, "rdx.select"); + return Builder.CreateSelect(Cmp, MaxRdx, Start, "rdx.select"); } Value *llvm::getReductionIdentity(Intrinsic::ID RdxID, Type *Ty, |