[Bug middle-end/47727] [x32] Many passes can't handle const symbol when Pmode != ptr_mode
rguenther at suse dot de
gcc-bugzilla@gcc.gnu.org
Mon Feb 14 14:28:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47727
--- Comment #6 from rguenther at suse dot de <rguenther at suse dot de> 2011-02-14 14:21:32 UTC ---
On Mon, 14 Feb 2011, hjl.tools at gmail dot com wrote:
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47727
>
> --- Comment #5 from H.J. Lu <hjl.tools at gmail dot com> 2011-02-14 13:51:27 UTC ---
> Does this patch make any senses?
>
> diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c
> index ce4eab4..e7e7890 100644
> --- a/gcc/simplify-rtx.c
> +++ b/gcc/simplify-rtx.c
> @@ -1099,10 +1099,13 @@ simplify_unary_operation_1 (enum rtx_code code, enum
> mac
> hine_mode mode, rtx op)
> #if defined(POINTERS_EXTEND_UNSIGNED) && !defined(HAVE_ptr_extend)
> /* As we do not know which address space the pointer is refering to,
> we can do this only if the target does not support different pointer
> - or address modes depending on the address space. */
> + or address modes depending on the address space. Since we will
> + generate new instructions, we must be currently emitting into a
> + sequence. */
> if (target_default_pointer_address_modes_p ()
> && POINTERS_EXTEND_UNSIGNED > 0
> && mode == Pmode && GET_MODE (op) == ptr_mode
> + && in_sequence_p ()
> && (CONSTANT_P (op)
> || (GET_CODE (op) == SUBREG
> && REG_P (SUBREG_REG (op))
Not really. simplify-rtx should never emit new instuctions. Probably
Ulrich, when introducing address-spaces didn't properly think about
this in convert_memory_address_addr_space ().
Richard.
More information about the Gcc-bugs
mailing list