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 target/102057] ICE at -O2 in extract_constrain_insn, at recog.c:2670
Date: Wed, 25 Aug 2021 08:57:11 +0000	[thread overview]
Message-ID: <bug-102057-4-yL5aQq3Iwa@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-102057-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #1 from Uroš Bizjak <ubizjak at gmail dot com> ---
A recently added peephole is converting:

(insn 229 108 280 22 (parallel [
            (set (reg:CCZ 17 flags)
                (compare:CCZ (ashiftrt:SI (reg:SI 0 ax [orig:90 _12 ] [90])
                        (const_int 2 [0x2]))
                    (const_int 0 [0])))
            (set (reg:SI 0 ax [orig:90 _12 ] [90])
                (ashiftrt:SI (reg:SI 0 ax [orig:90 _12 ] [90])
                    (const_int 2 [0x2])))
        ]) "pr102057.c":32:31 740 {*ashrsi3_cmp}
     (nil))
(insn 280 229 231 22 (set (reg:SI 1 dx [141])
        (const_int 3 [0x3])) "pr102057.c":32:31 75 {*movsi_internal}
     (expr_list:REG_EQUIV (const_int 3 [0x3])
        (nil)))
(insn 231 280 114 22 (set (reg:SI 0 ax [orig:99 iftmp.13_29 ] [99])
        (if_then_else:SI (ne (reg:CCZ 17 flags)
                (const_int 0 [0]))
            (reg:SI 0 ax [orig:99 iftmp.13_29 ] [99])
            (reg:SI 1 dx [141]))) "pr102057.c":32:31 1140 {*movsicc_noc}
     (expr_list:REG_DEAD (reg:CCZ 17 flags)
        (expr_list:REG_DEAD (reg:SI 1 dx [141])
            (nil))))

to:

(insn 429 228 430 22 (parallel [
            (set (reg:CCZ 17 flags)
                (compare:CCZ (ashiftrt:SI (reg:SI 0 ax [orig:90 _12 ] [90])
                        (const_int 2 [0x2]))
                    (const_int 0 [0])))
            (set (reg:SI 41 r13 [orig:137 k ] [137])
                (ashiftrt:SI (reg:SI 0 ax [orig:90 _12 ] [90])
                    (const_int 2 [0x2])))
        ]) "pr102057.c":32:31 -1
     (nil))
(insn 430 429 431 22 (set (reg:SI 0 ax [orig:90 _12 ] [90])
        (const_int 3 [0x3])) "pr102057.c":32:31 -1
     (nil))
(insn 431 430 114 22 (set (reg:SI 0 ax [orig:90 _12 ] [90])
        (if_then_else:SI (ne (reg:CCZ 17 flags)
                (const_int 0 [0]))
            (reg:SI 41 r13 [orig:137 k ] [137])
            (reg:SI 0 ax [orig:90 _12 ] [90]))) "pr102057.c":32:31 -1
     (nil))

  reply	other threads:[~2021-08-25  8:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-25  8:29 [Bug target/102057] New: " haoxintu at gmail dot com
2021-08-25  8:57 ` ubizjak at gmail dot com [this message]
2021-08-25  9:03 ` [Bug target/102057] [12 Regression] " pinskia at gcc dot gnu.org
2021-08-25  9:14 ` ubizjak at gmail dot com
2021-08-25  9:45 ` ubizjak at gmail dot com
2021-08-26 15:27 ` cvs-commit at gcc dot gnu.org
2021-08-26 15:30 ` ubizjak 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-102057-4-yL5aQq3Iwa@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).