[PATCH] D109950: [Clang] Enable IC/IF mode for __ibm128

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 29 13:33:48 PDT 2021


rjmccall added a comment.

In D109950#3097544 <https://reviews.llvm.org/D109950#3097544>, @eandrews wrote:

> In D109950#3097161 <https://reviews.llvm.org/D109950#3097161>, @rjmccall wrote:
>
>> Oh, yes, I think this should be preserving the old logic there and just adding a new clause for explicit requests for ibm128, right?
>
> I think the old logic should be preserved yes. However, I'm not sure if this patch exposes an existing bug. LongDoubleFormat here is llvm::semX87DoubleExtended.
>
> In APFloat.cpp, it is defined as -
>
>   static const fltSemantics semX87DoubleExtended = {16383, -16382, 64, 80};
>
> i.e. 80 bit size. Is this the right format for complex type specified using mode 'TC'? I am not very familiar with floating point semantics, so I thought I would ask.

The existing logic is that `TF` and `TC` should based on `long double` if the target has a 128-bit `long double` format, and otherwise they should be based on `float128_t` if that exists, and otherwise they're invalid.  We should definitely not be using `long double` when it's not a 128-bit format, like if it's the 80-bit x87 format.

I do wonder whether that's the right priority between `float128_t` and a double-double `long double`.  I think that particular configuration is only true for certain PPC targets; does anyone know what GCC does?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D109950/new/

https://reviews.llvm.org/D109950



More information about the cfe-commits mailing list