public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rsandifo at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/115281] New: [14/15 Regression] aarch64 ICE in go_through_subreg after r14-5129
Date: Wed, 29 May 2024 16:44:56 +0000	[thread overview]
Message-ID: <bug-115281-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 115281
           Summary: [14/15 Regression] aarch64 ICE in go_through_subreg
                    after r14-5129
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rsandifo at gcc dot gnu.org
                CC: avieira at gcc dot gnu.org
  Target Milestone: ---
            Target: aarch64*-*-*

The following test ICEs with -O3 -mcpu=neoverse-v1 after r14-5129 (thanks to
Andre for the reproducer):

SUBROUTINE fn0(ma, mb, nt)
  CHARACTER ca
  REAL r0(ma)
  INTEGER i0(mb)
  REAL r1(3,mb)
  REAL r2(3,mb)
  REAL r3(3,3)
  zero=0.0
  do na = 1, nt
     nt = i0(na)
     do l = 1, 3
        r1 (l, na) =   r0 (nt)
        r2(l, na) = zero
     enddo
  enddo
  if (ca  .ne.'z') then
     do j = 1, 3
        do i = 1, 3
           r4  = zero
        enddo
     enddo
     do na = 1, nt
        do k =  1, 3
           do l = 1, 3
              do m = 1, 3
                 r3 = r4 * v
              enddo
           enddo
        enddo
     do i = 1, 3
           do k = 1, ifn (r3)
           enddo
        enddo
     enddo
     endif
END

The ICE is:

internal compiler error: in go_through_subreg, at ira-conflicts.cc:234
0x161647f go_through_subreg
        gnu/src/gcc/gcc/ira-conflicts.cc:234
0x1616657 process_regs_for_copy
        gnu/src/gcc/gcc/ira-conflicts.cc:270
0x1616fe8 process_reg_shuffles
        gnu/src/gcc/gcc/ira-conflicts.cc:440
0x1617b1b add_insn_allocno_copies
        gnu/src/gcc/gcc/ira-conflicts.cc:510
0x1617bcc add_copies
        gnu/src/gcc/gcc/ira-conflicts.cc:527
0x1600bed ira_traverse_loop_tree(bool, ira_loop_tree_node*, void
(*)(ira_loop_tree_node*), void (*)(ira_loop_tree_node*))
        gnu/src/gcc/gcc/ira-build.cc:1802
0x1618b38 ira_build_conflicts()
        gnu/src/gcc/gcc/ira-conflicts.cc:819
0x1605eb6 ira_build()
        gnu/src/gcc/gcc/ira-build.cc:3508
0x15fafe9 ira
        gnu/src/gcc/gcc/ira.cc:5793
0x15fba7f execute
        gnu/src/gcc/gcc/ira.cc:6117

I think this is a mode mix-up in go_through_subreg: we should be testing the
natural mode size of the REG that we're trying to split, rather than the mode
of the result.  (But we probably also need to handle paradoxical subregs
separately.)

             reply	other threads:[~2024-05-29 16:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-29 16:44 rsandifo at gcc dot gnu.org [this message]
2024-05-29 16:46 ` [Bug rtl-optimization/115281] " rsandifo at gcc dot gnu.org
2024-05-30 15:19 ` cvs-commit at gcc dot gnu.org
2024-05-30 15:22 ` [Bug rtl-optimization/115281] [14 " rsandifo at gcc dot gnu.org
2024-06-11  8:59 ` cvs-commit at gcc dot gnu.org
2024-06-11  8:59 ` rsandifo 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-115281-4@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).