[PATCH] rtlanal: Fix bits/bytes confusion in set_noop_p (PR68814)
Segher Boessenkool
segher@kernel.crashing.org
Fri Apr 15 00:35:00 GMT 2016
Hi,
This now also shows up on GCC 5, see PR70672. It there happens in
the jump1 pass already.
Is this okay to backport to 5 and 4.9?
Segher
On Wed, Dec 09, 2015 at 08:17:51PM +0000, Segher Boessenkool wrote:
> The meaning of ZERO_EXTRACT depends on BITS_BIG_ENDIAN, not on
> BYTES_BIG_ENDIAN. This caused PR68814.
>
> Testing in progress on powerpc64le-linux; if it passes, is this
> okay for trunk?
>
>
> Segher
>
>
> 2015-12-09 Segher Boessenkool <segher@kernel.crashing.org>
>
> PR rtl-optimization/68814
> * rtlanal.c (set_noop_p): Use BITS_BIG_ENDIAN instead of
> BYTES_BIG_ENDIAN.
> ---
> gcc/rtlanal.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/gcc/rtlanal.c b/gcc/rtlanal.c
> index 67098e5..f893bca 100644
> --- a/gcc/rtlanal.c
> +++ b/gcc/rtlanal.c
> @@ -1534,7 +1534,7 @@ set_noop_p (const_rtx set)
>
> if (GET_CODE (dst) == ZERO_EXTRACT)
> return rtx_equal_p (XEXP (dst, 0), src)
> - && ! BYTES_BIG_ENDIAN && XEXP (dst, 2) == const0_rtx
> + && !BITS_BIG_ENDIAN && XEXP (dst, 2) == const0_rtx
> && !side_effects_p (src);
>
> if (GET_CODE (dst) == STRICT_LOW_PART)
> --
> 1.9.3
More information about the Gcc-patches
mailing list