[llvm] r194862 - Fix confusing machine verifier error.

Matt Arsenault Matthew.Arsenault at amd.com
Fri Nov 15 14:18:19 PST 2013


Author: arsenm
Date: Fri Nov 15 16:18:19 2013
New Revision: 194862

URL: http://llvm.org/viewvc/llvm-project?rev=194862&view=rev
Log:
Fix confusing machine verifier error.

The error reported the number of explicit operands,
but that isn't what is checked. In my case, this
resulted in the confusing errors

"Too few operands." followed shortly by
"8 operands expected, but 8 given."

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=194862&r1=194861&r2=194862&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineVerifier.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineVerifier.cpp Fri Nov 15 16:18:19 2013
@@ -775,7 +775,7 @@ void MachineVerifier::visitMachineInstrB
   if (MI->getNumOperands() < MCID.getNumOperands()) {
     report("Too few operands", MI);
     *OS << MCID.getNumOperands() << " operands expected, but "
-        << MI->getNumExplicitOperands() << " given.\n";
+        << MI->getNumOperands() << " given.\n";
   }
 
   // Check the tied operands.





More information about the llvm-commits mailing list