summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2010-11-17 00:55:36 +0000
committerEric Christopher <echristo@apple.com>2010-11-17 00:55:36 +0000
commitbcc230a7653624d5e2854e4718dbf9fe07aacd9f (patch)
tree56ff3599b8c1656c28e2e3a69cd5d0a6e871aa54
parent80e6db9c797a831cf2abaf3d76aa49dc683ee65f (diff)
downloadbcm5719-llvm-bcc230a7653624d5e2854e4718dbf9fe07aacd9f.tar.gz
bcm5719-llvm-bcc230a7653624d5e2854e4718dbf9fe07aacd9f.zip
Only avoid the check if we're the last operand before the variable
operands in a variadic instruction. llvm-svn: 119446
-rw-r--r--llvm/lib/CodeGen/MachineVerifier.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/MachineVerifier.cpp b/llvm/lib/CodeGen/MachineVerifier.cpp
index 47a94b35c76..f92b7fe5ac7 100644
--- a/llvm/lib/CodeGen/MachineVerifier.cpp
+++ b/llvm/lib/CodeGen/MachineVerifier.cpp
@@ -558,9 +558,9 @@ MachineVerifier::visitMachineOperand(const MachineOperand *MO, unsigned MONum) {
else if (MO->isImplicit())
report("Explicit definition marked as implicit", MO, MONum);
} else if (MONum < TI.getNumOperands()) {
- // Don't check if it's a variadic instruction. See, e.g., LDM_RET in the arm
- // back end.
- if (MO->isReg() && MONum != TI.getNumOperands()-1) {
+ // Don't check if it's the last operand in a variadic instruction. See,
+ // e.g., LDM_RET in the arm back end.
+ if (MO->isReg() && !(TI.isVariadic() && MONum == TI.getNumOperands()-1)) {
if (MO->isDef())
report("Explicit operand marked as def", MO, MONum);
if (MO->isImplicit())
OpenPOWER on IntegriCloud