[llvm-commits] [PATCH] llvm-stress fixes

Hal Finkel hfinkel at anl.gov
Tue Apr 10 09:41:30 PDT 2012


On Tue, 10 Apr 2012 09:05:38 -0700
Chris Lattner <clattner at apple.com> wrote:

> 
> On Apr 10, 2012, at 1:04 AM, Duncan Sands wrote:
> 
> > Hi Hal,
> > 
> >> Regarding conversion, given that ppc128 is actually the sum of two
> >> IEEE (64-bit) doubles, you would need to convert both doubles to
> >> fp128 and then add the two resulting fp128 values.
> > 
> > I'm tempted to say that ppc128 should be removed from LLVM and
> > instead front-ends should just explicitly use the pair of doubles
> > it really is, and generate in the IR the sequence of operations for
> > adding such a pair etc that codegen currently takes care of.
> 
> That makes a lot of sense to me too.  The only issue here is that
> someone needs to do it.  There are PPC users of clang out there
> (Hal?) that may care about this not regressing.

The current situation is not great, support for ppc128 in APFloat is
currently broken, and while fixing it is on my TODO list, I have not
really worked on it yet.

If you edit APFloat.cpp to disable the relevant asserts then you can
compile codes with long doubles in them (which is important for C++
codes that #include <complex>, for example), but any code that actually
uses long doubles will most likely output the wrong answer. Therefore,
so long as some skeleton support exists, then there is no regression in
practice.

I would be happy to move the relevant code into the frontend, but while
I imagine that in some ways this is very similar to how _Complex double
is handled, any assistance would be appreciated.

Thanks again,
Hal

> 
> -Chris



-- 
Hal Finkel
Postdoctoral Appointee
Leadership Computing Facility
Argonne National Laboratory



More information about the llvm-commits mailing list