public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "hjl.tools at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/60204] New: struct with __m512i is mishandled in function parameter passing and return
Date: Fri, 14 Feb 2014 20:26:00 -0000	[thread overview]
Message-ID: <bug-60204-4@http.gcc.gnu.org/bugzilla/> (raw)

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60204

            Bug ID: 60204
           Summary: struct with __m512i is mishandled in function
                    parameter passing and return
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hjl.tools at gmail dot com
                CC: kirill.yukhin at intel dot com

[hjl@gnu-6 avx512-1]$ cat x.i
typedef long long __m512i __attribute__ ((__vector_size__ (64),
__may_alias__));

struct m512i
{
  __m512i x;
};

typedef long long __m256i __attribute__ ((__vector_size__ (32),
__may_alias__));

struct m256i
{
  __m256i x;
};

struct m256i
foo1 (struct m256i x, struct m256i y, struct m256i z)
{
  return z;
}

struct m512i
foo2 (struct m512i x, struct m512i y, struct m512i z)
{
  return z;
}
[hjl@gnu-6 avx512-1]$ make
/export/build/gnu/gcc/build-x86_64-linux/gcc/xgcc
-B/export/build/gnu/gcc/build-x86_64-linux/gcc/ -mavx512f -O2 -S x.i
[hjl@gnu-6 avx512-1]$ cat x.s
    .file    "x.i"
    .section    .text.unlikely,"ax",@progbits
.LCOLDB0:
    .text
.LHOTB0:
    .p2align 4,,15
    .globl    foo1
    .type    foo1, @function
foo1:
.LFB0:
    .cfi_startproc
    vmovdqa    %ymm2, %ymm0
    ret
    .cfi_endproc
.LFE0:
    .size    foo1, .-foo1
    .section    .text.unlikely
.LCOLDE0:
    .text
.LHOTE0:
    .section    .text.unlikely
.LCOLDB1:
    .text
.LHOTB1:
    .p2align 4,,15
    .globl    foo2
    .type    foo2, @function
foo2:
.LFB1:
    .cfi_startproc
    vmovdqa64    136(%rsp), %zmm0
    movq    %rdi, %rax
    vmovdqa64    %zmm0, (%rdi)
    ret
    .cfi_endproc
.LFE1:
    .size    foo2, .-foo2
    .section    .text.unlikely
.LCOLDE1:
    .text
.LHOTE1:
    .ident    "GCC: (GNU) 4.9.0 20140214 (experimental)"
    .section    .note.GNU-stack,"",@progbits
[hjl@gnu-6 avx512-1]$ 

I am expecting struct m512i is passed/returned in zmm register per
AVX-512 extension to x86-64 psABI.


             reply	other threads:[~2014-02-14 20:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-14 20:26 hjl.tools at gmail dot com [this message]
2014-02-18 16:54 ` [Bug target/60204] " hjl.tools at gmail dot com
2014-02-19  9:48 ` ubizjak at gmail dot com
2014-02-19 11:03 ` tocarip.intel at gmail dot com
2014-02-20  6:32 ` kyukhin at gcc dot gnu.org
2014-02-20 13:17 ` ubizjak at gmail dot com

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=bug-60204-4@http.gcc.gnu.org/bugzilla/ \
    --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: 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).