]> gcc.gnu.org Git - gcc.git/commit
aarch64: Use +mops to inline memset operations
authorKyrylo Tkachov <kyrylo.tkachov@arm.com>
Mon, 13 Dec 2021 14:14:21 +0000 (14:14 +0000)
committerKyrylo Tkachov <kyrylo.tkachov@arm.com>
Mon, 13 Dec 2021 15:16:32 +0000 (15:16 +0000)
commitd3bd985e799b63e2133e89870472ac36d06015d3
tree62305a321b88d3a922ae81fd0dca5977e3335e4c
parentbb768f8b45aa7ccf12774aa0c00b295032ee7c47
aarch64: Use +mops to inline memset operations

This 3rd patch in the series adds an inline sequence for the memset operation.
The aarch64-mops-memset-size-threshold param is added to control the size threshold for the sequence.
Its default setting is 256, which may seem a bit high, but it is consistent with the current
SIMD memset inline sequence limit, and future CPU tunings can override it easily as needed.

Bootstrapped and tested on aarch64-none-linux-gnu.

gcc/ChangeLog:

* config/aarch64/aarch64.c (aarch64_expand_setmem_mops): Define.
(aarch64_expand_setmem): Adjust for TARGET_MOPS.
* config/aarch64/aarch64.h (CLEAR_RATIO): Adjust for TARGET_MOPS.
(SET_RATIO): Likewise.
* config/aarch64/aarch64.md ("unspec"): Add UNSPEC_SETMEM.
(aarch64_setmemdi): Define.
(setmemdi): Adjust for TARGET_MOPS.
* config/aarch64/aarch64.opt (aarch64-mops-memset-size-threshold):
New param.

gcc/testsuite/ChangeLog:

* gcc.target/aarch64/mops_3.c: New test.
gcc/config/aarch64/aarch64.c
gcc/config/aarch64/aarch64.h
gcc/config/aarch64/aarch64.md
gcc/config/aarch64/aarch64.opt
gcc/testsuite/gcc.target/aarch64/mops_3.c [new file with mode: 0644]
This page took 0.06528 seconds and 6 git commands to generate.