Minor code simplification.
authorDan Gohman <gohman@apple.com>
Thu, 27 May 2010 16:25:05 +0000 (16:25 +0000)
committerDan Gohman <gohman@apple.com>
Thu, 27 May 2010 16:25:05 +0000 (16:25 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104845 91177308-0d34-0410-b5e6-96231b3b80d8

utils/TableGen/FastISelEmitter.cpp

index 9ec9e088424bacbd533d27b2543f0072b69ba13b..7c54f7877d587b7c5b19d965d4f6dd80aee577c6 100644 (file)
@@ -54,15 +54,15 @@ struct OperandsSignature {
   bool initialize(TreePatternNode *InstPatNode,
                   const CodeGenTarget &Target,
                   MVT::SimpleValueType VT) {
-    if (!InstPatNode->isLeaf() &&
-        InstPatNode->getOperator()->getName() == "imm") {
-      Operands.push_back("i");
-      return true;
-    }
-    if (!InstPatNode->isLeaf() &&
-        InstPatNode->getOperator()->getName() == "fpimm") {
-      Operands.push_back("f");
-      return true;
+    if (!InstPatNode->isLeaf()) {
+      if (InstPatNode->getOperator()->getName() == "imm") {
+        Operands.push_back("i");
+        return true;
+      }
+      if (InstPatNode->getOperator()->getName() == "fpimm") {
+        Operands.push_back("f");
+        return true;
+      }
     }
     
     const CodeGenRegisterClass *DstRC = 0;