From: "Richard Guenther" <richard.guenther@gmail.com>
To: "Bernd Schmidt" <bernds_cb1@t-online.de>
Cc: gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] Fix PR34027, SCEV const-prop pessimizes -Os
Date: Tue, 13 Nov 2007 11:18:00 -0000 [thread overview]
Message-ID: <84fc9c000711130230y5d56d07br33b83ce2c4e8cb94@mail.gmail.com> (raw)
In-Reply-To: <4738EFF2.1010505@t-online.de>
On Nov 13, 2007 1:29 AM, Bernd Schmidt <bernds_cb1@t-online.de> wrote:
> Richard Guenther wrote:
> > With the now famous enough testcase
> >
> > unsigned long long foobar(unsigned long long ns)
> > {
> > while(ns >= 1000000000L)
> > ns -= 1000000000L;
> > return ns;
> > }
> >
> > SCEV const-prop creates the expression
> >
> > ns + (ns /[fl] 1000000000L) / -1000000000L
> >
> > for the final value of ns
>
> Am I the only one here who thinks this is a spectacularly bad idea?
> Divisions are expensive, especially on targets without hardware divide.
No you are not ;) In fact the kernel people complained about this
already.
Richard.
prev parent reply other threads:[~2007-11-13 10:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-11 22:34 Richard Guenther
2007-11-12 15:47 ` Manuel López-Ibáñez
2007-11-12 15:54 ` Richard Guenther
2007-11-12 20:39 ` Andrew Pinski
2007-11-13 6:15 ` Manuel López-Ibáñez
2007-11-13 6:19 ` Bernd Schmidt
2007-11-13 11:18 ` Richard Guenther [this message]
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=84fc9c000711130230y5d56d07br33b83ce2c4e8cb94@mail.gmail.com \
--to=richard.guenther@gmail.com \
--cc=bernds_cb1@t-online.de \
--cc=gcc-patches@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).