From fb8c2b2f571b2c5465c498ddd7f60938f6b214ae Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 2 Mar 2010 18:15:02 +0000 Subject: [PATCH] the sorting predicate should work for comparing an element to itself, even though this isn't wildly useful. llvm-svn: 97574 --- llvm/utils/TableGen/DAGISelEmitter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/utils/TableGen/DAGISelEmitter.cpp b/llvm/utils/TableGen/DAGISelEmitter.cpp index 46e4b09507d9..e0fa7c82f8cb 100644 --- a/llvm/utils/TableGen/DAGISelEmitter.cpp +++ b/llvm/utils/TableGen/DAGISelEmitter.cpp @@ -180,7 +180,7 @@ struct PatternSortingPredicate { if (LHSPatSize > RHSPatSize) return false; // Sort based on the UID of the pattern, giving us a deterministic ordering. - assert(LHS->ID != RHS->ID); + assert(LHS == RHS || LHS->ID != RHS->ID); return LHS->ID < RHS->ID; } };