public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jskumari at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/106770] powerpc64le: Unnecessary xxpermdi before mfvsrd
Date: Thu, 02 Mar 2023 07:36:32 +0000	[thread overview]
Message-ID: <bug-106770-4-kH7DCyKzZu@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-106770-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #9 from Surya Kumari Jangala <jskumari at gcc dot gnu.org> ---
RTL after dfinit pass for the vec_sub() and the vec_extract():

(insn 13 12 14 2 (set (reg:V2DI 132 [ vrD.3952 ])
        (minus:V2DI (subreg:V2DI (reg:V2DF 117 [ _1 ]) 0)
            (subreg:V2DI (reg:V2DF 118 [ _2 ]) 0))) "cpm2.c":9:29 1689
{subv2di3}
     (nil))
(insn 14 13 15 2 (set (reg:DI 133)
        (vec_select:DI (reg:V2DI 132 [ vrD.3952 ])
            (parallel [
                    (const_int 1 [0x1])
                ]))) "cpm2.c":11:12 1371 {*vsx_extract_v2di_0}
     (nil))
(insn 15 14 16 2 (set (reg:DI 119 [ _3 ])
        (reg:DI 133)) "cpm2.c":11:12 679 {*movdi_internal64}
     (nil))
(insn 16 15 17 2 (set (reg:SI 134)
        (subreg:SI (reg:DI 119 [ _3 ]) 0)) "cpm2.c":11:12 discrim 1 555
{*movsi_internal1}
     (nil))
(insn 17 16 18 2 (set (reg:DI 135)
        (sign_extend:DI (reg:SI 134))) "cpm2.c":11:12 discrim 1 31
{extendsidi2}
     (nil))
(insn 18 17 22 2 (set (reg:DI 127 [ <retval> ])
        (reg:DI 135)) "cpm2.c":11:12 discrim 1 679 {*movdi_internal64}
     (nil))
(insn 22 18 23 2 (set (reg/i:DI 3 3)
        (reg:DI 127 [ <retval> ])) "cpm2.c":12:1 679 {*movdi_internal64}
     (nil))
(insn 23 22 0 2 (use (reg/i:DI 3 3)) "cpm2.c":12:1 -1
     (nil))

----------

RTL after swaps pass:

(insn 13 12 14 2 (set (reg:V2DI 132 [ vrD.3952 ])
        (minus:V2DI (subreg:V2DI (reg:V2DF 117 [ _1 ]) 0)
            (subreg:V2DI (reg:V2DF 118 [ _2 ]) 0))) "cpm2.c":9:29 1689
{subv2di3}
     (nil))
(insn 14 13 15 2 (set (reg:DI 133)
        (vec_select:DI (reg:V2DI 132 [ vrD.3952 ])
            (parallel [
                    (const_int 0 [0])
                ]))) "cpm2.c":11:12 -1
     (nil))

----------

'swaps' pass occurs after 'dfinit' pass.
After dfinit pass, we are extracting the correct element (1st element). See the
vec_select in insn 14. But after 'swaps' pass, the element being extracted
changes to 0.

  parent reply	other threads:[~2023-03-02  7:36 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-29  7:52 [Bug target/106770] New: PPCLE: " jens.seifert at de dot ibm.com
2022-08-29  8:16 ` [Bug target/106770] " jens.seifert at de dot ibm.com
2022-08-29  9:57 ` jens.seifert at de dot ibm.com
2023-02-27 16:26 ` segher at gcc dot gnu.org
2023-02-27 17:57 ` jens.seifert at de dot ibm.com
2023-02-27 23:06 ` segher at gcc dot gnu.org
2023-02-28  7:23 ` jens.seifert at de dot ibm.com
2023-02-28 16:57 ` segher at gcc dot gnu.org
2023-03-02  6:11 ` [Bug target/106770] powerpc64le: " jskumari at gcc dot gnu.org
2023-03-02  7:36 ` jskumari at gcc dot gnu.org [this message]
2023-03-02 12:42 ` jskumari at gcc dot gnu.org
2023-03-02 13:26 ` segher at gcc dot gnu.org
2023-03-03  6:02 ` jskumari 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-106770-4-kH7DCyKzZu@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).