From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8347 invoked by alias); 2 Aug 2014 11:12:58 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 8280 invoked by uid 48); 2 Aug 2014 11:12:48 -0000 From: "nasika.srikanth1 at gmail dot com" 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: other X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: minor X-Bugzilla-Who: nasika.srikanth1 at gmail dot com X-Bugzilla-Status: WAITING X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-08/txt/msg00104.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61979 --- Comment #6 from Srikanth --- 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?