Fix a FIXME: use an apint in CTTZ legalization.

llvm-svn: 53406
This commit is contained in:
Duncan Sands 2008-07-10 15:30:54 +00:00
parent e78352a125
commit 303524be58
1 changed files with 3 additions and 3 deletions

View File

@ -363,9 +363,9 @@ SDOperand DAGTypeLegalizer::PromoteIntRes_CTTZ(SDNode *N) {
// The count is the same in the promoted type except if the original
// value was zero. This can be handled by setting the bit just off
// the top of the original type.
Op = DAG.getNode(ISD::OR, NVT, Op,
// FIXME: Do this using an APINT constant.
DAG.getConstant(1UL << OVT.getSizeInBits(), NVT));
APInt TopBit(NVT.getSizeInBits(), 0);
TopBit.set(OVT.getSizeInBits());
Op = DAG.getNode(ISD::OR, NVT, Op, DAG.getConstant(TopBit, NVT));
return DAG.getNode(ISD::CTTZ, NVT, Op);
}