summaryrefslogtreecommitdiff
path: root/lib/Target/SystemZ/SystemZInstrInfo.cpp
diff options
context:
space:
mode:
authorRichard Sandiford <rsandifo@linux.vnet.ibm.com>2013-08-01 10:39:40 +0000
committerRichard Sandiford <rsandifo@linux.vnet.ibm.com>2013-08-01 10:39:40 +0000
commit8f0ad5ae8f2699f6ab13a229941a0b192273cae8 (patch)
tree9d0bb8af50d25824ea6549b972bee2930b765bba /lib/Target/SystemZ/SystemZInstrInfo.cpp
parent3237f88882eed8a67fa679f7071a5441c4306ac3 (diff)
downloadllvm-8f0ad5ae8f2699f6ab13a229941a0b192273cae8.tar.gz
llvm-8f0ad5ae8f2699f6ab13a229941a0b192273cae8.tar.bz2
llvm-8f0ad5ae8f2699f6ab13a229941a0b192273cae8.tar.xz
[SystemZ] Reuse CC results for integer comparisons with zero
This also fixes a bug in the predication of LR to LOCR: I'd forgotten that with these in-place instruction builds, the implicit operands need to be added manually. I think this was latent until now, but is tested by int-cmp-45.c. It also adds a CC valid mask to STOC, again tested by int-cmp-45.c. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187573 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/SystemZ/SystemZInstrInfo.cpp')
-rw-r--r--lib/Target/SystemZ/SystemZInstrInfo.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Target/SystemZ/SystemZInstrInfo.cpp b/lib/Target/SystemZ/SystemZInstrInfo.cpp
index 2b604a99fd..9913db7b0e 100644
--- a/lib/Target/SystemZ/SystemZInstrInfo.cpp
+++ b/lib/Target/SystemZ/SystemZInstrInfo.cpp
@@ -341,7 +341,8 @@ PredicateInstruction(MachineInstr *MI,
if (unsigned CondOpcode = getConditionalMove(Opcode)) {
MI->setDesc(get(CondOpcode));
MachineInstrBuilder(*MI->getParent()->getParent(), MI)
- .addImm(CCValid).addImm(CCMask);
+ .addImm(CCValid).addImm(CCMask)
+ .addReg(SystemZ::CC, RegState::Implicit);;
return true;
}
}