From: Zack Weinberg <zack@codesourcery.com>
To: martin@xemacs.org
Cc: gcc@gcc.gnu.org
Subject: Re: More embarrassing failures to optimize
Date: Sun, 05 Jan 2003 18:51:00 -0000 [thread overview]
Message-ID: <87of6vh233.fsf@egil.codesourcery.com> (raw)
In-Reply-To: <15895.61324.872456.502039@wobble.local> (Martin Buchholz's message of "Sun, 5 Jan 2003 00:40:44 -0800")
Martin Buchholz <martin@xemacs.org> writes:
> void f3 ()
> {
> Bool t (true), f (false);
>
> assert (t); assert (! f);
> assert (t); assert (! f);
> }
>
> is "optimized" to
>
> xorl %edx, %edx
> subl $12, %esp
> testb %dl, %dl
> jne .L52
> addl $12, %esp
> ret
> .L52:
> pushl $_ZZ2f3vE19__PRETTY_FUNCTION__
> pushl $42
> pushl $.LC0
> pushl $.LC2
> call __assert_fail
>
> Note that the resulting code contains exactly one branch, not two or
> four.
I suspect this is the same underlying problem that causes
gcc.c-torture/execute/builtin-constant.c to fail. This was discussed
at some length in the thread starting at
http://gcc.gnu.org/ml/gcc-patches/2002-11/msg00235.html - it's
nontrivial to fix.
You might want to try these embarrassing failures against the tree-ssa
branch.
zw
next prev parent reply other threads:[~2003-01-05 18:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-05 10:44 Martin Buchholz
2003-01-05 18:51 ` Zack Weinberg [this message]
2003-01-05 23:01 ` Martin Buchholz
2003-01-05 23:11 ` Zack Weinberg
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=87of6vh233.fsf@egil.codesourcery.com \
--to=zack@codesourcery.com \
--cc=gcc@gcc.gnu.org \
--cc=martin@xemacs.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).