[SystemZ] Fold more spills
authorRichard Sandiford <rsandifo@linux.vnet.ibm.com>
Wed, 3 Jul 2013 10:10:02 +0000 (10:10 +0000)
committerRichard Sandiford <rsandifo@linux.vnet.ibm.com>
Wed, 3 Jul 2013 10:10:02 +0000 (10:10 +0000)
commitfa487e83a83c260d6a50f3df00a0eb012553a912
treef6ddd72df044eaa9cabbce37fd4b04f64b978139
parentb81b477cd4392a51112c3af0659ea9fc176e74f1
[SystemZ] Fold more spills

Add a mapping from register-based <INSN>R instructions to the corresponding
memory-based <INSN>.  Use it to cut down on the number of spill loads.

Some instructions extend their operands from smaller fields, so this
required a new TSFlags field to say how big the unextended operand is.

This optimisation doesn't trigger for C(G)R and CL(G)R because in practice
we always combine those instructions with a branch.  Adding a test for every
other case probably seems excessive, but it did catch a missed optimisation
for DSGF (fixed in r185435).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185529 91177308-0d34-0410-b5e6-96231b3b80d8
60 files changed:
lib/Target/SystemZ/SystemZInstrFP.td
lib/Target/SystemZ/SystemZInstrFormats.td
lib/Target/SystemZ/SystemZInstrInfo.cpp
lib/Target/SystemZ/SystemZInstrInfo.h
lib/Target/SystemZ/SystemZInstrInfo.td
test/CodeGen/SystemZ/and-01.ll
test/CodeGen/SystemZ/and-03.ll
test/CodeGen/SystemZ/bswap-02.ll
test/CodeGen/SystemZ/bswap-03.ll
test/CodeGen/SystemZ/fp-add-01.ll
test/CodeGen/SystemZ/fp-add-02.ll
test/CodeGen/SystemZ/fp-cmp-01.ll
test/CodeGen/SystemZ/fp-cmp-02.ll
test/CodeGen/SystemZ/fp-conv-02.ll
test/CodeGen/SystemZ/fp-conv-03.ll
test/CodeGen/SystemZ/fp-conv-04.ll
test/CodeGen/SystemZ/fp-div-01.ll
test/CodeGen/SystemZ/fp-div-02.ll
test/CodeGen/SystemZ/fp-mul-01.ll
test/CodeGen/SystemZ/fp-mul-02.ll
test/CodeGen/SystemZ/fp-mul-03.ll
test/CodeGen/SystemZ/fp-mul-04.ll
test/CodeGen/SystemZ/fp-sqrt-01.ll
test/CodeGen/SystemZ/fp-sqrt-02.ll
test/CodeGen/SystemZ/fp-sub-01.ll
test/CodeGen/SystemZ/fp-sub-02.ll
test/CodeGen/SystemZ/int-add-02.ll
test/CodeGen/SystemZ/int-add-03.ll
test/CodeGen/SystemZ/int-add-04.ll
test/CodeGen/SystemZ/int-add-05.ll
test/CodeGen/SystemZ/int-add-08.ll
test/CodeGen/SystemZ/int-cmp-05.ll
test/CodeGen/SystemZ/int-cmp-06.ll
test/CodeGen/SystemZ/int-conv-01.ll
test/CodeGen/SystemZ/int-conv-02.ll
test/CodeGen/SystemZ/int-conv-03.ll
test/CodeGen/SystemZ/int-conv-04.ll
test/CodeGen/SystemZ/int-conv-05.ll
test/CodeGen/SystemZ/int-conv-06.ll
test/CodeGen/SystemZ/int-conv-07.ll
test/CodeGen/SystemZ/int-conv-08.ll
test/CodeGen/SystemZ/int-conv-09.ll
test/CodeGen/SystemZ/int-conv-10.ll
test/CodeGen/SystemZ/int-div-01.ll
test/CodeGen/SystemZ/int-div-02.ll
test/CodeGen/SystemZ/int-div-04.ll
test/CodeGen/SystemZ/int-div-05.ll
test/CodeGen/SystemZ/int-mul-02.ll
test/CodeGen/SystemZ/int-mul-03.ll
test/CodeGen/SystemZ/int-mul-04.ll
test/CodeGen/SystemZ/int-mul-08.ll
test/CodeGen/SystemZ/int-sub-01.ll
test/CodeGen/SystemZ/int-sub-02.ll
test/CodeGen/SystemZ/int-sub-03.ll
test/CodeGen/SystemZ/int-sub-04.ll
test/CodeGen/SystemZ/int-sub-05.ll
test/CodeGen/SystemZ/or-01.ll
test/CodeGen/SystemZ/or-03.ll
test/CodeGen/SystemZ/xor-01.ll
test/CodeGen/SystemZ/xor-03.ll