mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-19 18:24:00 +00:00
Change APFloat::convertFromInteger to take the incoming
bit width instead of number of words allocated, which makes it actually work for int->APF conversions. Adjust callers. Add const to one of the APInt constructors to prevent surprising match when called with const argument. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42210 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -1595,8 +1595,10 @@ SDOperand SelectionDAG::getNode(unsigned Opcode, MVT::ValueType VT,
|
||||
case ISD::SINT_TO_FP: {
|
||||
const uint64_t zero[] = {0, 0};
|
||||
APFloat apf = APFloat(APInt(MVT::getSizeInBits(VT), 2, zero));
|
||||
(void)apf.convertFromInteger(&Val, 1, Opcode==ISD::SINT_TO_FP,
|
||||
APFloat::rmTowardZero);
|
||||
(void)apf.convertFromInteger(&Val,
|
||||
MVT::getSizeInBits(Operand.getValueType()),
|
||||
Opcode==ISD::SINT_TO_FP,
|
||||
APFloat::rmTowardZero);
|
||||
return getConstantFP(apf, VT);
|
||||
}
|
||||
case ISD::BIT_CONVERT:
|
||||
|
Reference in New Issue
Block a user