public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/102583] [x86] Failure to optimize 32-byte integer vector conversion to 16-byte float vector properly when converting upper part with -mavx2
Date: Mon, 04 Oct 2021 07:53:15 +0000	[thread overview]
Message-ID: <bug-102583-4-gytNrTL2w4@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-102583-4@http.gcc.gnu.org/bugzilla/>

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2021-10-04
     Ever confirmed|0                           |1

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
We're lacking stripping of a load that's only used partially I guess. 
forwprop1
generates

  _1 = *srcp_11(D);
  _2 = BIT_FIELD_REF <_1, 32, 128>;
  _3 = (float) _2;
  _4 = BIT_FIELD_REF <_1, 32, 160>;
  _5 = (float) _4;
  _6 = BIT_FIELD_REF <_1, 32, 192>;
  _7 = (float) _6;
  _8 = BIT_FIELD_REF <_1, 32, 224>;
  _9 = (float) _8;
  _12 = VEC_PERM_EXPR <_1, _1, { 4, 5, 6, 7, 4, 5, 6, 7 }>;
  _15 = BIT_FIELD_REF <_12, 128, 0>;
  _16 = (vector(4) float) _15;

and the second forwprop then sees

  _1 = *srcp_3(D);
  _4 = VEC_PERM_EXPR <_1, _1, { 4, 5, 6, 7, 4, 5, 6, 7 }>;
  _5 = BIT_FIELD_REF <_4, 128, 0>;
  _6 = (vector(4) float) _5;

in a single-use chain we probably want to try swapping the
BIT_FIELD_REF and the VEC_PERM_EXPR so that we expose the
BIT_FIELD_REF directly to the load which we'd already handle.

  reply	other threads:[~2021-10-04  7:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-04  2:57 [Bug target/102583] New: " gabravier at gmail dot com
2021-10-04  7:53 ` rguenth at gcc dot gnu.org [this message]
2022-01-25  6:32 ` [Bug tree-optimization/102583] " crazylht at gmail dot com
2022-01-25  9:06 ` crazylht at gmail dot com
2022-04-08  7:28 ` crazylht at gmail dot com
2022-05-13  1:04 ` cvs-commit at gcc dot gnu.org
2022-05-13  1:19 ` crazylht at gmail dot com
2022-05-16 22:11 ` gabravier at gmail dot com
2022-05-16 23:09 ` 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-102583-4-gytNrTL2w4@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).