public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/99905] [8/9/10/11 Regression] wrong code with -mno-mmx -mno-sse since r7-4540-gb229ab2a712ccd44
Date: Wed, 07 Apr 2021 08:48:37 +0000	[thread overview]
Message-ID: <bug-99905-4-sVkQpVVtzW@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-99905-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Trying 7, 11, 13 -> 14:
    7: r109:TI=[argp:DI]
      REG_EQUIV [argp:DI]
   11: {r110:TI=r109:TI 0>>0x3f;clobber flags:CC;}
      REG_DEAD r109:TI
      REG_UNUSED flags:CC
   13: {r85:HI=r110:TI#0<-<0x8;clobber flags:CC;}
      REG_DEAD r110:TI
      REG_UNUSED flags:CC
   14: r86:SI=zero_extend(r85:HI#0)
      REG_DEAD r85:HI
Successfully matched this instruction:
(set (reg:SI 86 [ _6 ])
    (const_int 0 [0]))

looks like the bug.
We have
(set (reg:SI 86 [ _6 ])
    (zero_extend:SI (subreg:QI (rotate:HI (subreg:HI (lshiftrt:TI (reg/v:TI 109
[ i ])
                        (const_int 63 [0x3f])) 0)
                (const_int 8 [0x8])) 0)))
and are substing (mem/c:TI (reg/f:DI 16 argp) [3 i+0 S16 A128]) into
(reg/v:TI 109 [ i ]) and that gives the SET_SRC of const0_rtx.
subst first makes
(set (reg:SI 86 [ _6 ])
    (and:SI (subreg:SI (rotate:HI (subreg:HI (lshiftrt:TI (mem/c:TI (reg/f:DI
16 argp) [3 i+0 S16 A128])
                        (const_int 63 [0x3f])) 0)
                (const_int 8 [0x8])) 0)
        (const_int 255 [0xff])))
which still LGTM.

  parent reply	other threads:[~2021-04-07  8:48 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-04  8:21 [Bug target/99905] New: wrong code with -mgeneral-regs-only zsojka at seznam dot cz
2021-04-06  6:24 ` [Bug target/99905] " marxin at gcc dot gnu.org
2021-04-06  6:51 ` zsojka at seznam dot cz
2021-04-06  6:53 ` [Bug target/99905] [8/9/10/11 Regression] wrong code with -mno-mmx -mno-sse zsojka at seznam dot cz
2021-04-06  7:07 ` [Bug target/99905] [8/9/10/11 Regression] wrong code with -mno-mmx -mno-sse since r7-4540-gb229ab2a712ccd44 marxin at gcc dot gnu.org
2021-04-06  8:00 ` rguenth at gcc dot gnu.org
2021-04-06 17:25 ` jakub at gcc dot gnu.org
2021-04-07  8:48 ` jakub at gcc dot gnu.org [this message]
2021-04-07  9:39 ` jakub at gcc dot gnu.org
2021-04-07  9:54 ` [Bug rtl-optimization/99905] " jakub at gcc dot gnu.org
2021-04-12 23:02 ` cvs-commit at gcc dot gnu.org
2021-04-12 23:03 ` [Bug rtl-optimization/99905] [8/9/10 " jakub at gcc dot gnu.org
2021-04-20  9:46 ` cvs-commit at gcc dot gnu.org
2021-04-20  9:52 ` [Bug rtl-optimization/99905] [8/9 " jakub at gcc dot gnu.org
2021-04-20 23:34 ` cvs-commit at gcc dot gnu.org
2021-04-22 16:52 ` cvs-commit at gcc dot gnu.org
2021-04-22 17:11 ` jakub 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-99905-4-sVkQpVVtzW@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).