[SystemZ] Rework compare and branch support
authorRichard Sandiford <rsandifo@linux.vnet.ibm.com>
Thu, 25 Jul 2013 09:34:38 +0000 (09:34 +0000)
committerRichard Sandiford <rsandifo@linux.vnet.ibm.com>
Thu, 25 Jul 2013 09:34:38 +0000 (09:34 +0000)
commitea14085be54540be2f5cb4b1444d972972d22c5f
tree9a7c5e041ac7ee53f9a4ccc6e6732470af378a84
parentbf99364f819465536a6b230b95735b239e3fc7a5
[SystemZ] Rework compare and branch support

Before the patch we took advantage of the fact that the compare and
branch are glued together in the selection DAG and fused them together
(where possible) while emitting them.  This seemed to work well in practice.
However, fusing the compare so early makes it harder to remove redundant
compares in cases where CC already has a suitable value.  This patch
therefore uses the peephole analyzeCompare/optimizeCompareInstr pair of
functions instead.

No behavioral change intended, but it paves the way for a later patch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187116 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/SystemZ/SystemZISelLowering.cpp
lib/Target/SystemZ/SystemZInstrFormats.td
lib/Target/SystemZ/SystemZInstrInfo.cpp
lib/Target/SystemZ/SystemZInstrInfo.h
lib/Target/SystemZ/SystemZInstrInfo.td
test/CodeGen/SystemZ/int-cmp-02.ll