public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "pinskia at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/101529] wrong code with __builtin_convertvector() and __builtin_shufflevector() at -Og
Date: Tue, 20 Jul 2021 21:56:32 +0000	[thread overview]
Message-ID: <bug-101529-4-YALvnTm0kn@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-101529-4@http.gcc.gnu.org/bugzilla/>

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2021-07-20
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.

-Og:
  _13 = BIT_FIELD_REF <_12, 64, 0>;
  _4 = VEC_PERM_EXPR <_13, { 0, 0, 0, 0, 0, 0, 0, 0 }, { 3, 9, 10, 11, 12, 13,
14, 15 }>;
  _14 = BIT_FIELD_REF <_4, 8, 0>;


vs -O2:
  _14 = BIT_FIELD_REF <_12, 8, 24>;


Huh:

;; _4 = VEC_PERM_EXPR <_13, { 0, 0, 0, 0, 0, 0, 0, 0 }, { 3, 9, 10, 11, 12, 13,
14, 15 }>;


(insn 16 15 17 (set (reg:V8QI 95 [ _4 ])
        (vec_select:V8QI (reg:V16QI 98 [ _12 ])
            (parallel [
                    (const_int 0 [0])
                    (const_int 1 [0x1])
                    (const_int 2 [0x2])
                    (const_int 3 [0x3])
                    (const_int 4 [0x4])
                    (const_int 5 [0x5])
                    (const_int 6 [0x6])
                    (const_int 7 [0x7])
                ]))) "t5.c":11:10 -1
     (nil))

;;; Select the lower part aka _13

(insn 17 16 18 (set (reg:V8QI 112)
        (const_vector:V8QI [
                (const_int 0 [0]) repeated x8
            ])) "t5.c":11:10 -1
     (nil))

(insn 18 17 19 (set (reg:V8QI 95 [ _4 ])
        (reg:V8QI 112)) "t5.c":11:10 -1
     (nil))
;;; BUT reuse 95/_4 for the zero constant!!!!!!!!!!!!!!!

(insn 19 18 0 (set (reg:V8QI 95 [ _4 ])
        (vec_merge:V8QI (vec_duplicate:V8QI (vec_select:QI (reg:V8QI 95 [ _4 ])
                    (parallel [
                            (const_int 3 [0x3])
                        ])))
            (reg:V8QI 95 [ _4 ])
            (const_int 1 [0x1]))) "t5.c":11:10 -1
     (nil))

  reply	other threads:[~2021-07-20 21:56 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-20 15:30 [Bug target/101529] New: " zsojka at seznam dot cz
2021-07-20 21:56 ` pinskia at gcc dot gnu.org [this message]
2021-08-11 19:27 ` [Bug target/101529] " pinskia at gcc dot gnu.org
2021-11-06  6:18 ` [Bug target/101529] [11/12 Regression] " pinskia at gcc dot gnu.org
2021-11-06  6:18 ` pinskia at gcc dot gnu.org
2021-11-06  6:19 ` pinskia at gcc dot gnu.org
2021-11-06  6:23 ` [Bug target/101529] [11/12 Regression] wrong code with __builtin_convertvector() and __builtin_shufflevector() at -Og caused by r11-2192 pinskia at gcc dot gnu.org
2021-11-06  6:49 ` pinskia at gcc dot gnu.org
2021-11-06 19:31 ` pinskia at gcc dot gnu.org
2021-11-10  4:07 ` cvs-commit at gcc dot gnu.org
2021-11-10  4:09 ` [Bug target/101529] [11 " pinskia at gcc dot gnu.org
2022-01-26 17:51 ` cvs-commit at gcc dot gnu.org
2022-01-26 17:52 ` pinskia 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-101529-4-YALvnTm0kn@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).