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/99744] __attribute__ ((target("general-regs-only"))) doesn't work with GPR intrinsics
Date: Thu, 05 Aug 2021 13:27:07 +0000	[thread overview]
Message-ID: <bug-99744-4-ILNb7ZWjZW@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-99744-4@http.gcc.gnu.org/bugzilla/>

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

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

https://gcc.gnu.org/g:72264a639729a5dcc21dbee304717ce22b338bfd

commit r12-2765-g72264a639729a5dcc21dbee304717ce22b338bfd
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Sat Jul 17 07:44:45 2021 -0700

    <x86gprintrin.h>: Add pragma GCC target("general-regs-only")

    1. Intrinsics in <x86gprintrin.h> only require GPR ISAs.  Add

     #if defined __MMX__ || defined __SSE__
     #pragma GCC push_options
     #pragma GCC target("general-regs-only")
     #define __DISABLE_GENERAL_REGS_ONLY__
     #endif

    and

     #ifdef __DISABLE_GENERAL_REGS_ONLY__
     #undef __DISABLE_GENERAL_REGS_ONLY__
     #pragma GCC pop_options
     #endif /* __DISABLE_GENERAL_REGS_ONLY__ */

    to <x86gprintrin.h> to disable non-GPR ISAs so that they can be used in
    functions with __attribute__ ((target("general-regs-only"))).
    2. When checking always_inline attribute, if callee only uses GPRs,
    ignore MASK_80387 since enable MASK_80387 in caller has no impact on
    callee inline.

    gcc/

            PR target/99744
            * config/i386/i386.c (ix86_can_inline_p): Ignore MASK_80387 if
            callee only uses GPRs.
            * config/i386/ia32intrin.h: Revert commit 5463cee2770.
            * config/i386/serializeintrin.h: Revert commit 71958f740f1.
            * config/i386/x86gprintrin.h: Add
            #pragma GCC target("general-regs-only") and #pragma GCC pop_options
            to disable non-GPR ISAs.

    gcc/testsuite/

            PR target/99744
            * gcc.target/i386/pr99744-3.c: New test.
            * gcc.target/i386/pr99744-4.c: Likewise.
            * gcc.target/i386/pr99744-5.c: Likewise.
            * gcc.target/i386/pr99744-6.c: Likewise.
            * gcc.target/i386/pr99744-7.c: Likewise.
            * gcc.target/i386/pr99744-8.c: Likewise.

  parent reply	other threads:[~2021-08-05 13:27 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-24  2:58 [Bug target/99744] New: " hjl.tools at gmail dot com
2021-03-24  9:16 ` [Bug target/99744] " rguenth at gcc dot gnu.org
2021-03-24  9:47 ` crazylht at gmail dot com
2021-03-24 11:15 ` jakub at gcc dot gnu.org
2021-03-24 17:58 ` hjl.tools at gmail dot com
2021-03-25 12:37 ` cvs-commit at gcc dot gnu.org
2021-03-25 12:43 ` hjl.tools at gmail dot com
2021-03-25 14:00 ` hjl.tools at gmail dot com
2021-03-30 13:29 ` cvs-commit at gcc dot gnu.org
2021-04-10 13:00 ` cvs-commit at gcc dot gnu.org
2021-04-27 11:40 ` jakub at gcc dot gnu.org
2021-07-28  7:06 ` rguenth at gcc dot gnu.org
2021-08-05 13:27 ` cvs-commit at gcc dot gnu.org [this message]
2021-08-06  1:45 ` hjl.tools at gmail dot com
2021-08-25 12:58 ` cvs-commit at gcc dot gnu.org
2021-08-25 13:06 ` hjl.tools at gmail dot com
2022-03-15 10:56 ` poulhies at adacore dot com
2022-03-15 14:25 ` hjl.tools at gmail dot com
2022-03-15 14:32 ` poulhies at adacore 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-99744-4-ILNb7ZWjZW@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).