summaryrefslogtreecommitdiff
path: root/tools/llvm-stress
diff options
context:
space:
mode:
authorNadav Rotem <nadav.rotem@intel.com>2012-02-26 12:00:22 +0000
committerNadav Rotem <nadav.rotem@intel.com>2012-02-26 12:00:22 +0000
commit2e851a9abf781bc5feef9be98f794dcb1caab548 (patch)
tree90d63a9c1d0432caa3a7050a8c98f631671dcd9e /tools/llvm-stress
parent08c833930726d5c33baac060a7aca7c1caf636b3 (diff)
downloadllvm-2e851a9abf781bc5feef9be98f794dcb1caab548.tar.gz
llvm-2e851a9abf781bc5feef9be98f794dcb1caab548.tar.bz2
llvm-2e851a9abf781bc5feef9be98f794dcb1caab548.tar.xz
Fix a bug in the code that checks if a store value is a vector of i1s
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151487 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-stress')
-rw-r--r--tools/llvm-stress/llvm-stress.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/llvm-stress/llvm-stress.cpp b/tools/llvm-stress/llvm-stress.cpp
index db35688aac..e671c0c194 100644
--- a/tools/llvm-stress/llvm-stress.cpp
+++ b/tools/llvm-stress/llvm-stress.cpp
@@ -224,10 +224,11 @@ struct StoreModifier: public Modifier {
Value *Ptr = getRandomPointerValue();
Type *Tp = Ptr->getType();
Value *Val = getRandomValue(Tp->getContainedType(0));
+ Type *ValTy = Val->getType();
// Do not store vectors of i1s because they are unsupported
//by the codegen.
- if (Tp->isVectorTy() && Tp->getScalarSizeInBits() == 1)
+ if (ValTy->isVectorTy() && (ValTy->getScalarSizeInBits() == 1))
return;
new StoreInst(Val, Ptr, BB->getTerminator());