diff options
author | Dan Gohman <gohman@apple.com> | 2010-03-02 02:14:38 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-03-02 02:14:38 +0000 |
commit | 5b870aff81da0c07413f0241087bb3722954b83d (patch) | |
tree | c0783ff5e30f3f856aadedb6e5f5f2a04c1be283 /lib/CodeGen/SelectionDAG/TargetLowering.cpp | |
parent | 069d6f3396856655d5d4ba155ee16eb0209d38b0 (diff) |
Fix several places to handle vector operands properly.
Based on a patch by Micah Villmow for PR6438.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97538 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/TargetLowering.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/TargetLowering.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/SelectionDAG/TargetLowering.cpp b/lib/CodeGen/SelectionDAG/TargetLowering.cpp index eca9f3f1c8..0e54ca44aa 100644 --- a/lib/CodeGen/SelectionDAG/TargetLowering.cpp +++ b/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); |