From bd7b7ca3eeb6dc530426c19130aa246b96116831 Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Sat, 15 May 2021 15:49:14 +0100 Subject: [PATCH] Revert rG632668c1c0e7dcf97154d2e377491cdc8cb6963c : "[TableGen] TreePatternNode::isIsomorphicTo - early out for matching leafs. NFCI." Revert premature (and very broken....) experimental commit. --- llvm/utils/TableGen/CodeGenDAGPatterns.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/llvm/utils/TableGen/CodeGenDAGPatterns.cpp b/llvm/utils/TableGen/CodeGenDAGPatterns.cpp index d98fc185e5fb..6e8e832763e7 100644 --- a/llvm/utils/TableGen/CodeGenDAGPatterns.cpp +++ b/llvm/utils/TableGen/CodeGenDAGPatterns.cpp @@ -1946,8 +1946,6 @@ bool TreePatternNode::isIsomorphicTo(const TreePatternNode *N, return false; if (isLeaf()) { - if (getLeafValue() == N->getLeafValue()) - return true; if (DefInit *DI = dyn_cast(getLeafValue())) { if (DefInit *NDI = dyn_cast(N->getLeafValue())) { return ((DI->getDef() == NDI->getDef()) @@ -1955,7 +1953,7 @@ bool TreePatternNode::isIsomorphicTo(const TreePatternNode *N, || getName() == N->getName())); } } - return false; + return getLeafValue() == N->getLeafValue(); } if (N->getOperator() != getOperator() ||