public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: Roger Sayle <roger@www.eyesopen.com>
To: nobody@gcc.gnu.org
Cc: gcc-prs@gcc.gnu.org,
Subject: Re: target/10348: sparc64-sun-solaris2.7 testsuite failure in execute/20020720-1.c with -fpic/-fPIC
Date: Thu, 10 Apr 2003 14:16:00 -0000	[thread overview]
Message-ID: <20030410141601.16109.qmail@sources.redhat.com> (raw)

The following reply was made to PR target/10348; it has been noted by GNATS.

From: Roger Sayle <roger@www.eyesopen.com>
To: Kaveh Ghazi <ghazi@caip.rutgers.edu>,
   Eric Botcazou <ebotcazou@libertysurf.fr>
Cc: gcc-gnats@gcc.gnu.org, <gcc-bugs@gcc.gnu.org>
Subject: Re: target/10348: sparc64-sun-solaris2.7 testsuite failure in
 execute/20020720-1.c with -fpic/-fPIC
Date: Thu, 10 Apr 2003 07:11:31 -0600 (MDT)

 On Thu, 10 Apr 2003, Eric Botcazou wrote:
 > > I'm getting testsuite failures in execute/20020720-1.c on
 > > sparc64-sun-solaris2.7 at -O1 and above when adding -fpic or -fPIC to the
 > > testsuite pass.  The logfile shows that the function `link_error' is still
 > > called, i.e. the call is not being optimized away like it should.
 >
 > Note that this happens on sparc-sun-solaris2.9 too with -mcpu=v7|v8|v9.
 
 Unfortunately, there is no simple fix to the problem.  The 64-bit sparc
 PIC targets require three instructions to compare a floating point value
 against zero: the first to store the constant pool address+offset in a
 register, the second to load this into a FP register and a third to do
 the comparison.  Hence comparing "fabs" against zero requires four
 instructions.  This is one too many for combine, where this optimization
 normally gets applied, which only considers up to three instructions.
 
 I would recommend marking 20020720-1.x as XFAIL on sparc with a 64bit
 CPU type and -fpic or -fPIC, and lowering the GNATS PR priority to low.
 However, I believe the issue should be resolved shortly as soon as my
 "REG_EQUAL notes on cond_jumps" patch gets approved.  Its been a month!
 http://gcc.gnu.org/ml/gcc-patches/2003-03/msg00824.html
 
 This patch should allow GCSE to optimize "fabs(x) < 0.0" itself,
 independently of the floating point load and conditional branch
 instructions provided by the target's machine description.  I suspect
 this will fix 20020720-1.c on all GCC targets that don't require FP
 comparisons to be performed by libcalls (but that currently require
 four or more instructions).  I'm also investigating a libcall fix.
 
 Roger
 --
 


             reply	other threads:[~2003-04-10 14:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-10 14:16 Roger Sayle [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-04-10  8:36 Eric Botcazou
2003-04-08 14:56 ghazi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030410141601.16109.qmail@sources.redhat.com \
    --to=roger@www.eyesopen.com \
    --cc=gcc-prs@gcc.gnu.org \
    --cc=nobody@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).