diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2011-01-17 18:00:28 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2011-01-17 18:00:28 +0000 |
commit | c9b6a3eb90c5e0f6460632a443591068522537e2 (patch) | |
tree | 20657c640acb81dbfe4c1f8e5d599ebc0224147a /lib/CodeGen/SelectionDAG/TargetLowering.cpp | |
parent | 2522ae5922345c1d4e77883038bb668c092d219a (diff) | |
download | llvm-c9b6a3eb90c5e0f6460632a443591068522537e2.tar.gz llvm-c9b6a3eb90c5e0f6460632a443591068522537e2.tar.bz2 llvm-c9b6a3eb90c5e0f6460632a443591068522537e2.tar.xz |
Fix an off-by-one error in ctpop combining.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123664 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 1621d61ba9..514f175ee0 100644 --- a/lib/CodeGen/SelectionDAG/TargetLowering.cpp +++ b/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); |