public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "linkw at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/106419] ICE in lra_assign, at lra-assigns.cc:1649
Date: Tue, 26 Jul 2022 08:48:30 +0000 [thread overview]
Message-ID: <bug-106419-4-MZ7J7i2bqt@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-106419-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106419
Kewen Lin <linkw at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bergner at gcc dot gnu.org,
| |segher at gcc dot gnu.org,
| |vmakarov at gcc dot gnu.org
--- Comment #6 from Kewen Lin <linkw at gcc dot gnu.org> ---
>From the ICE point:
if (! lra_hard_reg_split_p && ! lra_asm_error_p && flag_checking)
/* Check correctness of allocation but only when there are no hard reg
splits and asm errors as in the case of errors explicit insns involving
hard regs are added or the asm is removed and this can result in
incorrect allocation. */
for (i = FIRST_PSEUDO_REGISTER; i < max_regno; i++)
if (lra_reg_info[i].nrefs != 0
&& reg_renumber[i] >= 0
&& overlaps_hard_reg_set_p (lra_reg_info[i].conflict_hard_regs,
PSEUDO_REGNO_MODE (i), reg_renumber[i]))
gcc_unreachable ();
this is similar to PR97978. I commented out the line gcc_unreachable(), the
resulted assembly looks fine to me. It's able to spill the value into one stack
slot, it's reloaded after the second indirect call (though the code is very
poor but it's at -Og).
mr 3,14 // ctr doesn't conflict with r3
mfctr 9
mtctr 9
stw 9,36(1) // saved
crxor 6,6,6
bctrl
mr 5,18
lwz 7,160(1)
mr 4,7
lwz 6,152(1)
mr 3,6
lwz 12,28(1)
mtctr 12
crxor 6,6,6
bctrl
lfs 0,.LC2@l(31)
lfs 12,0(24)
fcmpu 0,12,0
lwz 12,28(1)
lwz 6,152(1)
lwz 7,160(1)
lwz 9,36(1) // reload
mtctr 9 // make it live in ctr
IMHO, this is very likely a LRA issue, maybe the assert condition is too
strict.
next prev parent reply other threads:[~2022-07-26 8:48 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-23 9:09 [Bug rtl-optimization/106419] New: " asolokha at gmx dot com
2022-07-25 3:23 ` [Bug rtl-optimization/106419] " linkw at gcc dot gnu.org
2022-07-25 3:36 ` asolokha at gmx dot com
2022-07-25 5:58 ` linkw at gcc dot gnu.org
2022-07-25 7:47 ` asolokha at gmx dot com
2022-07-26 8:10 ` linkw at gcc dot gnu.org
2022-07-26 8:48 ` linkw at gcc dot gnu.org [this message]
2022-07-26 18:28 ` segher at gcc dot gnu.org
2022-07-26 18:31 ` segher at gcc dot gnu.org
2022-07-27 2:11 ` linkw at gcc dot gnu.org
2022-07-27 13:51 ` segher 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-106419-4-MZ7J7i2bqt@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).