public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "H.J. Lu" <hjl.tools@gmail.com>
To: FX <fxcoudert@gmail.com>
Cc: gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [committed,testsuite] Not run gcc.target/i386/sibcall-1.c on PIC targets
Date: Sat, 15 Nov 2014 21:56:00 -0000	[thread overview]
Message-ID: <CAMe9rOoJScghh7p4nrudfAtR8v-kEQKSEzwFdR8r6TGAtVjD6w@mail.gmail.com> (raw)
In-Reply-To: <0368C764-AF90-4A7D-89D3-BE836D9FF617@gmail.com>

On Sat, Nov 15, 2014 at 12:22 PM, FX <fxcoudert@gmail.com> wrote:
>> This looks wrong.  This test should pass for 64-bit or ia32 && nonpic.
>
> It was Kai’s original testcase, so I don’t want to modify it too much, other than make it skip where it clearly fails.
>

Original bug report was filed against x86-64:

The attached testcase is a greatly reduced interpreter loop,
containing a simple load and indirect branch:

  goto *addresses[*pc++]

gcc 4.8.2 (as well as older versions) with -O2 produces the following
x86-64 output:

  movq addresses.1721(,%rax,8), %rax
  jmp *%rax

Since the loaded value is not used after the branch, there's no need
to hold it in a register, so the load could be folded into the branch.
This would improve code size and instruction count.

Add  a testcase only for ia32 makes no senses at all.


H.J.




-- 
H.J.

  reply	other threads:[~2014-11-15 20:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-15 16:07 [committed,testsuite] Fix dg-error for a darwin testcase FX
2014-11-15 16:57 ` [committed,testsuite] Fix missing includes for darwin testcases FX
2014-11-15 17:20   ` [committed,testsuite] Only run gcc.dg/tree-ssa/pr61144.c when aliases are supported FX
2014-11-15 20:22     ` [committed,testsuite] Not run gcc.target/i386/sibcall-1.c on PIC targets FX
2014-11-15 20:45       ` H.J. Lu
2014-11-15 21:37         ` FX
2014-11-15 21:56           ` H.J. Lu [this message]
2014-11-15 23:25             ` H.J. Lu

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=CAMe9rOoJScghh7p4nrudfAtR8v-kEQKSEzwFdR8r6TGAtVjD6w@mail.gmail.com \
    --to=hjl.tools@gmail.com \
    --cc=fxcoudert@gmail.com \
    --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).