diff options
author | Vikram S. Adve <vadve@cs.uiuc.edu> | 2001-08-06 21:06:10 +0000 |
---|---|---|
committer | Vikram S. Adve <vadve@cs.uiuc.edu> | 2001-08-06 21:06:10 +0000 |
commit | 22db4f9b7cc14607802c07d0e823fcceb21f017e (patch) | |
tree | f864ecc1513dd694479c1a95c63b8cf221a2de94 /llvm/lib/CodeGen | |
parent | 13090bd30333edfcbc576c11b082db87308c04c6 (diff) | |
download | bcm5719-llvm-22db4f9b7cc14607802c07d0e823fcceb21f017e.tar.gz bcm5719-llvm-22db4f9b7cc14607802c07d0e823fcceb21f017e.zip |
Add CC operand as 4th operand of SUBcc, and mark it as a def.
llvm-svn: 348
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/TargetMachine/Sparc/SparcInstrSelection.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/TargetMachine/Sparc/SparcInstrSelection.cpp b/llvm/lib/CodeGen/TargetMachine/Sparc/SparcInstrSelection.cpp index 901ad0053f4..b472febbddd 100644 --- a/llvm/lib/CodeGen/TargetMachine/Sparc/SparcInstrSelection.cpp +++ b/llvm/lib/CodeGen/TargetMachine/Sparc/SparcInstrSelection.cpp @@ -479,12 +479,11 @@ GetInstructionsByRule(InstructionNode* subtreeRoot, mvec[0] = new MachineInstr(SUBcc); Set3OperandsFromInstr(mvec[0], subtreeRoot, target, discardResult); - if (discardResult) - {// mark the "result" operand as being a CC register - mvec[0]->SetMachineOperand(2, MachineOperand::MO_CCRegister, - subtreeRoot->getValue()); - } - else + // mark the 4th operand as being a CC register, and a "result" + mvec[0]->SetMachineOperand(3, MachineOperand::MO_CCRegister, + subtreeRoot->getValue(), /*def*/ true); + + if (!discardResult) { // recompute bool if needed, using the integer condition codes if (result->getOpcode() == Instruction::SetNE) discardResult = true; |