public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [Committed] Fix subreg_promoted_mode breakage on various platforms
@ 2021-08-31 16:33 Roger Sayle
  2021-09-01  6:55 ` Christophe LYON
  0 siblings, 1 reply; 2+ messages in thread
From: Roger Sayle @ 2021-08-31 16:33 UTC (permalink / raw)
  To: 'GCC Patches'

My apologies for the inconvenience.  My recent patch to preserve
SUBREG_PROMOTED_VAR_P on (extend:HI (subreg/s:QI (reg:SI))), and other
places in the middle-end, has broken the build on several targets.

The change to convert_modes inadvertently used the same
subreg_promoted_mode idiom for retrieving the mode of a SUBREG_REG
as the existing code just a few lines earlier.  Alas in the meantime,
the original SUBREG gets replaced by one without SUBREG_PROMOTED_VAR_P,
the whole raison-d'etre for my patch, and I'd not realized/noticed
that subreg_promoted_mode asserts for this.  Alas neither the bootstrap
and regression test on x86_64-pc-linux-gnu nor my testing on nvptx-none
must have hit this particular case.  The logic of this transformation
is sound, it's the implementation that's bitten me.

This patch has been committed, after another "make bootstrap" on
x86_64-pc-linux-gnu (just in case), and confirmation/pre-approval
from Jeff Law that this indeed fixes the build failures seen on
several platforms.

My humble apologies again.

2021-08-31  Roger Sayle  <roger@nextmovesoftware.com>

gcc/ChangeLog
	* expr.c (convert_modes): Don't use subreg_promoted_mode on a
	SUBREG if it can't be guaranteed to a SUBREG_PROMOTED_VAR_P set.
	Instead use the standard (safer) is_a <scalar_int_mode> idiom.

Roger
--



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Committed] Fix subreg_promoted_mode breakage on various platforms
  2021-08-31 16:33 [Committed] Fix subreg_promoted_mode breakage on various platforms Roger Sayle
@ 2021-09-01  6:55 ` Christophe LYON
  0 siblings, 0 replies; 2+ messages in thread
From: Christophe LYON @ 2021-09-01  6:55 UTC (permalink / raw)
  To: Roger Sayle, 'GCC Patches'


On 31/08/2021 18:33, Roger Sayle wrote:
> My apologies for the inconvenience.  My recent patch to preserve
> SUBREG_PROMOTED_VAR_P on (extend:HI (subreg/s:QI (reg:SI))), and other
> places in the middle-end, has broken the build on several targets.
>
> The change to convert_modes inadvertently used the same
> subreg_promoted_mode idiom for retrieving the mode of a SUBREG_REG
> as the existing code just a few lines earlier.  Alas in the meantime,
> the original SUBREG gets replaced by one without SUBREG_PROMOTED_VAR_P,
> the whole raison-d'etre for my patch, and I'd not realized/noticed
> that subreg_promoted_mode asserts for this.  Alas neither the bootstrap
> and regression test on x86_64-pc-linux-gnu nor my testing on nvptx-none
> must have hit this particular case.  The logic of this transformation
> is sound, it's the implementation that's bitten me.
>
> This patch has been committed, after another "make bootstrap" on
> x86_64-pc-linux-gnu (just in case), and confirmation/pre-approval
> from Jeff Law that this indeed fixes the build failures seen on
> several platforms.
>
> My humble apologies again.


Thanks, I confirm it fixes the aarch64 build too. Sorry for the delay.

Christophe


>
> 2021-08-31  Roger Sayle  <roger@nextmovesoftware.com>
>
> gcc/ChangeLog
> 	* expr.c (convert_modes): Don't use subreg_promoted_mode on a
> 	SUBREG if it can't be guaranteed to a SUBREG_PROMOTED_VAR_P set.
> 	Instead use the standard (safer) is_a <scalar_int_mode> idiom.
>
> Roger
> --
>
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-09-01  6:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-31 16:33 [Committed] Fix subreg_promoted_mode breakage on various platforms Roger Sayle
2021-09-01  6:55 ` Christophe LYON

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).