public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "stefansf at linux dot ibm.com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/107088] [13 Regression] cselib ICE building __trunctfxf2 on ia64
Date: Thu, 29 Sep 2022 18:33:54 +0000	[thread overview]
Message-ID: <bug-107088-4-VfQRj3EDyR@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-107088-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #1 from Stefan Schulze Frielinghaus <stefansf at linux dot ibm.com> ---
The patch introduces

scalar_int_mode int_mode;
if (REG_P (x) && is_int_mode (mode, &int_mode)
    && REG_VALUES (REGNO (x)) != NULL
    && (!cselib_current_insn || !DEBUG_INSN_P (cselib_current_insn)))
  {
    rtx copy = shallow_copy_rtx (x);
    scalar_int_mode narrow_mode_iter;
    FOR_EACH_MODE_UNTIL (narrow_mode_iter, int_mode)   // <--------
      {
        PUT_MODE_RAW (copy, narrow_mode_iter);
        cselib_val *v = cselib_lookup (copy, narrow_mode_iter, 0, VOIDmode);
        if (v)
          {
            rtx sub = lowpart_subreg (narrow_mode_iter, e->val_rtx, int_mode);
            if (sub)
              new_elt_loc_list (v, sub);
          }
      }
  }

The failing assert is at the for-loop which is supposed to iterate only over
integer modes up to int_mode. I'm not familiar with ia64; is there any machine
which I could use for debugging?

The failing assert is

gcc_checking_assert (m_mode != E_VOIDmode);

which is triggered by get_known_wider. Would be interesting to see the initial
value of int_mode and if/how FOR_EACH_MODE_UNTIL actually ends up with
E_VOIDmode.

  reply	other threads:[~2022-09-29 18:33 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-29 17:37 [Bug middle-end/107088] New: " jsm28 at gcc dot gnu.org
2022-09-29 18:33 ` stefansf at linux dot ibm.com [this message]
2022-09-29 18:59 ` [Bug middle-end/107088] " rguenth at gcc dot gnu.org
2022-09-29 19:13 ` rguenth at gcc dot gnu.org
2022-09-29 19:14 ` rguenth at gcc dot gnu.org
2022-09-30  8:07 ` stefansf at linux dot ibm.com
2022-09-30 11:22 ` stefansf at linux dot ibm.com
2022-09-30 11:43 ` ams at gcc dot gnu.org
2022-09-30 11:49 ` rsandifo at gcc dot gnu.org
2022-09-30 11:56 ` ams at gcc dot gnu.org
2022-10-04 11:38 ` stefansf at linux dot ibm.com
2022-10-06  6:47 ` cvs-commit at gcc dot gnu.org
2022-10-06  7:38 ` rguenth 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-107088-4-VfQRj3EDyR@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).