llvm.org GIT mirror llvm / 6448673
Allow the commuted form of tied-operand constraints in tablegen ("$dst = $src", rather than "$src = $dst"). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166382 91177308-0d34-0410-b5e6-96231b3b80d8 Lang Hames 8 years ago
1 changed file(s) with 6 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
232232 if (wpos == std::string::npos)
233233 throw "Illegal format for tied-to constraint: '" + CStr + "'";
234234
235 std::pair SrcOp =
236 Ops.ParseOperandName(Name.substr(wpos), false);
237 if (SrcOp > DestOp)
238 throw "Illegal tied-to operand constraint '" + CStr + "'";
239
235 std::string SrcOpName = Name.substr(wpos);
236 std::pair SrcOp = Ops.ParseOperandName(SrcOpName, false);
237 if (SrcOp > DestOp) {
238 std::swap(SrcOp, DestOp);
239 std::swap(SrcOpName, DestOpName);
240 }
240241
241242 unsigned FlatOpNo = Ops.getFlattenedOperandNumber(SrcOp);
242243