aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-loop-im.c
diff options
context:
space:
mode:
authorAlex Coplan <Alex.Coplan@arm.com>2020-05-05 10:33:02 +0100
committerKyrylo Tkachov <kyrylo.tkachov@arm.com>2020-05-05 10:40:24 +0100
commit1bd3a8af85356e64ec27309dba7fb2fca2343ffe (patch)
tree82e6a35e4ea6ff96000b7046de3aae5c34d19091 /gcc/tree-ssa-loop-im.c
parent144aee70b80de50f96a97ee64edd2f1c237c4906 (diff)
downloadgcc-1bd3a8af85356e64ec27309dba7fb2fca2343ffe.zip
gcc-1bd3a8af85356e64ec27309dba7fb2fca2343ffe.tar.gz
gcc-1bd3a8af85356e64ec27309dba7fb2fca2343ffe.tar.bz2
aarch64: eliminate redundant zero extend after bitwise negation
The attached patch eliminates a redundant zero extend from the AArch64 backend. Given the following C code: unsigned long long foo(unsigned a) { return ~a; } prior to this patch, AArch64 GCC at -O2 generates: foo: mvn w0, w0 uxtw x0, w0 ret but the uxtw is redundant, since the mvn clears the upper half of the x0 register. After applying this patch, GCC at -O2 gives: foo: mvn w0, w0 ret Testing: Added regression test which passes after applying the change to aarch64.md. Full bootstrap and regression on aarch64-linux with no additional failures. * config/aarch64/aarch64.md (*one_cmpl_zero_extend): New. * gcc.target/aarch64/mvn_zero_ext.c: New test.
Diffstat (limited to 'gcc/tree-ssa-loop-im.c')
0 files changed, 0 insertions, 0 deletions