[cfe-commits] r63264 - /cfe/trunk/lib/AST/ExprConstant.cpp

Eli Friedman eli.friedman at gmail.com
Thu Jan 29 13:05:38 PST 2009


On Thu, Jan 29, 2009 at 12:17 PM, Neil Booth <neil at daikokuya.co.uk> wrote:
> Daniel Dunbar wrote:-
>
>> Author: ddunbar
>> Date: Wed Jan 28 19:32:56 2009
>> New Revision: 63264
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=63264&view=rev
>> Log:
>> Add folding for complex mul and fix some major bugs in complex float
>> evaluation (alternate part of real/imag init was being set to 3 not 0
>> because the wrong APFloat constructor was being called).
>>  - Test cases coming once some more support is in.
>
> Of course, this code is not ideal, since e.g. it overflows unnecessarily
> in many cases, and rounds incorrectly in 50% (?) of cases.

This is the same way clang/gcc do this in CodeGen.  We want to be
consistent here, not necessarily get the most accurate possible
result.

-Eli



More information about the cfe-commits mailing list