[TableGen] Avoid self getPredicates() != comparison. NFCI.

We were performing a completely unnecessary full comparison of the same std::vector<Predicate>.

llvm-svn: 339888
This commit is contained in:
Simon Pilgrim 2018-08-16 16:04:05 +00:00
parent c05c7e11bb
commit f19cdc6127
1 changed files with 2 additions and 2 deletions

View File

@ -4483,8 +4483,8 @@ void CodeGenDAGPatterns::GenerateVariants() {
bool AlreadyExists = false;
for (unsigned p = 0, e = PatternsToMatch.size(); p != e; ++p) {
// Skip if the top level predicates do not match.
if (PatternsToMatch[i].getPredicates() !=
PatternsToMatch[p].getPredicates())
if ((i != p) && (PatternsToMatch[i].getPredicates() !=
PatternsToMatch[p].getPredicates()))
continue;
// Check to see if this variant already exists.
if (Variant->isIsomorphicTo(PatternsToMatch[p].getSrcPattern(),