[SystemZ] Extend memcpy and memset support to all constant lengths
authorRichard Sandiford <rsandifo@linux.vnet.ibm.com>
Tue, 27 Aug 2013 09:54:29 +0000 (09:54 +0000)
committerRichard Sandiford <rsandifo@linux.vnet.ibm.com>
Tue, 27 Aug 2013 09:54:29 +0000 (09:54 +0000)
commit842a1be06c53757e7498c9894abc1431b633a92f
treed784058c7258583429a11c277dd14f4cf3aff4e6
parentc9617b9a9dfcb550adcf06f83a58a5e522414cc1
[SystemZ] Extend memcpy and memset support to all constant lengths

Lengths up to a certain threshold (currently 6 * 256) use a series of MVCs.
Lengths above that threshold use a loop to handle X*256 bytes followed
by a single MVC to handle the excess (if any).  This loop will also be
needed in future when support for variable lengths is added.

Because the same tablegen classes are used to define MVC and CLC,
the patch also has the side-effect of defining a pseudo loop instruction
for CLC.  That instruction isn't used yet (and wouldn't be handled correctly
if it were).  I'm planning to use it soon though.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189331 91177308-0d34-0410-b5e6-96231b3b80d8
13 files changed:
lib/Target/SystemZ/SystemZISelLowering.cpp
lib/Target/SystemZ/SystemZISelLowering.h
lib/Target/SystemZ/SystemZInstrFP.td
lib/Target/SystemZ/SystemZInstrFormats.td
lib/Target/SystemZ/SystemZInstrInfo.td
lib/Target/SystemZ/SystemZOperands.td
lib/Target/SystemZ/SystemZOperators.td
lib/Target/SystemZ/SystemZSelectionDAGInfo.cpp
test/CodeGen/SystemZ/memcpy-01.ll
test/CodeGen/SystemZ/memset-01.ll
test/CodeGen/SystemZ/memset-02.ll
test/CodeGen/SystemZ/memset-03.ll
test/CodeGen/SystemZ/memset-04.ll