https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105359

            Bug ID: 105359
           Summary: _Float128 expanders and builtins disabled on ppc
                    targets with 64-bit long double
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: aoliva at gcc dot gnu.org
  Target Milestone: ---
            Target: rs6000

As described elsewhere, some tests fail on targets with 64-bit long double,
because of patterns that (IMHO incorrectly) use TARGET_LONG_DOUBLE_128 in their
conditions, and because of type compatibility tests that only accept _Float128
types under the same condition.
https://gcc.gnu.org/pipermail/gcc-patches/2022-April/593257.html
https://gcc.gnu.org/pipermail/gcc-patches/2022-April/593515.html

There doesn't seem to be a reason for the patterns to conditioned on long
double being a 128-bit type: that's too strict.  A laxer condition, covering
the requirements for _Float128 to be *supported*, ought to be enough. 
Furthermore, there doesn't seem to be any reason for -mlong-double-64 to
disable those patterns even on target variants that use 128-bit long double.

It's too late to fix this for GCC 12, but hopefully some rs6000/powerpc
maintainer will agree that there's no reason to tie support for insn patterns
and builtins for _Float128 with long double's being the same type as _Float128.

It looks like all of the troublesome patterns have TARGET_HARD_FLOAT &&
TARGET_LONG_DOUBLE_128.  I hope this problem could be fixed by replacing the
latter with TARGET_FLOAT128_TYPE, but I'll defer to more knowledgeable port
maintainers.

Reply via email to