summaryrefslogtreecommitdiffstats
path: root/llvm/utils/TableGen
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/utils/TableGen')
-rw-r--r--llvm/utils/TableGen/InstrInfoEmitter.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/llvm/utils/TableGen/InstrInfoEmitter.cpp b/llvm/utils/TableGen/InstrInfoEmitter.cpp
index d39a51f5e90..611c0e3217f 100644
--- a/llvm/utils/TableGen/InstrInfoEmitter.cpp
+++ b/llvm/utils/TableGen/InstrInfoEmitter.cpp
@@ -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;
+ }
}
}
}
OpenPOWER on IntegriCloud