[llvm] [TableGen] More generically handle tied source operands in CompressInstEmitter. (PR #146183)
Rahul Joshi via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 1 10:45:49 PDT 2025
================
@@ -290,6 +285,28 @@ void CompressInstEmitter::addDagOperandMapping(const Record *Rec,
} else {
llvm_unreachable("Unhandled CompressPat argument type!");
}
+
+ // Create a mapping between the operand name in the Dag (e.g. $rs1) and
+ // its index in the list of Dag operands and check that operands with the
+ // same name have the same type. For example in 'C_ADD $rs1, $rs2' we
+ // generate the mapping $rs1 --> 0, $rs2 ---> 1. If the operand appears
+ // twice in the (tied) same Dag we use the last occurrence for indexing.
----------------
jurahul wrote:
suggestion: If the operand appears twice in the same Dag (i.e., tied)?
Or something similar, the current (tied) seems misplaced.
https://github.com/llvm/llvm-project/pull/146183
More information about the llvm-commits
mailing list