Changes in directory llvm/utils/TableGen:
DAGISelEmitter.cpp updated: 1.174 -> 1.175 --- Log message: Don't generate silly matching code like this: if (N1.getOpcode() == ISD::ADD && ...) if (... && (N1.getNumOperands() == 1 || !isNonImmUse(N1.Val, N10.Val))) && ...) TableGen knows N1 must have more than one operand. --- Diffs of the changes: (+8 -3) DAGISelEmitter.cpp | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 deletions(-) Index: llvm/utils/TableGen/DAGISelEmitter.cpp diff -u llvm/utils/TableGen/DAGISelEmitter.cpp:1.174 llvm/utils/TableGen/DAGISelEmitter.cpp:1.175 --- llvm/utils/TableGen/DAGISelEmitter.cpp:1.174 Thu Feb 23 20:13:31 2006 +++ llvm/utils/TableGen/DAGISelEmitter.cpp Tue Mar 7 02:31:27 2006 @@ -2006,9 +2006,14 @@ PInfo.hasProperty(SDNodeInfo::SDNPHasChain) || PInfo.hasProperty(SDNodeInfo::SDNPInFlag) || PInfo.hasProperty(SDNodeInfo::SDNPOptInFlag)) - emitCheck("(" + ParentName + ".getNumOperands() == 1 || !" + - "isNonImmUse(" + ParentName + ".Val, " + RootName + - ".Val))"); + if (PInfo.getNumOperands() > 1) { + emitCheck("!isNonImmUse(" + ParentName + ".Val, " + RootName + + ".Val)"); + } else { + emitCheck("(" + ParentName + ".getNumOperands() == 1 || !" + + "isNonImmUse(" + ParentName + ".Val, " + RootName + + ".Val))"); + } } } _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits