[llvm-commits] [llvm] r119446 - /llvm/trunk/lib/CodeGen/MachineVerifier.cpp

Eric Christopher echristo at apple.com
Tue Nov 16 16:55:37 PST 2010


Author: echristo
Date: Tue Nov 16 18:55:36 2010
New Revision: 119446

URL: http://llvm.org/viewvc/llvm-project?rev=119446&view=rev
Log:
Only avoid the check if we're the last operand before the variable
operands in a variadic instruction.

Modified:
    llvm/trunk/lib/CodeGen/MachineVerifier.cpp

Modified: llvm/trunk/lib/CodeGen/MachineVerifier.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineVerifier.cpp?rev=119446&r1=119445&r2=119446&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineVerifier.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineVerifier.cpp Tue Nov 16 18:55:36 2010
@@ -558,9 +558,9 @@
     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())





More information about the llvm-commits mailing list