[cfe-commits] [PATCH][Review request] f128 literal

Akira Hatanaka ahatanak at gmail.com
Tue Jan 10 14:45:26 PST 2012


Committed the patch in r147887.

Thank you.

On Mon, Jan 9, 2012 at 2:32 PM, Eli Friedman <eli.friedman at gmail.com> wrote:
> On Mon, Jan 9, 2012 at 1:13 PM, Akira Hatanaka <ahatanak at gmail.com> wrote:
>> The attached patch makes FloatingLiteral::getValue() return 128-bit
>> floating point values in the correct format.
>> The existing code always returns PPCDoubleDouble floating points
>> because parameter isIEEE of constructor APFloat::APFloat(const APInt&
>> api, bool isIEEE) is not being set (default value is false).
>>
>> Without this patch, clang terminates with the following message when
>> the attached test is compiled:
>> clang: llvm/lib/VMCore/Instructions.cpp:1086: void
>> llvm::StoreInst::AssertOK(): Assertion `getOperand(0)->getType() ==
>> cast<PointerType>(getOperand(1)->getType())->getElementType() && "Ptr
>> must be a pointer to Val type!"' failed.
>
> You can save some space in FloatingLiteral by caching the IsIEEE bit
> rather than the ASTContext itself.  Otherwise, looks fine.
>
> -Eli




More information about the cfe-commits mailing list