mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 11:42:57 +01:00
Now that convertFromUnsignedParts has a sane, constant interface,
convertFromZeroExtendedInteger can be simplified as it doesn't need to make a copy of the source bignum. llvm-svn: 42734
This commit is contained in:
parent
db4dbedfea
commit
ac998332c3
@ -1594,9 +1594,7 @@ APFloat::convertFromZeroExtendedInteger(const integerPart *parts,
|
||||
roundingMode rounding_mode)
|
||||
{
|
||||
unsigned int partCount = partCountForBits(width);
|
||||
opStatus status;
|
||||
APInt api = APInt(width, partCount, parts);
|
||||
integerPart *copy = new integerPart[partCount];
|
||||
|
||||
sign = false;
|
||||
if(isSigned && APInt::tcExtractBit(parts, width - 1)) {
|
||||
@ -1604,9 +1602,7 @@ APFloat::convertFromZeroExtendedInteger(const integerPart *parts,
|
||||
api = -api;
|
||||
}
|
||||
|
||||
APInt::tcAssign(copy, api.getRawData(), partCount);
|
||||
status = convertFromUnsignedParts(copy, partCount, rounding_mode);
|
||||
return status;
|
||||
return convertFromUnsignedParts(api.getRawData(), partCount, rounding_mode);
|
||||
}
|
||||
|
||||
APFloat::opStatus
|
||||
|
Loading…
Reference in New Issue
Block a user