From 8869f301c528c5d1ac8f8d6c3a11e34c7261fba7 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Sun, 26 Feb 2023 16:32:25 -0800 Subject: [PATCH] [TableGen] Remove duplicate call to getPredicateCheck. NFC --- llvm/utils/TableGen/DAGISelMatcherGen.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/llvm/utils/TableGen/DAGISelMatcherGen.cpp b/llvm/utils/TableGen/DAGISelMatcherGen.cpp index 2e35e4114fe4..ac45de8be4c5 100644 --- a/llvm/utils/TableGen/DAGISelMatcherGen.cpp +++ b/llvm/utils/TableGen/DAGISelMatcherGen.cpp @@ -585,8 +585,9 @@ bool MatcherGen::EmitMatcherCode(unsigned Variant) { // If the pattern has a predicate on it (e.g. only enabled when a subtarget // feature is around, do the check). - if (!Pattern.getPredicateCheck().empty()) - AddMatcher(new CheckPatternPredicateMatcher(Pattern.getPredicateCheck())); + std::string PredicateCheck = Pattern.getPredicateCheck(); + if (!PredicateCheck.empty()) + AddMatcher(new CheckPatternPredicateMatcher(PredicateCheck)); // Now that we've completed the structural type match, emit any ComplexPattern // checks (e.g. addrmode matches). We emit this after the structural match