public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Uros Bizjak <ubizjak@gmail.com>
To: "H.J. Lu" <hjl.tools@gmail.com>
Cc: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Subject: Re: PATCH: PR target/59794: [4.7/4.8/4.9 Regression] i386 backend fails to detect MMX/SSE/AVX ABI changes
Date: Tue, 14 Jan 2014 16:12:00 -0000	[thread overview]
Message-ID: <CAFULd4awaVzprpLqgpDGEn7CacSMFVSbQY6yORPSUQqxiNd1sA@mail.gmail.com> (raw)
In-Reply-To: <20140114141822.GA30946@intel.com>

On Tue, Jan 14, 2014 at 3:18 PM, H.J. Lu <hongjiu.lu@intel.com> wrote:

> There are several problems with i386 MMX/SSE/AVX ABI change detection:
>
> 1. MMX/SSE return value isn't checked for -m32 since revision 83533:
>
> http://gcc.gnu.org/viewcvs/gcc?view=revision&revision=83533
>
> which added ix86_struct_value_rtx.  Since MMX/SSE condition is always
> false, the MMX/SSE return value ABI change is disabled.
> 2. For -m32, the same warning on MMX/SSE argument is issued twice, one from
> type_natural_mode and one from function_arg_32.
> 3. AVX return value ABI change isn't checked.
>
> This patch does followings:
>
> 1. Remove the ineffective ix86_struct_value_rtx.
> 2. Add a bool parameter to indicate if type is used for function return
> value.  Warn ABI change if the vector mode isn't available for function
> return value.  Add AVX function return value ABI change warning.
> 3. Consolidate ABI change warning into type_natural_mode.
> 4. Update g++.dg/ext/vector23.C to prune ABI change for Linux/x86
> added by the AVX function return value ABI change warning.
> 5. Update gcc.target/i386/pr39162.c to avoid the AVX function return
> value ABI change warning.
> 6. Add testcases for warning MMX/SSE/AVX ABI changes in parameter
> passing and function return.
>
> Tested on Linux/x86-64 with -m32/-m64 for "make check".  OK to install?
>
> Thanks.
>
> H.J.
> ---
> gcc/
>
> 2014-01-14  H.J. Lu  <hongjiu.lu@intel.com>
>
>         PR target/59794
>         * config/i386/i386.c (type_natural_mode): Add a bool parameter
>         to indicate if type is used for function return value.  Warn
>         ABI change if the vector mode isn't available for function
>         return value.
>         (ix86_function_arg_advance): Pass false to type_natural_mode.
>         (ix86_function_arg): Likewise.
>         (ix86_gimplify_va_arg): Likewise.
>         (function_arg_32): Don't warn ABI change.
>         (ix86_function_value): Pass true to type_natural_mode.
>         (ix86_return_in_memory): Likewise.
>         (ix86_struct_value_rtx): Removed.
>         (TARGET_STRUCT_VALUE_RTX): Likewise.
>
> gcc/testsuite/
>
> 2014-01-14  H.J. Lu  <hongjiu.lu@intel.com>
>
>         PR target/59794
>         * g++.dg/ext/vector23.C: Also prune ABI change for Linux/x86.
>         * gcc.target/i386/pr39162.c (y): New __m256i variable.
>         (bar): Change return type to void.  Set y to x.
>         * gcc.target/i386/pr59794-1.c: New testcase.
>         * gcc.target/i386/pr59794-2.c: Likewise.
>         * gcc.target/i386/pr59794-3.c: Likewise.
>         * gcc.target/i386/pr59794-4.c: Likewise.
>         * gcc.target/i386/pr59794-5.c: Likewise.
>         * gcc.target/i386/pr59794-6.c: Likewise.
>         * gcc.target/i386/pr59794-7.c: Likewise.

OK for mainline and release branches after a couple of days.

Thanks,
Uros.

  reply	other threads:[~2014-01-14 16:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-14 14:18 H.J. Lu
2014-01-14 16:12 ` Uros Bizjak [this message]
2014-01-17 19:04   ` H.J. Lu
2014-01-15  7:09 ` Jakub Jelinek
2014-01-15 17:05   ` 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=CAFULd4awaVzprpLqgpDGEn7CacSMFVSbQY6yORPSUQqxiNd1sA@mail.gmail.com \
    --to=ubizjak@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=hjl.tools@gmail.com \
    /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).