public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "nasika.srikanth1 at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug other/61979] Why float variable loading twice into the FPU Stack during condition checking ?
Date: Sat, 02 Aug 2014 11:12:00 -0000	[thread overview]
Message-ID: <bug-61979-4-PH8iqVqrzl@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-61979-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #6 from Srikanth <nasika.srikanth1 at gmail dot com> ---
int main()
{
float m=12
m?printf("true"):printf("false");
m=0;
m?printf("true"):printf("false");
}


and above is the  assemble code generated from the source file .. when i seeing
the assemble code i just recognize that float variable was loading twice during
the conditional checking that's what my doubt ? please tell me why after
comparison of parity flag for NAN or not,directly we can check for zero flag
for zero or not.But the generated assemble code in #comment 3 ,after comparison
of parity flag it again loading the same variable into the FPU stack and again
comparing with zero and checking for zero flag and goes to true or false
statment why?


  parent reply	other threads:[~2014-08-02 11:12 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-31 16:52 [Bug other/61979] New: Why float variable loading twice into the FTU " nasika.srikanth1 at gmail dot com
2014-08-01  8:26 ` [Bug other/61979] " rguenth at gcc dot gnu.org
2014-08-02  6:19 ` nasika.srikanth1 at gmail dot com
2014-08-02  6:37 ` [Bug other/61979] Why float variable loading twice into the FPU " nasika.srikanth1 at gmail dot com
2014-08-02  6:42 ` pinskia at gcc dot gnu.org
2014-08-02 11:12 ` nasika.srikanth1 at gmail dot com [this message]
2014-08-02 11:33 ` glisse at gcc dot gnu.org
2014-08-02 16:29 ` nasika.srikanth1 at gmail dot com

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=bug-61979-4-PH8iqVqrzl@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@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).