On AArch64 the UXTB and UXTH instructions are aliases of UBFM,
commit2c44ece6b9a5993e5cc07f573ac313f0259b2a1d
authorwilco <wilco@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 28 Jul 2016 14:34:41 +0000 (28 14:34 +0000)
committerwilco <wilco@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 28 Jul 2016 14:34:41 +0000 (28 14:34 +0000)
treeb4e6979e9b9496ff2dcd879e250d4ca26ddc2176
parent9b820efefdd7b3ed5ec5cc54cd93abbf7a3c53a9
On AArch64 the UXTB and UXTH instructions are aliases of UBFM,
which does a shift as part of its operation. An AND immediate is a
simpler operation, and might be faster on some implementations, so
it is better to emit this this instead of UBFM.

Benchmarking showed no difference on implementations where UBFM has
the same performance as AND, and minor speedups across several
benchmarks on an implementation where UBFM is slower than AND.

Bootstrapped and tested on aarch64-none-elf.

    gcc/
* config/aarch64/aarch64.md
(zero_extend<SHORT:mode><GPI:mode>2_aarch64): Change output
statement and type.
(<optab>qihi2_aarch64): Likewise, and split into two.
(extendqihi2_aarch64): New.
(zero_extendqihi2_aarch64): New.
* config/aarch64/iterators.md (ldrxt): Remove.
* config/aarch64/aarch64.c (aarch64_rtx_costs): Change cost of
uxtb/uxth.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@238821 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/config/aarch64/aarch64.c
gcc/config/aarch64/aarch64.md
gcc/config/aarch64/iterators.md