public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "meissner at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug ipa/102059] Incorrect always_inline diagnostic in LTO mode with #pragma GCC target("cpu=power10")
Date: Thu, 26 Aug 2021 18:46:49 +0000	[thread overview]
Message-ID: <bug-102059-4-LgsiHcgMfV@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-102059-4@http.gcc.gnu.org/bugzilla/>

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

Michael Meissner <meissner at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |meissner at gcc dot gnu.org

--- Comment #19 from Michael Meissner <meissner at gcc dot gnu.org> ---
The main power8 fusion that GCC does is combining:

    addis       rtmp,r0,symbol@hi(r2)
    ld/lbz/lwz  rx,symbol@lo(rtmp)

into:

    addis       rx,symbol@hi(r2)
    ld/lbz/lwz  rx,symbol@lo(rx)

This fusion is listed as one of the fusion types in the power10 documents.  The
fusion type is wideimmediate.  Note, when you are compiling for -mcpu=power10,
this fusion case doesn't often get used because we use PC-relative loads.  But
the machine does support it.

In addition, it combines loads to a traditional floating point register, and
then a move to a traditional Altivec register.   Similarly, it will combine a
move from a traditional Altivec register to a traditional floating point
register, and then a store:

    lfd   fy,32(rx)        xxlor fy,vsrx
    xxlor vsrz,fy,fy       stfd  fy,32(rz)

into:

    li   rtmp,32           li    rtmp,32
    lxdx vsrz,2,rtmp       stxdx vsrx.rz.rtmp

Now on power9 and power10, this sequence is not generated because we have the
lxsd and stxsd instructions (and plxsd/pstxsd in power10).

So I suspect, we may want to move the p8 load fusion case support to fusion.md,
and do it for power10 as well.  Aaron Sawdey may have other thoughts, since he
has been working on the power10 fusion support, and knows more what is actually
implemented in current hardware.

Then for inlining, we may want to exclude p8_fusion and p10_fusion in the
comparison in rs6000_can_inline_p, since these are optimizations that don't
affect the instructions generated.

Note, there were so-called power9 fusion code that was originally in the power9
spec, but was not implemented in the hardware.  I removed support for these in
November 2018.

  parent reply	other threads:[~2021-08-26 18:46 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-25  9:42 [Bug lto/102059] New: " fw at gcc dot gnu.org
2021-08-25  9:49 ` [Bug ipa/102059] " rguenth at gcc dot gnu.org
2021-08-25  9:54 ` marxin at gcc dot gnu.org
2021-08-25 11:49 ` chip.kerchner at ibm dot com
2021-08-25 13:25 ` marxin at gcc dot gnu.org
2021-08-25 13:30 ` marxin at gcc dot gnu.org
2021-08-25 13:34 ` marxin at gcc dot gnu.org
2021-08-25 13:44 ` marxin at gcc dot gnu.org
2021-08-25 15:34 ` linkw at gcc dot gnu.org
2021-08-26  6:26 ` linkw at gcc dot gnu.org
2021-08-26  8:20 ` rguenth at gcc dot gnu.org
2021-08-26  8:24 ` rguenth at gcc dot gnu.org
2021-08-26  8:34 ` fw at gcc dot gnu.org
2021-08-26  8:45 ` linkw at gcc dot gnu.org
2021-08-26  8:56 ` linkw at gcc dot gnu.org
2021-08-26  9:02 ` linkw at gcc dot gnu.org
2021-08-26  9:04 ` marxin at gcc dot gnu.org
2021-08-26  9:29 ` linkw at gcc dot gnu.org
2021-08-26  9:34 ` linkw at gcc dot gnu.org
2021-08-26 18:46 ` meissner at gcc dot gnu.org [this message]
2021-09-01  7:10 ` linkw at gcc dot gnu.org
2021-09-14 14:09 ` chip.kerchner at ibm dot com
2021-09-14 14:11 ` chip.kerchner at ibm dot com
2021-09-15  9:57 ` linkw at gcc dot gnu.org
2021-09-15 12:19 ` chip.kerchner at ibm dot com
2021-11-26  2:07 ` linkw at gcc dot gnu.org
2022-01-05  3:26 ` cvs-commit at gcc dot gnu.org
2022-02-04 18:55 ` pc at gcc dot gnu.org
2022-02-04 19:33 ` dan at danny dot cz
2022-02-04 20:15 ` bergner at gcc dot gnu.org
2022-02-05  2:50 ` linkw at gcc dot gnu.org
2022-02-08 21:53 ` meissner at gcc dot gnu.org
2022-02-09  2:33 ` linkw at gcc dot gnu.org
2022-02-09  3:20 ` linkw at gcc dot gnu.org
2022-02-09  7:21 ` rguenth at gcc dot gnu.org
2022-02-09  7:35 ` linkw at gcc dot gnu.org
2022-03-15  6:38 ` linkw at gcc dot gnu.org
2022-05-05 18:14 ` bergner at gcc dot gnu.org
2022-05-06 16:41 ` cvs-commit at gcc dot gnu.org
2022-05-06 19:03 ` cvs-commit at gcc dot gnu.org
2022-05-06 21:45 ` cvs-commit at gcc dot gnu.org
2022-05-19 21:20 ` cvs-commit at gcc dot gnu.org
2022-05-19 21:25 ` bergner at gcc dot gnu.org

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-102059-4-LgsiHcgMfV@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).