[llvm] [llvm-exegesis] [AArch64] Reland Resolving "not all operands are initialized by snippet generator" (PR #156423)

Lakshay Kumar via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 2 22:10:43 PDT 2025


================
@@ -152,6 +156,56 @@ class ExegesisAArch64Target : public ExegesisTarget {
   }
 };
 
+Error ExegesisAArch64Target::randomizeTargetMCOperand(
+    const Instruction &Instr, const Variable &Var, MCOperand &AssignedValue,
+    const BitVector &ForbiddenRegs) const {
+  const Operand &Op = Instr.getPrimaryOperand(Var);
+  const auto OperandType = Op.getExplicitOperandInfo().OperandType;
+  // NOTE: To resolve "Not all operands were initialized by snippet generator"
+  // Requires OperandType to be defined for such opcode's operands in AArch64
+  // tablegen files. And omit introduced OperandType(s).
+
+  // Hacky temporary fix works by defaulting all OPERAND_UNKNOWN to
+  // immediate value 0, but this introduce illegal instruction error for below
+  // system instructions will need to be omitted with OperandType or opcode
----------------
lakshayk-nv wrote:

Updated the comment. Thanks!

https://github.com/llvm/llvm-project/pull/156423


More information about the llvm-commits mailing list