Start using CHECK-LABEL in some tests.
[oota-llvm.git] / lib / Analysis / ConstantFolding.cpp
index b5286e8f29da12b9594420c1942f6b128de311c6..bc0dffc473626481a1adc664b2be86285ce62ced 100644 (file)
@@ -551,7 +551,7 @@ static Constant *SymbolicallyEvaluateBinop(unsigned Opc, Constant *Op0,
 
 
   if (Opc == Instruction::And && DL) {
-    unsigned BitWidth = DL->getTypeSizeInBits(Op0->getType());
+    unsigned BitWidth = DL->getTypeSizeInBits(Op0->getType()->getScalarType());
     APInt KnownZero0(BitWidth, 0), KnownOne0(BitWidth, 0);
     APInt KnownZero1(BitWidth, 0), KnownOne1(BitWidth, 0);
     ComputeMaskedBits(Op0, KnownZero0, KnownOne0, DL);