public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/114098] _tile_loadconfig doesn't work
Date: Tue, 27 Feb 2024 03:49:16 +0000	[thread overview]
Message-ID: <bug-114098-4-YD0aVr4Xhc@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-114098-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #5 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-12 branch has been updated by H.J. Lu <hjl@gcc.gnu.org>:

https://gcc.gnu.org/g:23f4aa6c68e24a76d3784bcfdad5a53e46cd8f95

commit r12-10180-g23f4aa6c68e24a76d3784bcfdad5a53e46cd8f95
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Sun Feb 25 10:21:04 2024 -0800

    x86: Properly implement AMX-TILE load/store intrinsics

    ldtilecfg and sttilecfg take a 512-byte memory block.  With
    _tile_loadconfig implemented as

    extern __inline void
    __attribute__((__gnu_inline__, __always_inline__, __artificial__))
    _tile_loadconfig (const void *__config)
    {
      __asm__ volatile ("ldtilecfg\t%X0" :: "m" (*((const void **)__config)));
    }

    GCC sees:

    (parallel [
      (asm_operands/v ("ldtilecfg   %X0") ("") 0
       [(mem/f/c:DI (plus:DI (reg/f:DI 77 virtual-stack-vars)
                             (const_int -64 [0xffffffffffffffc0])) [1
MEM[(const void * *)&tile_data]+0 S8 A128])]
       [(asm_input:DI ("m"))]
       (clobber (reg:CC 17 flags))])

    and the memory operand size is 1 byte.  As the result, the rest of 511
    bytes is ignored by GCC.  Implement ldtilecfg and sttilecfg intrinsics
    with a pointer to XImode to honor the 512-byte memory block.

    gcc/ChangeLog:

            PR target/114098
            * config/i386/amxtileintrin.h (_tile_loadconfig): Use
            __builtin_ia32_ldtilecfg.
            (_tile_storeconfig): Use __builtin_ia32_sttilecfg.
            * config/i386/i386-builtin.def (BDESC): Add
            __builtin_ia32_ldtilecfg and __builtin_ia32_sttilecfg.
            * config/i386/i386-expand.cc (ix86_expand_builtin): Handle
            IX86_BUILTIN_LDTILECFG and IX86_BUILTIN_STTILECFG.
            * config/i386/i386.md (ldtilecfg): New pattern.
            (sttilecfg): Likewise.

    gcc/testsuite/ChangeLog:

            PR target/114098
            * gcc.target/i386/amxtile-4.c: New test.

    (cherry picked from commit 4972f97a265c574d51e20373ddefd66576051e5c)

  parent reply	other threads:[~2024-02-27  3:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-25 15:03 [Bug target/114098] New: " hjl.tools at gmail dot com
2024-02-25 15:11 ` [Bug target/114098] " hjl.tools at gmail dot com
2024-02-25 15:57 ` hjl.tools at gmail dot com
2024-02-26  4:26 ` cvs-commit at gcc dot gnu.org
2024-02-27  3:47 ` cvs-commit at gcc dot gnu.org
2024-02-27  3:49 ` cvs-commit at gcc dot gnu.org [this message]
2024-02-27 10:33 ` cvs-commit at gcc dot gnu.org
2024-02-27 10:37 ` hjl.tools 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-114098-4-YD0aVr4Xhc@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).