diff options
author | Florian Hahn <flo@fhahn.com> | 2025-05-28 22:00:10 +0100 |
---|---|---|
committer | Florian Hahn <flo@fhahn.com> | 2025-05-28 22:00:11 +0100 |
commit | 249301c7794af82ea2f7b3b83d52d046e6856261 (patch) | |
tree | 3b82eace6461a2ed488e280fc1526ca129c4c7cc /llvm/lib/Transforms/Utils/LoopUtils.cpp | |
parent | ff8288442dad15d66b7a22ccad94e926e2f56deb (diff) | |
download | llvm-249301c7794af82ea2f7b3b83d52d046e6856261.zip llvm-249301c7794af82ea2f7b3b83d52d046e6856261.tar.gz llvm-249301c7794af82ea2f7b3b83d52d046e6856261.tar.bz2 |
[LoopUtils] Pass sentinel value directly to createFindLastIVRed (NFC).
Now that there is only a single FindLastIV recurrence kind, simply pass
the sentinel value instead of the full recurrence descriptor to tighten
the interface.
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopUtils.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/LoopUtils.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/llvm/lib/Transforms/Utils/LoopUtils.cpp b/llvm/lib/Transforms/Utils/LoopUtils.cpp index 67efafe..3621989 100644 --- a/llvm/lib/Transforms/Utils/LoopUtils.cpp +++ b/llvm/lib/Transforms/Utils/LoopUtils.cpp @@ -1237,12 +1237,7 @@ 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 *Sentinel = Desc.getSentinelValue(); + Value *Start, Value *Sentinel) { Value *MaxRdx = Src->getType()->isVectorTy() ? Builder.CreateIntMaxReduce(Src, true) : Src; |