mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-28 03:25:23 +00:00
Fix a FIXME: use an apint in CTTZ legalization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53406 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -363,9 +363,9 @@ SDOperand DAGTypeLegalizer::PromoteIntRes_CTTZ(SDNode *N) {
|
|||||||
// The count is the same in the promoted type except if the original
|
// 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
|
// value was zero. This can be handled by setting the bit just off
|
||||||
// the top of the original type.
|
// the top of the original type.
|
||||||
Op = DAG.getNode(ISD::OR, NVT, Op,
|
APInt TopBit(NVT.getSizeInBits(), 0);
|
||||||
// FIXME: Do this using an APINT constant.
|
TopBit.set(OVT.getSizeInBits());
|
||||||
DAG.getConstant(1UL << OVT.getSizeInBits(), NVT));
|
Op = DAG.getNode(ISD::OR, NVT, Op, DAG.getConstant(TopBit, NVT));
|
||||||
return DAG.getNode(ISD::CTTZ, NVT, Op);
|
return DAG.getNode(ISD::CTTZ, NVT, Op);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user