Looking at PR77308, one of the issues is that the bswap optimization phase doesn...
authorWilco Dijkstra <wdijkstr@arm.com>
Wed, 16 Nov 2016 18:10:34 +0000 (18:10 +0000)
committerWilco Dijkstra <wilco@gcc.gnu.org>
Wed, 16 Nov 2016 18:10:34 +0000 (18:10 +0000)
commitdd784916f5a7bd522e8b27f274a3e9a6d14d892f
tree95cdedbc8770628bd05cade2f2c9927771d2d8e2
parent0af30954688a9dc1fccdc7579807cb1f46b6ebd6
Looking at PR77308, one of the issues is that the bswap optimization phase doesn't work on ARM.

Looking at PR77308, one of the issues is that the bswap optimization
phase doesn't work on ARM.  This is due to an odd check that uses
SLOW_UNALIGNED_ACCESS (which is always true on ARM).  Since the testcase
in PR77308 generates much better code with this patch (~13% fewer
instructions), it seems best to remove this check.

    gcc/
* tree-ssa-math-opts.c (bswap_replace): Remove test
of SLOW_UNALIGNED_ACCESS.

    testsuite/
* gcc.dg/optimize-bswapdi-3.c: Remove xfail.
* gcc.dg/optimize-bswaphi-1.c: Likewise.
* gcc.dg/optimize-bswapsi-2.c: Likewise.

From-SVN: r242506
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/optimize-bswapdi-3.c
gcc/testsuite/gcc.dg/optimize-bswaphi-1.c
gcc/testsuite/gcc.dg/optimize-bswapsi-2.c
gcc/tree-ssa-math-opts.c