Fix another bitwidth calculation to handle vector types; based on a
authorDan Gohman <gohman@apple.com>
Wed, 10 Mar 2010 21:04:53 +0000 (21:04 +0000)
committerDan Gohman <gohman@apple.com>
Wed, 10 Mar 2010 21:04:53 +0000 (21:04 +0000)
patch by Micah Villmow for PR6572.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98188 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/DAGCombiner.cpp

index 3be6b431167a759418f29b8cd3c9639a99800989..82bf47849438d5d8b500468bbcea34b8afe741a2 100644 (file)
@@ -5409,7 +5409,7 @@ SDValue DAGCombiner::visitSTORE(SDNode *N) {
     if (SimplifyDemandedBits(Value,
                              APInt::getLowBitsSet(
                                Value.getValueType().getScalarType().getSizeInBits(),
-                               ST->getMemoryVT().getSizeInBits())))
+                               ST->getMemoryVT().getScalarType().getSizeInBits())))
       return SDValue(N, 0);
   }