mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-25 05:22:04 +00:00
Fix a few instances found in SelectionDAG where we were not handling F16 at parity with F32 and F64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223760 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -2683,6 +2683,8 @@ SDValue SelectionDAG::getNode(unsigned Opcode, SDLoc DL,
|
||||
return getConstantFP(apf, VT);
|
||||
}
|
||||
case ISD::BITCAST:
|
||||
if (VT == MVT::f16 && C->getValueType(0) == MVT::i16)
|
||||
return getConstantFP(APFloat(APFloat::IEEEhalf, Val), VT);
|
||||
if (VT == MVT::f32 && C->getValueType(0) == MVT::i32)
|
||||
return getConstantFP(APFloat(APFloat::IEEEsingle, Val), VT);
|
||||
else if (VT == MVT::f64 && C->getValueType(0) == MVT::i64)
|
||||
@@ -2756,7 +2758,9 @@ SDValue SelectionDAG::getNode(unsigned Opcode, SDLoc DL,
|
||||
return getConstant(api, VT);
|
||||
}
|
||||
case ISD::BITCAST:
|
||||
if (VT == MVT::i32 && C->getValueType(0) == MVT::f32)
|
||||
if (VT == MVT::i16 && C->getValueType(0) == MVT::f16)
|
||||
return getConstant((uint16_t)V.bitcastToAPInt().getZExtValue(), VT);
|
||||
else if (VT == MVT::i32 && C->getValueType(0) == MVT::f32)
|
||||
return getConstant((uint32_t)V.bitcastToAPInt().getZExtValue(), VT);
|
||||
else if (VT == MVT::i64 && C->getValueType(0) == MVT::f64)
|
||||
return getConstant(V.bitcastToAPInt().getZExtValue(), VT);
|
||||
|
||||
Reference in New Issue
Block a user