llvm.org GIT mirror llvm / 701de8f
llvm-stress: don't make vectors of x86_mmx type LangRef.html says: "There are no arrays, vectors or constants of this type." This was hitting assertions when passing the -generate-x86-mmx option. PR12452. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154445 91177308-0d34-0410-b5e6-96231b3b80d8 Dylan Noblesmith 8 years ago
1 changed file(s) with 7 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
201201
202202 /// Pick a random vector type.
203203 Type *pickVectorType(unsigned len = (unsigned)-1) {
204 Type *Ty = pickScalarType();
205204 // Pick a random vector width in the range 2**0 to 2**4.
206205 // by adding two randoms we are generating a normal-like distribution
207206 // around 2**3.
208207 unsigned width = 1<<((Ran->Rand() % 3) + (Ran->Rand() % 3));
208 Type *Ty;
209
210 // Vectors of x86mmx are illegal; keep trying till we get something else.
211 do {
212 Ty = pickScalarType();
213 } while (Ty->isX86_MMXTy());
214
209215 if (len != (unsigned)-1)
210216 width = len;
211217 return VectorType::get(Ty, width);