aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineInstr.cpp
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2011-08-29 22:24:09 +0000
committerJim Grosbach <grosbach@apple.com>2011-08-29 22:24:09 +0000
commited16ec42488f535d77d5b48d7a9c4213f94672c3 (patch)
tree93183957f0e1ab0c11b377b12e0625e30317f9ac /llvm/lib/CodeGen/MachineInstr.cpp
parentabc11aa3bcce2fd7a09d997e65684ec247a5d700 (diff)
downloadllvm-ed16ec42488f535d77d5b48d7a9c4213f94672c3.zip
llvm-ed16ec42488f535d77d5b48d7a9c4213f94672c3.tar.gz
llvm-ed16ec42488f535d77d5b48d7a9c4213f94672c3.tar.bz2
Thumb2 parsing and encoding for IT blocks.
llvm-svn: 138773
Diffstat (limited to 'llvm/lib/CodeGen/MachineInstr.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineInstr.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/MachineInstr.cpp b/llvm/lib/CodeGen/MachineInstr.cpp
index 03104f0..dd8cbe4 100644
--- a/llvm/lib/CodeGen/MachineInstr.cpp
+++ b/llvm/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)