Skip to content

Commit ea1ec9f

Browse files
author
git apple-llvm automerger
committed
Merge commit 'e87921304b39' from llvm.org/main into next
2 parents 2146f84 + e879213 commit ea1ec9f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5813,12 +5813,12 @@ LoopVectorizationCostModel::getReductionPatternCost(Instruction *I,
58135813

58145814
// Test if the found instruction is a reduction, and if not return an invalid
58155815
// cost specifying the parent to use the original cost modelling.
5816-
if (!InLoopReductionImmediateChains.count(RetI))
5816+
Instruction *LastChain = InLoopReductionImmediateChains.lookup(RetI);
5817+
if (!LastChain)
58175818
return std::nullopt;
58185819

58195820
// Find the reduction this chain is a part of and calculate the basic cost of
58205821
// the reduction on its own.
5821-
Instruction *LastChain = InLoopReductionImmediateChains.at(RetI);
58225822
Instruction *ReductionPhi = LastChain;
58235823
while (!isa<PHINode>(ReductionPhi))
58245824
ReductionPhi = InLoopReductionImmediateChains.at(ReductionPhi);

0 commit comments

Comments
 (0)