mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-16 20:40:16 +00:00
extend fp values with FP_EXTEND not FP_ROUND.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48097 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
db96ae9607
commit
d43d85ccc9
@ -759,9 +759,12 @@ static SDOperand getCopyFromParts(SelectionDAG &DAG,
|
||||
}
|
||||
}
|
||||
|
||||
if (MVT::isFloatingPoint(PartVT) && MVT::isFloatingPoint(ValueVT))
|
||||
return DAG.getNode(ISD::FP_ROUND, ValueVT, Val,
|
||||
DAG.getIntPtrConstant(TruncExact));
|
||||
if (MVT::isFloatingPoint(PartVT) && MVT::isFloatingPoint(ValueVT)) {
|
||||
if (ValueVT < Val.getValueType())
|
||||
return DAG.getNode(ISD::FP_ROUND, ValueVT, Val,
|
||||
DAG.getIntPtrConstant(TruncExact));
|
||||
return DAG.getNode(ISD::FP_EXTEND, ValueVT, Val);
|
||||
}
|
||||
|
||||
if (MVT::getSizeInBits(PartVT) == MVT::getSizeInBits(ValueVT))
|
||||
return DAG.getNode(ISD::BIT_CONVERT, ValueVT, Val);
|
||||
|
Loading…
x
Reference in New Issue
Block a user