summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2011-01-17 18:00:28 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2011-01-17 18:00:28 +0000
commit45d183ccf01f6f796ff9adc76b4f3871a011335a (patch)
treeac3feef7e90af9fe7cbfea8e3444ba7045550668 /llvm/lib
parent3ec1f198e592833679748aca5c8796cd8db24b23 (diff)
downloadbcm5719-llvm-45d183ccf01f6f796ff9adc76b4f3871a011335a.tar.gz
bcm5719-llvm-45d183ccf01f6f796ff9adc76b4f3871a011335a.zip
Fix an off-by-one error in ctpop combining.
llvm-svn: 123664
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 1621d61ba9b..514f175ee09 100644
--- a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
@@ -1876,7 +1876,7 @@ TargetLowering::SimplifySetCC(EVT VT, SDValue N0, SDValue N1,
CTPOP = N0.getOperand(0);
if (CTPOP.hasOneUse() && CTPOP.getOpcode() == ISD::CTPOP &&
- (N0 == CTPOP || N0.getValueType().getSizeInBits() >=
+ (N0 == CTPOP || N0.getValueType().getSizeInBits() >
Log2_32_Ceil(CTPOP.getValueType().getSizeInBits()))) {
EVT CTVT = CTPOP.getValueType();
SDValue CTOp = CTPOP.getOperand(0);
OpenPOWER on IntegriCloud