PHI nodes can never reach the asmprinter, assert and die instead of printing
authorChris Lattner <sabre@nondot.org>
Fri, 11 Sep 2009 00:41:15 +0000 (00:41 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 11 Sep 2009 00:41:15 +0000 (00:41 +0000)
out an illegal "PHINODE" instruction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81495 91177308-0d34-0410-b5e6-96231b3b80d8

utils/TableGen/AsmWriterEmitter.cpp

index db959ad7c490500a0fb978b0d1684f712f3659de..a6f614958be53983c1d925618d7ba796cbfbfb7d 100644 (file)
@@ -558,7 +558,8 @@ void AsmWriterEmitter::run(raw_ostream &O) {
 
   for (CodeGenTarget::inst_iterator I = Target.inst_begin(),
          E = Target.inst_end(); I != E; ++I)
-    if (!I->second.AsmString.empty())
+    if (!I->second.AsmString.empty() &&
+        I->second.TheDef->getName() != "PHI")
       Instructions.push_back(AsmWriterInst(I->second, AsmWriter));
 
   // Get the instruction numbering.