diff --git a/llvm/lib/Transforms/AggressiveInstCombine/TruncInstCombine.cpp b/llvm/lib/Transforms/AggressiveInstCombine/TruncInstCombine.cpp --- a/llvm/lib/Transforms/AggressiveInstCombine/TruncInstCombine.cpp +++ b/llvm/lib/Transforms/AggressiveInstCombine/TruncInstCombine.cpp @@ -281,8 +281,10 @@ /// version of \p Ty, otherwise return \p Ty. static Type *getReducedType(Value *V, Type *Ty) { assert(Ty && !Ty->isVectorTy() && "Expect Scalar Type"); - if (auto *VTy = dyn_cast(V->getType())) - return VectorType::get(Ty, VTy->getNumElements()); + if (auto *VTy = dyn_cast(V->getType())) { + // FIXME: should this handle scalable vectors? + return FixedVectorType::get(Ty, VTy->getNumElements()); + } return Ty; }