This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] In DSE optimize replace_read even if a constant store needs shifting (PR middle-end/37135)
- From: Eric Botcazou <ebotcazou at adacore dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Kenneth Zadeck <zadeck at naturalbridge dot com>
- Date: Tue, 25 Nov 2008 18:40:16 +0100
- Subject: Re: [PATCH] In DSE optimize replace_read even if a constant store needs shifting (PR middle-end/37135)
- References: <20081124123521.GM17496@tyan-ft48-01.lab.bos.redhat.com>
> OT, I believe read_rtx is wrong for PDP-endian, guess it should bail out:
>
> access_size = shift + GET_MODE_SIZE (read_mode);
> + if (BYTES_BIG_ENDIAN != WORDS_BIG_ENDIAN)
> + return false;
>
> (or it could only bail out if access_size doesn't fit into a word
> and shift isn't a multiple of wordsize).
Yes, I agree that there is problem if the access is larger than a word.
Are many architectures PDP-like? If no, I'd just punt in this case.
--
Eric Botcazou