aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/MachineInstr.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-08-03 21:51:45 +0000
committerChris Lattner <sabre@nondot.org>2003-08-03 21:51:45 +0000
commite109de3166484d9d2e111efd44bc05a60bd8b056 (patch)
tree23ed033b603599a7bb26e9dcdb7717c5f71441a6 /lib/CodeGen/MachineInstr.cpp
parent4cc662b0ef29bd0201e49a841e0c3a8acaa3753e (diff)
Simplify code, eliminating the need for the X86 isVoid target instr flag
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7534 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/MachineInstr.cpp')
-rw-r--r--lib/CodeGen/MachineInstr.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/CodeGen/MachineInstr.cpp b/lib/CodeGen/MachineInstr.cpp
index f53e8dcb7d..d51c8071f7 100644
--- a/lib/CodeGen/MachineInstr.cpp
+++ b/lib/CodeGen/MachineInstr.cpp
@@ -126,10 +126,11 @@ MachineInstr::SetMachineOperandReg(unsigned i,
operands[i].value = NULL;
operands[i].regNum = regNum;
- if (isdef || TargetInstrDescriptors[opCode].resultPos == (int) i)
+ if (isdef || TargetInstrDescriptors[opCode].resultPos == (int)i) {
+ assert(operands[i].flags == MachineOperand::DEFONLYFLAG &&
+ "Shouldn't be changing a register type once set!");
operands[i].flags = MachineOperand::DEFONLYFLAG;
- else
- operands[i].flags = 0;
+ }
insertUsedReg(regNum);
}