[llvm-commits] [llvm] r62361 - /llvm/trunk/utils/TableGen/DAGISelEmitter.cpp
Dan Gohman
gohman at apple.com
Fri Jan 16 13:30:56 PST 2009
Author: djg
Date: Fri Jan 16 15:30:55 2009
New Revision: 62361
URL: http://llvm.org/viewvc/llvm-project?rev=62361&view=rev
Log:
Avoid triggering an assertion failure when an instruction pattern
is a leaf node. Patch by Brandner!
Modified:
llvm/trunk/utils/TableGen/DAGISelEmitter.cpp
Modified: llvm/trunk/utils/TableGen/DAGISelEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelEmitter.cpp?rev=62361&r1=62360&r2=62361&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/DAGISelEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/DAGISelEmitter.cpp Fri Jan 16 15:30:55 2009
@@ -925,7 +925,8 @@
TreePatternNode *InstPatNode =
isRoot ? (InstPat ? InstPat->getTree(0) : Pattern)
: (InstPat ? InstPat->getTree(0) : NULL);
- if (InstPatNode && InstPatNode->getOperator()->getName() == "set") {
+ if (InstPatNode && !InstPatNode->isLeaf() &&
+ InstPatNode->getOperator()->getName() == "set") {
InstPatNode = InstPatNode->getChild(InstPatNode->getNumChildren()-1);
}
bool IsVariadic = isRoot && II.isVariadic;
More information about the llvm-commits
mailing list