public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* PR optimization/4490 (-m128bit-long-double on ia32)
@ 2002-02-21  8:14 Jakub Jelinek
  2002-02-21  8:28 ` Jan Hubicka
  0 siblings, 1 reply; 2+ messages in thread
From: Jakub Jelinek @ 2002-02-21  8:14 UTC (permalink / raw)
  To: gcc

Hi!

optimization/4490:

/* { dg-do compile } */
/* { dg-options "-O2" } */
/* { dg-options "-m128bit-long-double -O2" { target i?86-*-* } } */

double f (unsigned long long x)
{
  double d = x;
  return d;
}

ICEs because optabs for the d = x assignment (which cannot be done in
DFmode) looks up a wider mode. Wider mode is XFmode and IA-32, if
!TARGET_64BIT, has XFmode patterns, so optabs attempts to use them
(which is what -m128bit-long-double should prevent IMHO).
But as long double is TFmode in this case, type_for_mode cannot find any
type for mode XFmode and soon after it segfaults in IA-32 CONSTANT_ALIGNMENT
implementation.

Shouldn't all IA-32 XFmode patterns be banned if TARGET_128BIT_LONG_DOUBLE
(ie. replace all !TARGET_64BIT in XFmode patterns with
!TARGET_128BIT_LONG_DOUBLE)?

	Jakub

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: PR optimization/4490 (-m128bit-long-double on ia32)
  2002-02-21  8:14 PR optimization/4490 (-m128bit-long-double on ia32) Jakub Jelinek
@ 2002-02-21  8:28 ` Jan Hubicka
  0 siblings, 0 replies; 2+ messages in thread
From: Jan Hubicka @ 2002-02-21  8:28 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: gcc

> Hi!
> 
> optimization/4490:
> 
> /* { dg-do compile } */
> /* { dg-options "-O2" } */
> /* { dg-options "-m128bit-long-double -O2" { target i?86-*-* } } */
> 
> double f (unsigned long long x)
> {
>   double d = x;
>   return d;
> }
> 
> ICEs because optabs for the d = x assignment (which cannot be done in
> DFmode) looks up a wider mode. Wider mode is XFmode and IA-32, if
> !TARGET_64BIT, has XFmode patterns, so optabs attempts to use them
> (which is what -m128bit-long-double should prevent IMHO).
> But as long double is TFmode in this case, type_for_mode cannot find any
> type for mode XFmode and soon after it segfaults in IA-32 CONSTANT_ALIGNMENT
> implementation.
> 
> Shouldn't all IA-32 XFmode patterns be banned if TARGET_128BIT_LONG_DOUBLE
> (ie. replace all !TARGET_64BIT in XFmode patterns with
> !TARGET_128BIT_LONG_DOUBLE)?

Probably yes, in the current shape.  Originally I've sent some patches letting
XFmode and TFmode floats to coexist, as my goal has been to let people use
__attribyte__ ((TFmode)) type and keep long double as it is when they need ABI
compatibility and fast floats, but they didn't get in.

I can make patch sometime at monday or tuesday, unless you will be faster.

Honza
> 
> 	Jakub

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-02-21 16:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-02-21  8:14 PR optimization/4490 (-m128bit-long-double on ia32) Jakub Jelinek
2002-02-21  8:28 ` Jan Hubicka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).