public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "ubizjak at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/103571] ABI: V2HF, V4HF and V8HFmode argument passing issues
Date: Tue, 07 Dec 2021 11:17:03 +0000	[thread overview]
Message-ID: <bug-103571-4-eLcSDJfH6U@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-103571-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103571

--- Comment #7 from Uroš Bizjak <ubizjak at gmail dot com> ---
Created attachment 51941
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51941&action=edit
Proposed patch

The patch moves put V2HF+V4HF+V8HF/V16HF/V32HF TO
VALID_SSE2/AVX256/AVX512F_REG_MODE.

Also, introduces VALID_AVX512FP16_SCALAR_MODE to simplify some code.

(Probably we need to add V2HFmode to VALID_INT_MODE_P, but nevertheless the
patch fixes all the issues from the description):

64-bit targets:

foo:
        movl    %esi, %eax
        ret

bar:
        movaps  %xmm1, %xmm0
        ret

baz:
        movdqa  %xmm1, %xmm0
        ret

and for 32-bit targets:

foo:
        movl    8(%esp), %eax
        ret

bar:
        movq    %mm1, %mm0
        ret

baz:
        movdqa  %xmm1, %xmm0
        ret

The patch "regresses" 32bit testsuite:

FAIL: gcc.target/i386/pr102812.c scan-assembler movdqa

but only due to better generated code:

        pxor    %xmm0, %xmm0
        pinsrw  $0, 4(%esp), %xmm0
        ret

vs. the above demonstrated mess.

  parent reply	other threads:[~2021-12-07 11:17 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-06  8:35 [Bug target/103571] New: " ubizjak at gmail dot com
2021-12-06 11:37 ` [Bug target/103571] " crazylht at gmail dot com
2021-12-07  3:05 ` crazylht at gmail dot com
2021-12-07  7:47 ` wwwhhhyyy333 at gmail dot com
2021-12-07  7:54 ` ubizjak at gmail dot com
2021-12-07  8:14 ` crazylht at gmail dot com
2021-12-07 11:04 ` ubizjak at gmail dot com
2021-12-07 11:17 ` ubizjak at gmail dot com [this message]
2021-12-08  5:27 ` crazylht at gmail dot com
2021-12-08  7:10 ` ubizjak at gmail dot com
2021-12-08  7:16 ` crazylht at gmail dot com
2021-12-08 14:25 ` ubizjak at gmail dot com
2021-12-08 14:38 ` ubizjak at gmail dot com
2021-12-08 15:05 ` ubizjak at gmail dot com
2021-12-08 15:07 ` ubizjak at gmail dot com
2021-12-09  0:39 ` crazylht at gmail dot com
2021-12-09  0:42 ` crazylht at gmail dot com
2021-12-09  4:15 ` crazylht at gmail dot com
2021-12-09  5:57 ` crazylht at gmail dot com
2021-12-09  7:07 ` crazylht at gmail dot com
2021-12-09  7:21 ` crazylht at gmail dot com
2021-12-09  8:15 ` ubizjak at gmail dot com
2021-12-09  8:36 ` crazylht at gmail dot com
2021-12-14 17:28 ` cvs-commit at gcc dot gnu.org
2021-12-14 18:30 ` ubizjak at gmail dot com
2021-12-16  8:51 ` ubizjak at gmail dot com
2021-12-16 18:35 ` cvs-commit at gcc dot gnu.org
2021-12-16 18:49 ` ubizjak at gmail dot com
2021-12-16 18:55 ` ubizjak at gmail dot com
2021-12-16 19:22 ` 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-103571-4-eLcSDJfH6U@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).