diff options
author | Evan Cheng <evan.cheng@apple.com> | 2006-11-15 20:58:11 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2006-11-15 20:58:11 +0000 |
commit | 6ce7dc2a97260eea5fba414332796464912b9359 (patch) | |
tree | 52d4ff3a3a1db471710e4957aa0068a4800edef8 /lib/Target/PowerPC/PPCInstrInfo.cpp | |
parent | ddd2a4556a0b4d0e364de7087ccf1475fa23f39f (diff) | |
download | llvm-6ce7dc2a97260eea5fba414332796464912b9359.tar.gz llvm-6ce7dc2a97260eea5fba414332796464912b9359.tar.bz2 llvm-6ce7dc2a97260eea5fba414332796464912b9359.tar.xz |
Properly transfer kill / dead info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31765 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PowerPC/PPCInstrInfo.cpp')
-rw-r--r-- | lib/Target/PowerPC/PPCInstrInfo.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/Target/PowerPC/PPCInstrInfo.cpp b/lib/Target/PowerPC/PPCInstrInfo.cpp index 1eacf4a99d..d19fc16110 100644 --- a/lib/Target/PowerPC/PPCInstrInfo.cpp +++ b/lib/Target/PowerPC/PPCInstrInfo.cpp @@ -147,8 +147,18 @@ MachineInstr *PPCInstrInfo::commuteInstruction(MachineInstr *MI) const { // Swap op1/op2 unsigned Reg1 = MI->getOperand(1).getReg(); unsigned Reg2 = MI->getOperand(2).getReg(); + bool Reg1IsKill = MI->getOperand(1).isKill(); + bool Reg2IsKill = MI->getOperand(2).isKill(); MI->getOperand(2).setReg(Reg1); MI->getOperand(1).setReg(Reg2); + if (Reg1IsKill) + MI->getOperand(2).setIsKill(); + else + MI->getOperand(2).unsetIsKill(); + if (Reg2IsKill) + MI->getOperand(1).setIsKill(); + else + MI->getOperand(1).unsetIsKill(); // Swap the mask around. unsigned MB = MI->getOperand(4).getImmedValue(); |