diff --git a/tools/llvm-stress/llvm-stress.cpp b/tools/llvm-stress/llvm-stress.cpp index 67bc0d2299b..22f530dde16 100644 --- a/tools/llvm-stress/llvm-stress.cpp +++ b/tools/llvm-stress/llvm-stress.cpp @@ -300,7 +300,7 @@ protected: 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 @@ struct SelectModifier: public Modifier { // 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);