diff options
author | Jim Grosbach <grosbach@apple.com> | 2011-08-29 22:24:09 +0000 |
---|---|---|
committer | Jim Grosbach <grosbach@apple.com> | 2011-08-29 22:24:09 +0000 |
commit | f8e1e3e729473b8b2b7ee6134b6417976af84d05 (patch) | |
tree | 6c399c1a488d4a634f696f6043cba6a3e65431b7 /lib/CodeGen/MachineInstr.cpp | |
parent | fff64ca9cfdcb8e2fd2e124fcda1c1053523afc6 (diff) |
Thumb2 parsing and encoding for IT blocks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138773 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/MachineInstr.cpp')
-rw-r--r-- | lib/CodeGen/MachineInstr.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/CodeGen/MachineInstr.cpp b/lib/CodeGen/MachineInstr.cpp index 03104f0aed..dd8cbe4e21 100644 --- a/lib/CodeGen/MachineInstr.cpp +++ b/lib/CodeGen/MachineInstr.cpp @@ -942,6 +942,10 @@ MachineInstr::findRegisterDefOperandIdx(unsigned Reg, bool isDead, bool Overlap, /// operand list that is used to represent the predicate. It returns -1 if /// none is found. int MachineInstr::findFirstPredOperandIdx() const { + // Don't call MCID.findFirstPredOperandIdx() because this variant + // is sometimes called on an instruction that's not yet complete, and + // so the number of operands is less than the MCID indicates. In + // particular, the PTX target does this. const MCInstrDesc &MCID = getDesc(); if (MCID.isPredicable()) { for (unsigned i = 0, e = getNumOperands(); i != e; ++i) |