rtlanal: Fix bits/bytes confusion in set_noop_p (PR68814)
authorsegher <segher@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 10 Dec 2015 23:47:31 +0000 (23:47 +0000)
committersegher <segher@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 10 Dec 2015 23:47:31 +0000 (23:47 +0000)
The meaning of ZERO_EXTRACT depends on BITS_BIG_ENDIAN, not on
BYTES_BIG_ENDIAN.  This caused PR68814.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@231547 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/rtlanal.c

index 27ccfc8..d662229 100644 (file)
@@ -1,3 +1,9 @@
+2015-12-11  Segher Boessenkool  <segher@kernel.crashing.org>
+
+       PR rtl-optimization/68814
+       * rtlanal.c (set_noop_p): Use BITS_BIG_ENDIAN instead of
+       BYTES_BIG_ENDIAN.
+
 2015-12-10  Nathan Sidwell  <nathan@acm.org>
 
        * config/nvptx/nvptx.c (nvptx_function_arg,
index 67098e5..f893bca 100644 (file)
@@ -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)