S/390: Unroll mvc/xc loop for memset with small constant
commit2b1d59f58e7be5fc46bb909684aced798e6bc5f9
authorkrebbel <krebbel@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 5 Jan 2017 10:00:34 +0000 (5 10:00 +0000)
committerkrebbel <krebbel@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 5 Jan 2017 10:00:34 +0000 (5 10:00 +0000)
tree359ae5f5295cafe8d655cb920cf57715057aa482
parent4b6f12fba66073461c5b1ba6d9082486c00ece63
S/390: Unroll mvc/xc loop for memset with small constant
 lengths.

When expanding a memset we emit a loop of MVCs/XCs instructions dealing
with 256 byte blocks.  This loop used to get unrolled with older GCCs
when using constant length operands.  GCC lost this ability probably
when more of the loop unrolling stuff has been moved to tree level.

With this patch the unrolling is done manually when emitting the RTL
insns.

2017-01-05  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

* gcc.target/s390/memset-1.c: New test.

gcc/ChangeLog:

2017-01-05  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

* config/s390/s390.c (s390_expand_setmem): Unroll the loop for
small constant length operands.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@244097 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/config/s390/s390.c
gcc/testsuite/gcc.target/s390/memset-1.c [new file with mode: 0644]