public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "yangyujie at loongson dot cn" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/106462] New: LRA on mips64el: unable to reload (subreg:SI (reg:DI)) constrained by "f"
Date: Thu, 28 Jul 2022 07:49:53 +0000	[thread overview]
Message-ID: <bug-106462-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 106462
           Summary: LRA on mips64el: unable to reload (subreg:SI (reg:DI))
                    constrained by "f"
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: yangyujie at loongson dot cn
  Target Milestone: ---

Created attachment 53368
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53368&action=edit
-freport-bug dump

Hi,
compiling the following code with gcc 13.0.0 20220728
(mips64el-linux-gnuabi64):

extern void bar (float x, short y);

void foo (int argc)
{
    short c = argc * 2;
    float a = (float)(short)c, b = 9.5;

    bar (b/a, c);
}

failed with:

mips64el-linux-gnuabi64-gcc fail.c -O1 -mabi=64 -msingle-float -S -o /dev/null
fail.c: In function 'foo':
fail.c:9:1: error: unable to find a register to spill
    9 | }
      | ^
fail.c:9:1: error: this is the insn:
(insn 12 27 15 2 (set (reg:SF 202 [ a ])
        (float:SF (subreg/s/u:SI (reg/v:DI 209 [orig:197 c ] [197]) 0)))
"fail.c":6:11 270 {floatsisf2}
     (expr_list:REG_DEAD (reg/v:DI 209 [orig:197 c ] [197])
        (nil)))
during RTL pass: reload
fail.c:9:1: internal compiler error: in lra_split_hard_reg_for, at
lra-assigns.cc:1871
Please submit a full bug report, with preprocessed source.
See <https://gcc.gnu.org/bugs/> for instructions.
Preprocessed source stored into /tmp/ccZs64gB.out file, please attach this to
your bugreport.


This bug is also reproducible on gcc-8.3.0, so it seems to be around for quite
a while.

             reply	other threads:[~2022-07-28  7:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-28  7:49 yangyujie at loongson dot cn [this message]
2022-07-28  8:01 ` [Bug target/106462] " yangyujie at loongson dot cn
2022-11-18 15:09 ` vmakarov at gcc dot gnu.org
2022-11-19  9:32 ` yangyujie at loongson dot cn
2022-11-19  9:33 ` yangyujie at loongson dot cn
2022-12-02 13:24 ` cvs-commit 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-106462-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).