public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: ehrhardt@mathematik.uni-ulm.de
To: gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org,
	mark@cal005304.student.utwente.nl, nobody@gcc.gnu.org
Subject: Re: optimization/8832: [<3.2,3.3> regression] traditional "asm volatile" code is illegally optimized
Date: Fri, 06 Dec 2002 04:11:00 -0000	[thread overview]
Message-ID: <20021206121108.3376.qmail@sources.redhat.com> (raw)

Old Synopsis: "asm volatile" code is removed
New Synopsis: [<3.2,3.3> regression] traditional "asm volatile" code is illegally optimized

State-Changed-From-To: open->analyzed
State-Changed-By: cae
State-Changed-When: Fri Dec  6 04:11:08 2002
State-Changed-Why:
    I can confirm this with 3.3 on sparc, i.e. it isn't arch independant.
    These two pieces of code produce the same assembler output (except for
    label names) which looks like a bug to me. 3.2.1-prerelease is even
    worse: It completly eliminates two of the volatile asm statements.
    Comile with -O3 -S
    Priority high because this is a regression from 2.95.3
    
    ----------------- variant 1 -------------------------
    void f (int v)
    {
    	asm volatile ("blah p0, p1" );
    	if (v&7) {
    		asm volatile ("blub p0, p1" );
    	}
    	asm volatile ("foo p0, p1");
    	if (v&7) {
    		asm volatile ("bar p0, p1" );
    	}
    	asm volatile ("baz p0, p1" );
    }
    ----------------- end       --------------------------
    ----------------- variant 2 -------------------------
    void f (int v)
    {
    	asm volatile ("blah p0, p1" );
    	if (v&7) {
    		asm volatile ("blub p0, p1" );
    		asm volatile ("foo p0, p1");
    		asm volatile ("bar p0, p1" );
    	}
    	asm volatile ("baz p0, p1" );
    }
    ----------------- end       --------------------------
    

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8832


                 reply	other threads:[~2002-12-06 12:11 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20021206121108.3376.qmail@sources.redhat.com \
    --to=ehrhardt@mathematik.uni-ulm.de \
    --cc=gcc-bugs@gcc.gnu.org \
    --cc=gcc-gnats@gcc.gnu.org \
    --cc=gcc-prs@gcc.gnu.org \
    --cc=mark@cal005304.student.utwente.nl \
    --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).