From: Jeff Law <jeffreyalaw@gmail.com>
To: Vineet Gupta <vineetg@rivosinc.com>,
Jeff Law <jlaw@ventanamicro.com>,
"gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Subject: Re: RV64 Zicond ICE (was Re: [committed][RISC-V]Don't reject constants in cmov condition)
Date: Tue, 8 Aug 2023 11:46:53 -0600 [thread overview]
Message-ID: <0ecc3144-c00e-6964-0bb1-b4102cfca8f0@gmail.com> (raw)
In-Reply-To: <c34f52b5-67f7-cbda-fb38-e76e4447056c@rivosinc.com>
On 8/8/23 11:21, Vineet Gupta wrote:
> Hi Jeff,
>
> On 8/7/23 13:36, Jeff Law wrote:
>>
>> This test is too aggressive. Constants have VOIDmode, so we need to
>> let the through this phase of conditional move support.
>>
>> Fixes several missed conditional moves with the trunk.
>>
>> Committed to the trunk,
>
> As discussed this morning, this triggers an ICE when building glibc for
> rv64_zicond
>
> programs/ld-ctype.c:3977:1: error: unrecognizable insn:
> 3977 | }
> | ^
> (insn 238 237 239 18 (set (reg:SI 727)
> (if_then_else:SI (eq:SI (reg:SI 725)
> (const_int 0 [0]))
> (const_int 0 [0])
> (reg:SI 721))) -1
> (nil))
> during RTL pass: vregs
> programs/ld-ctype.c:3977:1: internal compiler error: in extract_insn, at
> recog.cc:2791
> 0x885de7 _fatal_insn(char const*, rtx_def const*, char const*, int, char
> const*) ../.././gcc/gcc/rtl-error.cc:108
> 0x885e09 _fatal_insn_not_found(rtx_def const*, char const*, int, char
> const*) ../.././gcc/gcc/rtl-error.cc:116
> 0x8846f9 extract_insn(rtx_insn*) ../.././gcc/gcc/recog.cc:2791
> 0xcf77ae instantiate_virtual_regs_in_insn ../.././gcc/gcc/function.cc:1610
> 0xcf77ae instantiate_virtual_regs ../.././gcc/gcc/function.cc:1983
> 0xcf77ae execute ../.././gcc/gcc/function.cc:2030
>
> Here's the reduced reproducer.
>
> a, c;
> long b;
> d() {
> for (;;)
> if (a & (b < 8 ?: 1 << b))
> c = 1;
> }
>
> I'll try to muster a fix :-)
:-) That's even simpler than the one I just reduced. But I can see the
same basic structure in my reduced case.
I'll take it from here. I mucked something up, so I feel I ought to fix it.
jeff
next prev parent reply other threads:[~2023-08-08 17:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-07 20:36 [committed][RISC-V]Don't reject constants in cmov condition Jeff Law
2023-08-07 23:42 ` Vineet Gupta
2023-08-08 14:27 ` Jeff Law
2023-08-08 17:21 ` RV64 Zicond ICE (was Re: [committed][RISC-V]Don't reject constants in cmov condition) Vineet Gupta
2023-08-08 17:46 ` Jeff Law [this message]
2023-08-08 21:41 ` Jeff Law
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=0ecc3144-c00e-6964-0bb1-b4102cfca8f0@gmail.com \
--to=jeffreyalaw@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jlaw@ventanamicro.com \
--cc=vineetg@rivosinc.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).