]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[testsuite] xfail pr79004 on longdouble64; drop long_double_64bit
authorAlexandre Oliva <oliva@adacore.com>
Thu, 23 May 2024 06:20:19 +0000 (03:20 -0300)
committerAlexandre Oliva <oliva@gnu.org>
Thu, 23 May 2024 06:20:19 +0000 (03:20 -0300)
Some of the asm opcodes expected by pr79004 depend on
-mlong-double-128 to be output.  E.g., without this flag, the
conditions of patterns @extenddf<mode>2 and extendsf<mode>2 do not
hold, and so GCC resorts to libcalls instead of even trying
rs6000_expand_float128_convert.

Perhaps the conditions are too strict, and they could enable the use
of conversion insns involving __ieee128/_Float128 even with 64-bit
long doubles.

For now, xfail the opcodes that are not available on longdouble64.

While at that, drop long_double_64bit, since it's broken and sort of
redundant.

for  gcc/testsuite/ChangeLog

PR target/105359
* gcc.target/powerpc/pr79004.c: Xfail opcodes not available on
longdouble64.
* lib/target-supports.exp
(check_effective_target_long_double_64bit): Drop.
(add_options_for_long_double_64bit): Likewise.

gcc/testsuite/gcc.target/powerpc/pr79004.c
gcc/testsuite/lib/target-supports.exp

index caf1f6c1eefe4dd240d1376c9212523566bed431..2cb8bf4bc14bcfb1129b4f78c54a99136720aba7 100644 (file)
@@ -100,10 +100,12 @@ void to_uns_short_store_n (TYPE a, unsigned short *p, long n) { p[n] = (unsigned
 void to_uns_int_store_n (TYPE a, unsigned int *p, long n) { p[n] = (unsigned int)a; }
 void to_uns_long_store_n (TYPE a, unsigned long *p, long n) { p[n] = (unsigned long)a; }
 
-/* { dg-final { scan-assembler-not {\mbl __}       } } */
-/* { dg-final { scan-assembler     {\mxscvdpqp\M}  } } */
-/* { dg-final { scan-assembler     {\mxscvqpdp\M}  } } */
-/* { dg-final { scan-assembler     {\mxscvqpdpo\M} } } */
+/* On targets with 64-bit long double, some opcodes to deal with __float128 are
+   disabled, see PR target/105359.  */
+/* { dg-final { scan-assembler-not {\mbl __}       { xfail longdouble64 } } } */
+/* { dg-final { scan-assembler     {\mxscvdpqp\M}  { xfail longdouble64 } } } */
+/* { dg-final { scan-assembler     {\mxscvqpdp\M}  { xfail longdouble64 } } } */
+/* { dg-final { scan-assembler     {\mxscvqpdpo\M} { xfail longdouble64 } } } */
 /* { dg-final { scan-assembler     {\mxscvqpsdz\M} } } */
 /* { dg-final { scan-assembler     {\mxscvqpswz\M} } } */
 /* { dg-final { scan-assembler     {\mxscvsdqp\M}  } } */
@@ -111,7 +113,7 @@ void to_uns_long_store_n (TYPE a, unsigned long *p, long n) { p[n] = (unsigned l
 /* { dg-final { scan-assembler     {\mlxsd\M}      } } */
 /* { dg-final { scan-assembler     {\mlxsiwax\M}   } } */
 /* { dg-final { scan-assembler     {\mlxsiwzx\M}   } } */
-/* { dg-final { scan-assembler     {\mlxssp\M}     } } */
+/* { dg-final { scan-assembler     {\mlxssp\M}     { xfail longdouble64 } } } */
 /* { dg-final { scan-assembler     {\mstxsd\M}     } } */
 /* { dg-final { scan-assembler     {\mstxsiwx\M}   } } */
-/* { dg-final { scan-assembler     {\mstxssp\M}    } } */
+/* { dg-final { scan-assembler     {\mstxssp\M}    { xfail longdouble64 } } } */
index 3f0f8532dc3656d5dc5b7085436e19c19f4d2760..f0f6da52275f353009d326ec65876d7d6688e064 100644 (file)
@@ -2924,49 +2924,6 @@ proc add_options_for_long_double_ieee128 { flags } {
     return "$flags"
 }
 
-# Check if GCC and GLIBC supports explicitly specifying that the long double
-# format uses the IEEE 64-bit.  Under little endian PowerPC Linux, you need
-# GLIBC 2.32 or later to be able to use a different long double format for
-# running a program than the system default.
-
-proc check_effective_target_long_double_64bit { } {
-    return [check_runtime_nocache long_double_64bit {
-       #include <string.h>
-       #include <stdio.h>
-       /* use volatile to prevent optimization.  */
-       volatile double a = 3.0;
-       volatile long double one = 1.0L;
-       volatile long double two = 2.0L;
-       volatile long double b;
-       char buffer[20];
-       int main()
-       {
-         double a2;
-         long double b2;
-         if (sizeof (long double) != 8)
-           return 1;
-         b = one + two;
-         /* eliminate removing volatile cast warning.  */
-         a2 = a;
-         b2 = b;
-         if (memcmp (&a2, &b2, 16) != 0)
-           return 1;
-         sprintf (buffer, "%lg", b);
-         return strcmp (buffer, "3") != 0;
-       }
-    }  [add_options_for_ppc_long_double_override_64bit ""]]
-}
-
-# Return the appropriate options to specify that long double uses the IEEE
-# 64-bit format on PowerPC.
-
-proc add_options_for_long_double_64bit { flags } {
-    if { [istarget powerpc*-*-*] } {
-       return "$flags -mlong-double-64"
-    }
-    return "$flags"
-}
-
 # Return 1 if the target supports executing VSX instructions, 0
 # otherwise.  Cache the result.