public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "zippel at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/32698] [4.3 regression] inefficient pointer expression Date: Mon, 09 Jul 2007 15:28:00 -0000 [thread overview] Message-ID: <20070709152757.15606.qmail@sourceware.org> (raw) In-Reply-To: <bug-32698-14001@http.gcc.gnu.org/bugzilla/> ------- Comment #6 from zippel at gcc dot gnu dot org 2007-07-09 15:27 ------- (In reply to comment #5) > as you suggest creates worse assembly (look at the extra shift) > > foo: > pushl %ebp > movl %esp, %ebp > movl 12(%ebp), %ecx > movl 8(%ebp), %edx > popl %ebp > sall $2, %ecx > movl 8(%ecx,%edx), %eax > addl 4(%ecx,%edx), %eax > addl 12(%ecx,%edx), %eax > ret The cost of this is dependent on the target, so IMO the shift could be propagated back into the address at RTL level. > so there is no form that is clearly better to canonicalize to. Your example is rather artificial and depends on that (i + x) * y is completely eliminated. My main point is still that such expression are far more difficult to translate into proper address operations. To generate addresses targeting a form of (i * x) + y is clearly better. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32698
next prev parent reply other threads:[~2007-07-09 15:28 UTC|newest] Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top 2007-07-09 13:25 [Bug tree-optimization/32698] New: " zippel at gcc dot gnu dot org 2007-07-09 13:40 ` [Bug tree-optimization/32698] " rguenth at gcc dot gnu dot org 2007-07-09 13:41 ` rguenth at gcc dot gnu dot org 2007-07-09 13:42 ` rguenth at gcc dot gnu dot org 2007-07-09 14:40 ` zippel at gcc dot gnu dot org 2007-07-09 15:01 ` rguenth at gcc dot gnu dot org 2007-07-09 15:28 ` zippel at gcc dot gnu dot org [this message] 2007-07-09 15:37 ` rguenther at suse dot de 2007-07-09 17:42 ` zippel at gcc dot gnu dot org 2007-07-09 19:42 ` rguenth at gcc dot gnu dot org 2007-07-18 6:00 ` pinskia at gcc dot gnu dot org 2007-07-18 12:56 ` zippel at gcc dot gnu dot org 2007-07-19 16:50 ` rguenth at gcc dot gnu dot org 2007-07-19 18:27 ` zippel at gcc dot gnu dot org 2007-07-20 11:48 ` rguenth at gcc dot gnu dot org 2007-07-20 11:58 ` zippel at gcc dot gnu dot org 2007-07-20 16:06 ` rguenth at gcc dot gnu dot org 2007-07-20 16:21 ` zippel at gcc dot gnu dot org 2007-07-20 16:35 ` rguenth at gcc dot gnu dot org 2007-07-20 17:06 ` zippel at gcc dot gnu dot org 2007-07-20 17:22 ` rguenth at gcc dot gnu dot org 2007-08-10 0:44 ` mmitchel at gcc dot gnu dot org 2007-11-19 9:01 ` steven at gcc dot gnu dot org 2008-01-13 15:18 ` rguenth at gcc dot gnu dot org
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=20070709152757.15606.qmail@sourceware.org \ --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: linkBe 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).