[llvm-commits] [llvm] r151487 - /llvm/trunk/tools/llvm-stress/llvm-stress.cpp

Nadav Rotem nadav.rotem at intel.com
Sun Feb 26 04:00:23 PST 2012


Author: nadav
Date: Sun Feb 26 06:00:22 2012
New Revision: 151487

URL: http://llvm.org/viewvc/llvm-project?rev=151487&view=rev
Log:
Fix a bug in the code that checks if a store value is a vector of i1s

Modified:
    llvm/trunk/tools/llvm-stress/llvm-stress.cpp

Modified: llvm/trunk/tools/llvm-stress/llvm-stress.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-stress/llvm-stress.cpp?rev=151487&r1=151486&r2=151487&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-stress/llvm-stress.cpp (original)
+++ llvm/trunk/tools/llvm-stress/llvm-stress.cpp Sun Feb 26 06:00:22 2012
@@ -224,10 +224,11 @@
     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());





More information about the llvm-commits mailing list