This patch fixes a bug in the bswap pass. In big-endian BIT_FIELD_REF uses
commite5c957b427075452786ddd4fda684fd27cffafc0
authorwilco <wilco@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 28 Jun 2016 13:57:47 +0000 (28 13:57 +0000)
committerwilco <wilco@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 28 Jun 2016 13:57:47 +0000 (28 13:57 +0000)
treec094454f4fad5edb0815ce22ddd5ab07dd9d866e
parentc7b3bdc885c8a0f6f7157e781a881c55c6cf3b30
This patch fixes a bug in the bswap pass.  In big-endian BIT_FIELD_REF uses
big-endian bit numbering so we need to adjust the bit position.
The existing version could potentially generate incorrect code however GCC
doesn't emit a BIT_FIELD_REF to access the low byte in a register, so the
symbolic number never matches in big-endian.

    gcc/
* tree-ssa-math-opts.c (find_bswap_or_nop_1): Adjust bitnumbering
for big-endian BIT_FIELD_REF.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@237822 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/tree-ssa-math-opts.c