diff options
author | Dylan Noblesmith <nobled@dreamwidth.org> | 2012-04-10 22:44:49 +0000 |
---|---|---|
committer | Dylan Noblesmith <nobled@dreamwidth.org> | 2012-04-10 22:44:49 +0000 |
commit | 2a592dcc466dfba0a87c2b96c17c3f57c5dea8d8 (patch) | |
tree | 86c751c9765b5eaff954397549870dddb29abd8e | |
parent | 5ba61ac651035728c88229eb207e4195a16867fb (diff) | |
download | bcm5719-llvm-2a592dcc466dfba0a87c2b96c17c3f57c5dea8d8.tar.gz bcm5719-llvm-2a592dcc466dfba0a87c2b96c17c3f57c5dea8d8.zip |
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.
llvm-svn: 154445
-rw-r--r-- | llvm/tools/llvm-stress/llvm-stress.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/llvm/tools/llvm-stress/llvm-stress.cpp b/llvm/tools/llvm-stress/llvm-stress.cpp index c0950591b1d..7da80bcff92 100644 --- a/llvm/tools/llvm-stress/llvm-stress.cpp +++ b/llvm/tools/llvm-stress/llvm-stress.cpp @@ -202,11 +202,17 @@ protected: /// Pick a random vector type. Type *pickVectorType(unsigned len = (unsigned)-1) { - Type *Ty = pickScalarType(); // Pick a random vector width in the range 2**0 to 2**4. // by adding two randoms we are generating a normal-like distribution // around 2**3. unsigned width = 1<<((Ran->Rand() % 3) + (Ran->Rand() % 3)); + Type *Ty; + + // Vectors of x86mmx are illegal; keep trying till we get something else. + do { + Ty = pickScalarType(); + } while (Ty->isX86_MMXTy()); + if (len != (unsigned)-1) width = len; return VectorType::get(Ty, width); |