summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-03-11 21:29:43 +0000
committerDan Gohman <gohman@apple.com>2008-03-11 21:29:43 +0000
commit44b4c07cd1e39acc1967e41b4b2620f809be5ba4 (patch)
treefb0b10cbcef31df1d964d292b1578941775a643e /llvm/lib
parent1351025a91b5f81fcf7d688bc8021c08399087b7 (diff)
downloadbcm5719-llvm-44b4c07cd1e39acc1967e41b4b2620f809be5ba4.tar.gz
bcm5719-llvm-44b4c07cd1e39acc1967e41b4b2620f809be5ba4.zip
Use the correct value for InSignBit.
llvm-svn: 48245
Diffstat (limited to 'llvm/lib')
-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 90887a0772a..805ef478c3c 100644
--- a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
@@ -892,7 +892,7 @@ bool TargetLowering::SimplifyDemandedBits(SDOperand Op,
MVT::ValueType InVT = Op.getOperand(0).getValueType();
unsigned InBits = MVT::getSizeInBits(InVT);
APInt InMask = APInt::getLowBitsSet(BitWidth, InBits);
- APInt InSignBit = APInt::getLowBitsSet(BitWidth, InBits);
+ APInt InSignBit = APInt::getBitsSet(BitWidth, InBits - 1, InBits);
APInt NewBits = ~InMask & NewMask;
// If none of the top bits are demanded, convert this into an any_extend.
OpenPOWER on IntegriCloud