diff --git a/llvm/lib/CodeGen/ComplexDeinterleavingPass.cpp b/llvm/lib/CodeGen/ComplexDeinterleavingPass.cpp index 4cd378f9aa595..a83982de14b28 100644 --- a/llvm/lib/CodeGen/ComplexDeinterleavingPass.cpp +++ b/llvm/lib/CodeGen/ComplexDeinterleavingPass.cpp @@ -2332,8 +2332,9 @@ void ComplexDeinterleavingGraph::replaceNodes() { } else if (RootNode->Operation == ComplexDeinterleavingOperation::ReductionSingle) { auto *RootInst = cast(RootNode->Real); - ReductionInfo[RootInst].first->removeIncomingValue(BackEdge); - DeadInstrRoots.push_back(ReductionInfo[RootInst].second); + auto &Info = ReductionInfo[RootInst]; + Info.first->removeIncomingValue(BackEdge); + DeadInstrRoots.push_back(Info.second); } else { assert(R && "Unable to find replacement for RootInstruction"); DeadInstrRoots.push_back(RootInstruction);