]> git.ipfire.org Git - thirdparty/gcc.git/commit
Limit movmem copies to TImode on AArch64
authorTamar Christina <tamar.christina@arm.com>
Thu, 30 Aug 2018 10:40:07 +0000 (10:40 +0000)
committerTamar Christina <tnfchris@gcc.gnu.org>
Thu, 30 Aug 2018 10:40:07 +0000 (10:40 +0000)
commitf7e1d19d58660dee3fb0bd41496610a343f93e45
tree9260b896db0bc13a11c812bd438f016bc728b63c
parentc729951e9c51dabfc3ab7ef864ab2ab8b07b5934
Limit movmem copies to TImode on AArch64

On AArch64 we have integer modes larger than TImode, and while we can generate
moves for these they're not as efficient.

So instead make sure we limit the maximum we can copy to TImode.  This means
copying a 16 byte struct will issue 1 TImode copy, which will be done using a
single STP as we expect but an CImode sized copy won't issue CImode operations.

I am also moving the residual code inside the if since smallest_mode_for_int may
trap if the mode doesn't exist.  And the only time we know the mode to exist for
sure is when the condition of the if is true.  This also saves repeated calls to
the iterator.

gcc/
2018-08-30  Tamar Christina  <tamar.christina@arm.com>

* config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.

gcc/testsuite/
2018-08-30  Tamar Christina  <tamar.christina@arm.com>

  * gcc.target/aarch64/large_struct_copy_2.c: New.

From-SVN: r263974
gcc/ChangeLog
gcc/config/aarch64/aarch64.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/aarch64/large_struct_copy_2.c [new file with mode: 0644]