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/111822] [12/13/14 Regression] during RTL pass: lr_shrinkage ICE: in operator[], at vec.h:910 with -O2 -m32 -flive-range-shrinkage -fno-dce -fnon-call-exceptions since r12-5301-g045206450386bc
Date: Fri, 08 Mar 2024 08:13:58 +0000	[thread overview]
Message-ID: <bug-111822-4-XkxskZu1Rn@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-111822-4@http.gcc.gnu.org/bugzilla/>

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |wrong-code
          Component|rtl-optimization            |target

--- Comment #8 from Richard Biener <rguenth at gcc dot gnu.org> ---
I think it's split1 doing wrong.  We end up with

;; basic block 3, loop depth 0, count 118111600 (estimated locally, freq
1.0000), maybe hot
;;  prev block 2, next block 4, flags: (NEW, HOT_PARTITION, RTL, MODIFIED)
;;  pred:       2 [always]  count:118111600 (estimated locally, freq 1.0000)
(FALLTHRU)
;; bb 3 artificial_defs: { }
;; bb 3 artificial_uses: { u-1(6){ }u-1(7){ }u-1(16){ }u-1(19){ }}
;; lr  in
;; lr  use
;; lr  def
;; live  in
;; live  gen
;; live  kill
(note 124 10 126 3 [bb 3] NOTE_INSN_BASIC_BLOCK)
(jump_insn 126 124 127 3 (set (pc)
        (label_ref 125)) -1
     (nil)
 -> 125)
;;  succ:       6 [always]  count:118111600 (estimated locally, freq 1.0000)
;; lr  out
;; live  out

(barrier 127 126 84)
;; basic block 4, loop depth 0, count 0 (precise, freq 0.0000), probably never
executed
;;  prev block 3, next block 5, flags: (REACHABLE, HOT_PARTITION, RTL,
MODIFIED)
;;  pred:
;; bb 4 artificial_defs: { d-1(0){ }d-1(1){ }}
;; bb 4 artificial_uses: { u-1(6){ }u-1(7){ }u-1(16){ }u-1(19){ }}
;; lr  in        6 [bp] 7 [sp] 16 [argp] 19 [frame]
;; lr  use       6 [bp] 7 [sp] 16 [argp] 19 [frame]
;; lr  def       0 [ax] 1 [dx] 114 115
;; live  in      6 [bp] 7 [sp] 16 [argp] 19 [frame]
;; live  gen     0 [ax] 1 [dx] 114 115
;; live  kill
(code_label/s 84 127 86 4 13 (nil) [1 uses])
(note 86 84 93 4 [bb 4] NOTE_INSN_BASIC_BLOCK)
(insn 93 86 85 4 (set (reg:SI 115)
        (reg:SI 0 ax)) "t.ii":22:42 -1
     (expr_list:REG_DEAD (reg:SI 0 ax)

so block 4 is unreachable.  split1 does

   102: r122:DI#0=vec_concat([r98:SI],0)
    10: r102:DI#0=r122:DI#0
-      REG_EH_REGION 0xd
   124: NOTE_INSN_BASIC_BLOCK 3

that looks spurious, so possibly some other pass leaves around the dead EH.
Earlier this was

   10: r102:DI=[r98:SI]
      REG_EH_REGION 0xd
      ; pc falls through to BB 5

and STV2 changes this like

-   10: r102:DI=[r98:SI]
+  102: r122:DI#0=vec_concat([r98:SI],0)
+   10: r102:DI#0=r122:DI#0
       REG_EH_REGION 0xd
       ; pc falls through to BB 5

failing to move EH (or refuse the lowering).

Thus a target issue, even wrong-code I think as we now fail to catch
a trap by the [r98:SI] load.

  parent reply	other threads:[~2024-03-08  8:13 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-15  6:14 [Bug rtl-optimization/111822] New: [12/13/14 Regression] during RTL pass: lr_shrinkage ICE: in operator[], at vec.h:910 with -O2 -m32 -flive-range-shrinkage -fno-dce -fnon-call-exceptions zsojka at seznam dot cz
2023-10-16  7:22 ` [Bug rtl-optimization/111822] " rguenth at gcc dot gnu.org
2023-10-22 23:50 ` pinskia at gcc dot gnu.org
2023-10-23 20:48 ` sjames at gcc dot gnu.org
2023-10-23 22:36 ` [Bug rtl-optimization/111822] [12/13/14 Regression] during RTL pass: lr_shrinkage ICE: in operator[], at vec.h:910 with -O2 -m32 -flive-range-shrinkage -fno-dce -fnon-call-exceptions since r12-5301-g045206450386bc sjames at gcc dot gnu.org
2024-03-07 21:04 ` law at gcc dot gnu.org
2024-03-08  7:01 ` rguenth at gcc dot gnu.org
2024-03-08  7:13 ` zsojka at seznam dot cz
2024-03-08  7:50 ` rguenth at gcc dot gnu.org
2024-03-08  7:50 ` rguenth at gcc dot gnu.org
2024-03-08  8:13 ` rguenth at gcc dot gnu.org [this message]
2024-03-08  9:58 ` [Bug target/111822] " ubizjak at gmail dot com
2024-03-08 10:20 ` rguenth at gcc dot gnu.org
2024-03-08 12:59 ` ubizjak at gmail dot com
2024-03-08 13:02 ` rguenth at gcc dot gnu.org
2024-03-08 13:22 ` ubizjak at gmail dot com
2024-03-08 13:28 ` rguenth at gcc dot gnu.org
2024-03-10 10:33 ` ebotcazou at gcc dot gnu.org
2024-03-11  1:27 ` liuhongt at gcc dot gnu.org
2024-03-14  8:09 ` liuhongt at gcc dot gnu.org
2024-03-18 16:27 ` ubizjak at gmail dot com
2024-03-18 19:41 ` cvs-commit at gcc dot gnu.org
2024-03-19 15:57 ` cvs-commit at gcc dot gnu.org
2024-03-19 16:00 ` cvs-commit at gcc dot gnu.org
2024-03-19 16:01 ` 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-111822-4-XkxskZu1Rn@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).