[SVE] Eliminate calls to default-false VectorType::get() from llvm-stress

Reviewers: efriedma, kmclaughlin, sdesmalen, MaskRay, JDevlieghere

Reviewed By: sdesmalen

Subscribers: tschuett, rkruppe, psnobl, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D81201
This commit is contained in:
Christopher Tetreault 2020-06-08 11:07:25 -07:00
parent c6c65164af
commit 2c512eaf37
1 changed files with 5 additions and 4 deletions

View File

@ -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<VectorType>(Val0->getType())->getNumElements();
CondTy = VectorType::get(CondTy, NumElem);
if (isa<FixedVectorType>(Val0->getType()) && (getRandom() % 1)) {
unsigned NumElem =
cast<FixedVectorType>(Val0->getType())->getNumElements();
CondTy = FixedVectorType::get(CondTy, NumElem);
}
Value *Cond = getRandomValue(CondTy);