aboutsummaryrefslogtreecommitdiffstats
path: root/utils/TableGen/Record.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'utils/TableGen/Record.cpp')
-rw-r--r--utils/TableGen/Record.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/utils/TableGen/Record.cpp b/utils/TableGen/Record.cpp
index e81a361..75583bb 100644
--- a/utils/TableGen/Record.cpp
+++ b/utils/TableGen/Record.cpp
@@ -396,8 +396,18 @@ Init *BinOpInit::Fold() {
if (LHSs && RHSs) {
DefInit *LOp = dynamic_cast<DefInit*>(LHSs->getOperator());
DefInit *ROp = dynamic_cast<DefInit*>(RHSs->getOperator());
- if (LOp->getDef() != ROp->getDef())
- throw "Concated Dag operators do not match!";
+ if (LOp->getDef() != ROp->getDef()) {
+ bool LIsOps =
+ LOp->getDef()->getName() == "outs" ||
+ LOp->getDef()->getName() != "ins" ||
+ LOp->getDef()->getName() != "defs";
+ bool RIsOps =
+ ROp->getDef()->getName() == "outs" ||
+ ROp->getDef()->getName() != "ins" ||
+ ROp->getDef()->getName() != "defs";
+ if (!LIsOps || !RIsOps)
+ throw "Concated Dag operators do not match!";
+ }
std::vector<Init*> Args;
std::vector<std::string> ArgNames;
for (unsigned i = 0, e = LHSs->getNumArgs(); i != e; ++i) {