mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 09:13:34 +00:00
Revert previous change to IR.
llvm-svn: 41769
This commit is contained in:
parent
8c57e70f93
commit
81660f7d7b
@ -626,7 +626,7 @@ bool BitcodeReader::ParseConstants() {
|
||||
if (Record.empty())
|
||||
return Error("Invalid FLOAT record");
|
||||
if (CurTy == Type::FloatTy)
|
||||
V = ConstantFP::get(CurTy, APFloat((float)BitsToDouble(Record[0])));
|
||||
V = ConstantFP::get(CurTy, APFloat(BitsToFloat(Record[0])));
|
||||
else if (CurTy == Type::DoubleTy)
|
||||
V = ConstantFP::get(CurTy, APFloat(BitsToDouble(Record[0])));
|
||||
// FIXME: Make long double constants work. BitsToDouble does not make it.
|
||||
|
@ -526,10 +526,9 @@ static void WriteConstants(unsigned FirstVal, unsigned LastVal,
|
||||
} else if (const ConstantFP *CFP = dyn_cast<ConstantFP>(C)) {
|
||||
Code = bitc::CST_CODE_FLOAT;
|
||||
const Type *Ty = CFP->getType();
|
||||
if (Ty == Type::FloatTy) {
|
||||
Record.push_back(DoubleToBits((double)CFP->getValueAPF().
|
||||
convertToFloat()));
|
||||
} else if (Ty == Type::DoubleTy) {
|
||||
if (Ty == Type::FloatTy)
|
||||
Record.push_back(FloatToBits(CFP->getValueAPF().convertToFloat()));
|
||||
else if (Ty == Type::DoubleTy) {
|
||||
Record.push_back(DoubleToBits(CFP->getValueAPF().convertToDouble()));
|
||||
// FIXME: make long double constants work.
|
||||
} else if (Ty == Type::X86_FP80Ty ||
|
||||
|
Loading…
x
Reference in New Issue
Block a user