diff --git a/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp b/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp index 7eee0283e20e6..8005be8d4ca05 100644 --- a/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp +++ b/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp @@ -3311,7 +3311,7 @@ static void computeLiveInValues(DominatorTree &DT, Function &F, // Compute our new liveout set, then exit early if it hasn't changed despite // the contribution of our successor. - SetVector LiveOut = Data.LiveOut[BB]; + SetVector &LiveOut = Data.LiveOut[BB]; const auto OldLiveOutSize = LiveOut.size(); for (BasicBlock *Succ : successors(BB)) { assert(Data.LiveIn.count(Succ)); @@ -3324,7 +3324,6 @@ static void computeLiveInValues(DominatorTree &DT, Function &F, // hasn't changed. continue; } - Data.LiveOut[BB] = LiveOut; // Apply the effects of this basic block SetVector LiveTmp = LiveOut;