diff --git a/llvm/tools/llvm-stress/llvm-stress.cpp b/llvm/tools/llvm-stress/llvm-stress.cpp --- a/llvm/tools/llvm-stress/llvm-stress.cpp +++ b/llvm/tools/llvm-stress/llvm-stress.cpp @@ -300,7 +300,7 @@ if (len != (unsigned)-1) width = len; - return VectorType::get(Ty, width); + return FixedVectorType::get(Ty, width); } /// Pick a random scalar type. @@ -628,9 +628,10 @@ // If the value type is a vector, and we allow vector select, then in 50% // of the cases generate a vector select. - if (Val0->getType()->isVectorTy() && (getRandom() % 1)) { - unsigned NumElem = cast(Val0->getType())->getNumElements(); - CondTy = VectorType::get(CondTy, NumElem); + if (isa(Val0->getType()) && (getRandom() % 1)) { + unsigned NumElem = + cast(Val0->getType())->getNumElements(); + CondTy = FixedVectorType::get(CondTy, NumElem); } Value *Cond = getRandomValue(CondTy);