mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 04:38:24 +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:
@ -1160,6 +1160,9 @@ static Value *LookThroughFPExtensions(Value *V) {
|
||||
if (ConstantFP *CFP = dyn_cast<ConstantFP>(V)) {
|
||||
if (CFP->getType() == Type::getPPC_FP128Ty(V->getContext()))
|
||||
return V; // No constant folding of this.
|
||||
// See if the value can be truncated to half and then reextended.
|
||||
if (Value *V = FitsInFPType(CFP, APFloat::IEEEhalf))
|
||||
return V;
|
||||
// See if the value can be truncated to float and then reextended.
|
||||
if (Value *V = FitsInFPType(CFP, APFloat::IEEEsingle))
|
||||
return V;
|
||||
|
Reference in New Issue
Block a user