[SystemZ] Use MVC for simple load/store pairs
authorRichard Sandiford <rsandifo@linux.vnet.ibm.com>
Tue, 9 Jul 2013 09:46:39 +0000 (09:46 +0000)
committerRichard Sandiford <rsandifo@linux.vnet.ibm.com>
Tue, 9 Jul 2013 09:46:39 +0000 (09:46 +0000)
commit2e015ef9bb40e5d9f98db9a9509b9986873089ea
treeb728ba79dcd6a132edb728055829e0bb6dce5d40
parentf6ea5e0d8007234fc74c1ff6ac2c3ca316c41d92
[SystemZ] Use MVC for simple load/store pairs

Look for patterns of the form (store (load ...), ...) in which the two
locations are known not to partially overlap.  (Identical locations are OK.)
These sequences are better implemented by MVC unless either the load or
the store could use RELATIVE LONG instructions.

The testcase showed that we weren't using LHRL and LGHRL for extload16,
only sextloadi16.  The patch fixes that too.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185919 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/SystemZ/SystemZISelDAGToDAG.cpp
lib/Target/SystemZ/SystemZInstrFP.td
lib/Target/SystemZ/SystemZInstrInfo.td
lib/Target/SystemZ/SystemZPatterns.td
test/CodeGen/SystemZ/fp-move-02.ll
test/CodeGen/SystemZ/memcpy-02.ll [new file with mode: 0644]