[llvm] [llvm-exegesis] [AArch64] Resolving "not all operands are initialized by snippet generator" (PR #142529)
Lakshay Kumar via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 27 09:00:52 PDT 2025
================
@@ -152,6 +156,48 @@ 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;
+ // FIXME: Implement opcode-specific immediate value handling for system
+ // instructions:
+ // - MRS/MSR: Use valid system register encodings (e.g., NZCV, FPCR, FPSR)
+ // - MSRpstatesvcrImm1: Use valid PSTATE field encodings (e.g., SPSel,
+ // DAIFSet)
+ // - SYSLxt/SYSxt: Use valid system instruction encodings with proper
+ // CRn/CRm/op values
+ // - UDF: Use valid undefined instruction immediate ranges (0-65535)
+ // Currently defaulting to immediate value 0, which may cause invalid
+ // encodings or unreliable benchmark results for these system-level
+ // instructions.
----------------
lakshayk-nv wrote:
These system level instruction have the following working:-
- With `OPERAND_UNKNOWN` defaulted to immediate of value `0`:
Throws Error: `Illegal instruction`, There operands requires some specialised value which has to figured out.
- Without `OPERAND_UNKNOWN` omission:
Throws Error: `not all operands are initialised by snippet generator` (No change).
We will be looking into them going forward, but with low priority as you mentioned.
https://github.com/llvm/llvm-project/pull/142529
More information about the llvm-commits
mailing list