* [PATCH] cselib: Skip BImode while keeping track of subvalue relations [PR107088]
@ 2022-10-04 11:28 Stefan Schulze Frielinghaus
2022-10-06 2:48 ` Jeff Law
0 siblings, 1 reply; 4+ messages in thread
From: Stefan Schulze Frielinghaus @ 2022-10-04 11:28 UTC (permalink / raw)
To: gcc-patches; +Cc: Stefan Schulze Frielinghaus
For BImode get_narrowest_mode evaluates to QImode but BImode < QImode.
Thus FOR_EACH_MODE_UNTIL never reaches BImode and iterates until OImode
for which no wider mode exists so we end up with VOIDmode and fail.
Fixed by adding a size guard so we effectively skip BImode.
Bootstrap and regtest are currently running on x64. Assuming they pass
ok for mainline?
gcc/ChangeLog:
PR rtl-optimization/107088
* cselib.cc (new_cselib_val): Skip BImode while keeping track of
subvalue relations.
---
gcc/cselib.cc | 1 +
1 file changed, 1 insertion(+)
diff --git a/gcc/cselib.cc b/gcc/cselib.cc
index 9b582e5d3d6..2abc763a3f8 100644
--- a/gcc/cselib.cc
+++ b/gcc/cselib.cc
@@ -1571,6 +1571,7 @@ new_cselib_val (unsigned int hash, machine_mode mode, rtx x)
scalar_int_mode int_mode;
if (REG_P (x) && is_int_mode (mode, &int_mode)
+ && GET_MODE_SIZE (int_mode) > 1
&& REG_VALUES (REGNO (x)) != NULL
&& (!cselib_current_insn || !DEBUG_INSN_P (cselib_current_insn)))
{
--
2.37.3
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] cselib: Skip BImode while keeping track of subvalue relations [PR107088]
2022-10-04 11:28 [PATCH] cselib: Skip BImode while keeping track of subvalue relations [PR107088] Stefan Schulze Frielinghaus
@ 2022-10-06 2:48 ` Jeff Law
2022-10-06 7:06 ` Stefan Schulze Frielinghaus
0 siblings, 1 reply; 4+ messages in thread
From: Jeff Law @ 2022-10-06 2:48 UTC (permalink / raw)
To: gcc-patches
On 10/4/22 05:28, Stefan Schulze Frielinghaus via Gcc-patches wrote:
> For BImode get_narrowest_mode evaluates to QImode but BImode < QImode.
> Thus FOR_EACH_MODE_UNTIL never reaches BImode and iterates until OImode
> for which no wider mode exists so we end up with VOIDmode and fail.
> Fixed by adding a size guard so we effectively skip BImode.
>
> Bootstrap and regtest are currently running on x64. Assuming they pass
> ok for mainline?
>
> gcc/ChangeLog:
>
> PR rtl-optimization/107088
> * cselib.cc (new_cselib_val): Skip BImode while keeping track of
> subvalue relations.
OK. And FWIW, this fixes the various failures I saw in my tester due to
the cselib patches.
jeff
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] cselib: Skip BImode while keeping track of subvalue relations [PR107088]
2022-10-06 2:48 ` Jeff Law
@ 2022-10-06 7:06 ` Stefan Schulze Frielinghaus
2022-10-07 14:15 ` Jeff Law
0 siblings, 1 reply; 4+ messages in thread
From: Stefan Schulze Frielinghaus @ 2022-10-06 7:06 UTC (permalink / raw)
To: Jeff Law; +Cc: gcc-patches
On Wed, Oct 05, 2022 at 08:48:13PM -0600, Jeff Law via Gcc-patches wrote:
>
> On 10/4/22 05:28, Stefan Schulze Frielinghaus via Gcc-patches wrote:
> > For BImode get_narrowest_mode evaluates to QImode but BImode < QImode.
> > Thus FOR_EACH_MODE_UNTIL never reaches BImode and iterates until OImode
> > for which no wider mode exists so we end up with VOIDmode and fail.
> > Fixed by adding a size guard so we effectively skip BImode.
> >
> > Bootstrap and regtest are currently running on x64. Assuming they pass
> > ok for mainline?
> >
> > gcc/ChangeLog:
> >
> > PR rtl-optimization/107088
> > * cselib.cc (new_cselib_val): Skip BImode while keeping track of
> > subvalue relations.
>
> OK. And FWIW, this fixes the various failures I saw in my tester due to the
> cselib patches.
Thanks for testing, too! Out of curiosity which target is your tester?
I gave it a try on x64 and AArch64 for which bootstrap went fine and
regtest showed no difference, and of course, for s390x regtest went for
the better.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] cselib: Skip BImode while keeping track of subvalue relations [PR107088]
2022-10-06 7:06 ` Stefan Schulze Frielinghaus
@ 2022-10-07 14:15 ` Jeff Law
0 siblings, 0 replies; 4+ messages in thread
From: Jeff Law @ 2022-10-07 14:15 UTC (permalink / raw)
To: Stefan Schulze Frielinghaus; +Cc: gcc-patches
On 10/6/22 01:06, Stefan Schulze Frielinghaus wrote:
> On Wed, Oct 05, 2022 at 08:48:13PM -0600, Jeff Law via Gcc-patches wrote:
>> On 10/4/22 05:28, Stefan Schulze Frielinghaus via Gcc-patches wrote:
>>> For BImode get_narrowest_mode evaluates to QImode but BImode < QImode.
>>> Thus FOR_EACH_MODE_UNTIL never reaches BImode and iterates until OImode
>>> for which no wider mode exists so we end up with VOIDmode and fail.
>>> Fixed by adding a size guard so we effectively skip BImode.
>>>
>>> Bootstrap and regtest are currently running on x64. Assuming they pass
>>> ok for mainline?
>>>
>>> gcc/ChangeLog:
>>>
>>> PR rtl-optimization/107088
>>> * cselib.cc (new_cselib_val): Skip BImode while keeping track of
>>> subvalue relations.
>> OK. And FWIW, this fixes the various failures I saw in my tester due to the
>> cselib patches.
> Thanks for testing, too! Out of curiosity which target is your tester?
> I gave it a try on x64 and AArch64 for which bootstrap went fine and
> regtest showed no difference, and of course, for s390x regtest went for
> the better.
It's got at least one representative from most of the targets supported
by gcc.
http://law-sandy.freeddns.org:8080 will get you to the jenkins instance.
Jeff
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-10-07 14:15 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-04 11:28 [PATCH] cselib: Skip BImode while keeping track of subvalue relations [PR107088] Stefan Schulze Frielinghaus
2022-10-06 2:48 ` Jeff Law
2022-10-06 7:06 ` Stefan Schulze Frielinghaus
2022-10-07 14:15 ` Jeff Law
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).