This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] In DSE optimize replace_read even if a constant store needs shifting (PR middle-end/37135)


> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]