summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-03-02 02:14:38 +0000
committerDan Gohman <gohman@apple.com>2010-03-02 02:14:38 +0000
commit4cec5439522410706badcf73769cbce0195f8033 (patch)
tree9f8176fb1016268372c73e8e9fd9f7a569672034 /llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
parent52f55639732cffc7615f71d4f7521a19c1db43d8 (diff)
downloadbcm5719-llvm-4cec5439522410706badcf73769cbce0195f8033.tar.gz
bcm5719-llvm-4cec5439522410706badcf73769cbce0195f8033.zip
Fix several places to handle vector operands properly.
Based on a patch by Micah Villmow for PR6438. llvm-svn: 97538
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
index eca9f3f1c88..0e54ca44aa5 100644
--- a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
@@ -1608,7 +1608,7 @@ static bool ValueHasExactlyOneBitSet(SDValue Val, const SelectionDAG &DAG) {
// Fall back to ComputeMaskedBits to catch other known cases.
EVT OpVT = Val.getValueType();
- unsigned BitWidth = OpVT.getSizeInBits();
+ unsigned BitWidth = OpVT.getScalarType().getSizeInBits();
APInt Mask = APInt::getAllOnesValue(BitWidth);
APInt KnownZero, KnownOne;
DAG.ComputeMaskedBits(Val, Mask, KnownZero, KnownOne);
OpenPOWER on IntegriCloud