From: Andras Tantos <andras@tantosonline.com>
To: Andrew Pinski <pinskia@gmail.com>
Cc: gcc@gcc.gnu.org
Subject: Re: What's wrong with this RTL?
Date: Mon, 10 Jan 2022 20:15:33 -0800 [thread overview]
Message-ID: <e498bf960d478ee7c45ca4670710540ce9eeef46.camel@tantosonline.com> (raw)
In-Reply-To: <CA+=Sn1kpMPAnVX186yuHXAgmDdd04oTUqFqxHvqjZ=XN8HcYhw@mail.gmail.com>
On Sun, 2022-01-09 at 22:19 -0800, Andrew Pinski wrote:
> On Sun, Jan 9, 2022 at 8:49 PM Andras Tantos <andras@tantosonline.com
> > wrote:
> > All!
> >
> > I'm trying to port GCC to a new target, I call 'brew'. I've based
> > it on
> > the Moxie target mostly because of it's simplicity.
> >
> > I must be doing something horribly wrong as the following C code
> > crokes
> > in the LRA path:
> >
> > long long foo (long long a, long long *w)
> > {
> > return __builtin_add_overflow (a, a, w);
> > }
> >
> > The error message I get is the following:
> >
> > during RTL pass: reload
> > ../brew-gcc-build/second.c: In function ‘foo’:
> > ../brew-gcc-build/second.c:5:1: internal compiler error: maximum
> > number of generated reload insns per insn achieved (90)
> > 5 | }
> > | ^
> > 0xd23854 lra_constraints(bool)
> > ../../brew-gcc/gcc/lra-constraints.c:5095
> > 0xd10322 lra(_IO_FILE*)
> > ../../brew-gcc/gcc/lra.c:2336
> > 0xcc86d9 do_reload
> > ../../brew-gcc/gcc/ira.c:5932
> > 0xcc86d9 execute
> > ../../brew-gcc/gcc/ira.c:6118
> > Please submit a full bug report,
> > with preprocessed source if appropriate.
> > Please include the complete backtrace with any bug report.
> > See <https://gcc.gnu.org/bugs/> for instructions.
>
> This usually means the move instruction is being reloaded over and
> over again as you describe below.
> I think you should have one merged movsi instruction which handles
> all
> of the constraints together. mov is "special" in that it needs to be
> done that way otherwise this happens.
> But really there seems to be another issue where (subreg:SI (reg:DI))
> is not being accepted for the xor set too.
> What regclasses are being chosen for the reg DI mode? Etc.
>
> Thanks,
> Andrew Pinski
>
That's what it was: after merging all my movsi variants, the problem
went away.
Thanks for the help!
Andras
prev parent reply other threads:[~2022-01-11 4:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-10 4:48 Andras Tantos
2022-01-10 6:19 ` Andrew Pinski
2022-01-11 4:15 ` Andras Tantos [this message]
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=e498bf960d478ee7c45ca4670710540ce9eeef46.camel@tantosonline.com \
--to=andras@tantosonline.com \
--cc=gcc@gcc.gnu.org \
--cc=pinskia@gmail.com \
/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).