diff --git a/llvm/utils/TableGen/CodeGenInstruction.cpp b/llvm/utils/TableGen/CodeGenInstruction.cpp --- a/llvm/utils/TableGen/CodeGenInstruction.cpp +++ b/llvm/utils/TableGen/CodeGenInstruction.cpp @@ -175,7 +175,7 @@ } OpInfo.SubOpNames[j] = SubArgName; - SubOpAliases[SubArgName] = std::make_pair(MIOperandNo, j); + SubOpAliases[SubArgName] = std::make_pair(i, j); } } else if (!EncoderMethod.empty()) { // If we have no explicit sub-op dag, but have an top-level encoder