Set isStore of instructions with ISD::TRUNCSTORE root node.
authorEvan Cheng <evan.cheng@apple.com>
Wed, 3 May 2006 02:08:34 +0000 (02:08 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Wed, 3 May 2006 02:08:34 +0000 (02:08 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28075 91177308-0d34-0410-b5e6-96231b3b80d8

utils/TableGen/InstrInfoEmitter.cpp

index d39a51f5e9093904b37cf40cf332c7e4b62c8be1..611c0e3217f344521619efb6f4b263866c0f7b87 100644 (file)
@@ -201,9 +201,11 @@ void InstrInfoEmitter::emitRecord(const CodeGenInstruction &Inst, unsigned Num,
       DefInit *OpDef = dynamic_cast<DefInit*>(Dag->getOperator());
       if (OpDef) {
         Record *Operator = OpDef->getDef();
-        if (Operator->isSubClassOf("SDNode") &&
-            Operator->getValueAsString("Opcode") == "ISD::STORE")
-          isStore = true;
+        if (Operator->isSubClassOf("SDNode")) {
+          const std::string Opcode = Operator->getValueAsString("Opcode");
+          if (Opcode == "ISD::STORE" || Opcode == "ISD::TRUNCSTORE")
+            isStore = true;
+        }
       }
     }
   }