diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp index 34caa9acd4da3..1ecb34b55b7fd 100644 --- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp +++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp @@ -4291,7 +4291,6 @@ void InnerLoopVectorizer::fixReduction(PHINode *Phi, VPTransformState &State) { // cheaper for the select to remain in the loop than be sunk out of it, // and so use the select value for the phi instead of the old // LoopExitValue. - RecurrenceDescriptor RdxDesc = Legal->getReductionVars()[Phi]; if (PreferPredicatedReductionSelect || TTI->preferPredicatedReductionSelect( RdxDesc.getOpcode(), Phi->getType(),