* Fix calculation of ptr_mode for MODE_PARTIAL_INT Pmode
@ 2017-11-22 9:30 Richard Sandiford
2017-11-22 13:51 ` Richard Biener
0 siblings, 1 reply; 2+ messages in thread
From: Richard Sandiford @ 2017-11-22 9:30 UTC (permalink / raw)
To: gcc-patches
This patch fixes a regression caused by r251469, where I'd incorrectly
converted a call to mode_for_size that sometimes needs MODE_PARTIAL_INTs.
Tested on aarch64-linux-gnu, x86_64-linux-gnu and powerpc64le-linux-gnu.
Also spot-checked on msp430-elf. OK to install?
Richard
2017-11-22 Richard Sandiford <richard.sandiford@linaro.org>
gcc/
* emit-rtl.c (init_derived_machine_modes): Make sure ptr_mode
has the same mode class as Pmode.
Index: gcc/emit-rtl.c
===================================================================
--- gcc/emit-rtl.c 2017-11-22 09:21:12.560954668 +0000
+++ gcc/emit-rtl.c 2017-11-22 09:25:24.200002574 +0000
@@ -6003,7 +6003,8 @@ init_derived_machine_modes (void)
byte_mode = opt_byte_mode.require ();
word_mode = opt_word_mode.require ();
- ptr_mode = int_mode_for_size (POINTER_SIZE, 0).require ();
+ ptr_mode = as_a <scalar_int_mode>
+ (mode_for_size (POINTER_SIZE, GET_MODE_CLASS (Pmode), 0).require ());
}
/* Create some permanent unique rtl objects shared between all functions. */
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Fix calculation of ptr_mode for MODE_PARTIAL_INT Pmode
2017-11-22 9:30 Fix calculation of ptr_mode for MODE_PARTIAL_INT Pmode Richard Sandiford
@ 2017-11-22 13:51 ` Richard Biener
0 siblings, 0 replies; 2+ messages in thread
From: Richard Biener @ 2017-11-22 13:51 UTC (permalink / raw)
To: GCC Patches, Richard Sandiford
On Wed, Nov 22, 2017 at 10:26 AM, Richard Sandiford
<richard.sandiford@linaro.org> wrote:
> This patch fixes a regression caused by r251469, where I'd incorrectly
> converted a call to mode_for_size that sometimes needs MODE_PARTIAL_INTs.
>
> Tested on aarch64-linux-gnu, x86_64-linux-gnu and powerpc64le-linux-gnu.
> Also spot-checked on msp430-elf. OK to install?
Ok.
Richard.
> Richard
>
>
> 2017-11-22 Richard Sandiford <richard.sandiford@linaro.org>
>
> gcc/
> * emit-rtl.c (init_derived_machine_modes): Make sure ptr_mode
> has the same mode class as Pmode.
>
> Index: gcc/emit-rtl.c
> ===================================================================
> --- gcc/emit-rtl.c 2017-11-22 09:21:12.560954668 +0000
> +++ gcc/emit-rtl.c 2017-11-22 09:25:24.200002574 +0000
> @@ -6003,7 +6003,8 @@ init_derived_machine_modes (void)
>
> byte_mode = opt_byte_mode.require ();
> word_mode = opt_word_mode.require ();
> - ptr_mode = int_mode_for_size (POINTER_SIZE, 0).require ();
> + ptr_mode = as_a <scalar_int_mode>
> + (mode_for_size (POINTER_SIZE, GET_MODE_CLASS (Pmode), 0).require ());
> }
>
> /* Create some permanent unique rtl objects shared between all functions. */
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-11-22 13:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-22 9:30 Fix calculation of ptr_mode for MODE_PARTIAL_INT Pmode Richard Sandiford
2017-11-22 13:51 ` Richard Biener
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).