diff --git a/llvm/lib/Transforms/Scalar/Scalarizer.cpp b/llvm/lib/Transforms/Scalar/Scalarizer.cpp --- a/llvm/lib/Transforms/Scalar/Scalarizer.cpp +++ b/llvm/lib/Transforms/Scalar/Scalarizer.cpp @@ -290,10 +290,8 @@ Size = cast(Ty)->getNumElements(); if (!CachePtr) Tmp.resize(Size, nullptr); - else if (CachePtr->empty()) - CachePtr->resize(Size, nullptr); else - assert(Size == CachePtr->size() && "Inconsistent vector sizes"); + CachePtr->resize(Size, nullptr); } // Return component I, creating a new Value for it if necessary.