forked from OSchip/llvm-project
[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:
parent
c6c65164af
commit
2c512eaf37
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue