public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "ubizjak at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/91838] [8/9 Regression] incorrect use of shr and shrx to shift by 64, missed optimization of vector shift
Date: Fri, 19 May 2023 08:04:04 +0000	[thread overview]
Message-ID: <bug-91838-4-EO5LRnnT7F@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-91838-4@http.gcc.gnu.org/bugzilla/>

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

Uroš Bizjak <ubizjak at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|FIXED                       |---
             Status|RESOLVED                    |REOPENED

--- Comment #15 from Uroš Bizjak <ubizjak at gmail dot com> ---
This test returns different results, depending on whether V8QImode shift
pattern is present in target *.md files. For x86, if the following expander is
added:

+(define_expand "<insn>v8qi3"
+  [(set (match_operand:V8QI 0 "register_operand")
+       (any_shift:V8QI (match_operand:V8QI 1 "register_operand")
+                       (match_operand:DI 2 "nonmemory_operand")))]
+  "TARGET_MMX_WITH_SSE"
+{
+  ix86_expand_vecop_qihi_partial (<CODE>, operands[0],
+                                 operands[1], operands[2]);
+  DONE;
+})

then the tree optimizers produce:

V f (V x)
{
  V _2;

  <bb 2> [local count: 1073741824]:
  _2 = x_1(D) >> 8;
  return _2;

}

otherwise, without the named expander:

V f (V x)
{
  <bb 2> [local count: 1073741824]:
  return { 0, 0, 0, 0, 0, 0, 0, 0 };

}

       reply	other threads:[~2023-05-19  8:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-91838-4@http.gcc.gnu.org/bugzilla/>
2023-05-19  8:04 ` ubizjak at gmail dot com [this message]
2023-06-02  2:18 ` pinskia at gcc dot gnu.org
2023-07-27 11:11 ` rguenth at gcc dot gnu.org
2023-07-27 11:38 ` ubizjak at gmail dot com
2023-07-27 13:56 ` cvs-commit at gcc dot gnu.org
2023-07-27 13:57 ` rguenth at gcc dot gnu.org
2024-03-26 14:58 ` cvs-commit at gcc dot gnu.org
2024-03-26 15:05 ` cvs-commit 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-91838-4-EO5LRnnT7F@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).