diff options
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopUtils.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/LoopUtils.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Utils/LoopUtils.cpp b/llvm/lib/Transforms/Utils/LoopUtils.cpp index cf6b183..c50bb4a 100644 --- a/llvm/lib/Transforms/Utils/LoopUtils.cpp +++ b/llvm/lib/Transforms/Utils/LoopUtils.cpp @@ -1224,9 +1224,11 @@ Value *llvm::createAnyOfReduction(IRBuilderBase &Builder, Value *Src, } Value *llvm::createFindLastIVReduction(IRBuilderBase &Builder, Value *Src, - Value *Start, Value *Sentinel) { + RecurKind RdxKind, Value *Start, + Value *Sentinel) { + bool IsSigned = RecurrenceDescriptor::isSignedRecurrenceKind(RdxKind); Value *MaxRdx = Src->getType()->isVectorTy() - ? Builder.CreateIntMaxReduce(Src, true) + ? Builder.CreateIntMaxReduce(Src, IsSigned) : Src; // Correct the final reduction result back to the start value if the maximum // reduction is sentinel value. |