mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-23 14:25:07 +00:00
The powers that be have decided that LLVM IR should now support 16-bit
"half precision" floating-point with a first-class type. This patch adds basic IR support (but not codegen support). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146786 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -571,7 +571,8 @@ Constant *llvm::ConstantFoldCastInstruction(unsigned opc, Constant *V,
|
||||
if (ConstantFP *FPC = dyn_cast<ConstantFP>(V)) {
|
||||
bool ignored;
|
||||
APFloat Val = FPC->getValueAPF();
|
||||
Val.convert(DestTy->isFloatTy() ? APFloat::IEEEsingle :
|
||||
Val.convert(DestTy->isHalfTy() ? APFloat::IEEEhalf :
|
||||
DestTy->isFloatTy() ? APFloat::IEEEsingle :
|
||||
DestTy->isDoubleTy() ? APFloat::IEEEdouble :
|
||||
DestTy->isX86_FP80Ty() ? APFloat::x87DoubleExtended :
|
||||
DestTy->isFP128Ty() ? APFloat::IEEEquad :
|
||||
|
Reference in New Issue
Block a user